mirror of
https://github.com/logos-blockchain/lssa.git
synced 2026-03-03 18:53:40 +00:00
test fixing
This commit is contained in:
parent
84abe02573
commit
181d43e6d2
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -15,7 +15,7 @@ pub mod data;
|
||||
pub struct Nonce(pub u128);
|
||||
|
||||
impl Nonce {
|
||||
pub fn public_account_nonce_increment(mut self) {
|
||||
pub fn public_account_nonce_increment(&mut self) {
|
||||
self.0 += 1;
|
||||
}
|
||||
|
||||
@ -284,6 +284,15 @@ mod tests {
|
||||
assert_eq!(nonce, expected_nonce);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn increment_public_nonce() {
|
||||
let value = 42u128;
|
||||
let mut nonce = Nonce(value);
|
||||
nonce.public_account_nonce_increment();
|
||||
let expected_nonce = Nonce(value + 1);
|
||||
assert_eq!(nonce, expected_nonce);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_serde_roundtrip_for_nonce() {
|
||||
let nonce: Nonce = 7u128.into();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user