test fixing

This commit is contained in:
jonesmarvin8 2026-03-02 16:13:23 -05:00
parent 84abe02573
commit 181d43e6d2
21 changed files with 10 additions and 1 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -15,7 +15,7 @@ pub mod data;
pub struct Nonce(pub u128); pub struct Nonce(pub u128);
impl Nonce { impl Nonce {
pub fn public_account_nonce_increment(mut self) { pub fn public_account_nonce_increment(&mut self) {
self.0 += 1; self.0 += 1;
} }
@ -284,6 +284,15 @@ mod tests {
assert_eq!(nonce, expected_nonce); 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] #[test]
fn test_serde_roundtrip_for_nonce() { fn test_serde_roundtrip_for_nonce() {
let nonce: Nonce = 7u128.into(); let nonce: Nonce = 7u128.into();