"0°0′336″0‴"
);
assert_eq!(
Sat(50 * COIN_VALUE * u64::from(SUBSIDY_HALVING_INTERVAL) + 1)
.degree()
.to_string(),
"0°0′336″1‴"
);
assert_eq!(
Sat(2067187500000000 - 1).degree().to_string(),
"0°209999′2015″156249999‴"
);
assert_eq!(Sat(2067187500000000).degree().to_string(), "1°0′0″0‴");
assert_eq!(Sat(2067187500000000 + 1).degree().to_string(), "1°0′0″1‴");
}
#[test]
fn invalid_degree_bugfix() {
// Break glass in case of emergency:
// for height in 0..(2 * CYCLE_EPOCHS * Epoch::BLOCKS) {
// // 1054200000000000
// let expected = Height(height).starting_sat();
// // 0°1680′0″0‴
// let degree = expected.degree();
// // 2034637500000000
// let actual = degree.to_string().parse::<Sat>().unwrap();
// assert_eq!(
// actual, expected,
// "Sat at height {height} did not round-trip from degree {degree} successfully"
// );
// }
assert_eq!(Sat(1054200000000000).degree().to_string(), "0°1680′0″0‴");