Add test to BlockTime to kill mutants

Mutants found in weekly mutation testing.

Add a test to kill them.
This commit is contained in:
Jamil Lambert, PhD 2025-03-26 09:36:42 +00:00
parent 143531de7c
commit 1d1cf00b1e
No known key found for this signature in database
GPG Key ID: 54DC29234AB5D2C0
1 changed files with 11 additions and 0 deletions

View File

@ -56,3 +56,14 @@ impl<'a> Arbitrary<'a> for BlockTime {
Ok(BlockTime::from(t)) Ok(BlockTime::from(t))
} }
} }
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn block_time_round_trip() {
let t = BlockTime::from(1_742_979_600); // 26 Mar 2025 9:00 UTC
assert_eq!(u32::from(t), 1_742_979_600);
}
}