Add a roundtrip test to kill a mutant
There is a mutant found in relative locktime `to_512_second_intervals`. Add a round trip test to kill the mutant.
This commit is contained in:
parent
0b4b17307d
commit
bd50943234
|
@ -307,6 +307,13 @@ mod tests {
|
||||||
assert_eq!(NumberOf512Seconds::from_512_second_intervals(1).to_seconds(), 512);
|
assert_eq!(NumberOf512Seconds::from_512_second_intervals(1).to_seconds(), 512);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn from_512_second_intervals_roundtrip() {
|
||||||
|
let intervals = 100_u16;
|
||||||
|
let locktime = NumberOf512Seconds::from_512_second_intervals(intervals);
|
||||||
|
assert_eq!(locktime.to_512_second_intervals(), intervals);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn from_seconds_ceil_success() {
|
fn from_seconds_ceil_success() {
|
||||||
let actual = NumberOf512Seconds::from_seconds_ceil(100).unwrap();
|
let actual = NumberOf512Seconds::from_seconds_ceil(100).unwrap();
|
||||||
|
|
Loading…
Reference in New Issue