Add version test

Mutant found in Version.

Add a round trip test for version::from_consensus to kill the mutant.
This commit is contained in:
Jamil Lambert, PhD 2025-02-05 16:45:08 +00:00
parent 927251ef8e
commit 0df15d5cfd
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 6 additions and 0 deletions

View File

@ -374,4 +374,10 @@ mod tests {
let version = Version::from_consensus(0b00100000000000000000000000000010);
assert!(!Version::is_signalling_soft_fork(&version, 0));
}
#[test]
fn version_to_consensus() {
let version = Version::from_consensus(1234567890);
assert_eq!(version.to_consensus(), 1234567890);
}
}