Test sequence formatting

Add a test to kill the mutants in Sequence formatting.
This commit is contained in:
Jamil Lambert, PhD 2025-02-07 17:50:45 +00:00
parent 6c3d7f6443
commit 963dba2bdf
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 11 additions and 0 deletions

View File

@ -334,4 +334,15 @@ mod tests {
assert!(!seq_time_locked.is_height_locked());
assert!(!seq_height_locked.is_time_locked());
}
#[test]
fn sequence_formatting() {
let sequence = Sequence(0x7FFFFFFF);
assert_eq!(format!("{:x}", sequence), "7fffffff");
assert_eq!(format!("{:X}", sequence), "7FFFFFFF");
// Test From<Sequence> for u32
let sequence_u32: u32 = sequence.into();
assert_eq!(sequence_u32, 0x7FFFFFFF);
}
}