} #[test] fn final_subsidy_height() { pretty_assert_eq!( ClockSvg::new(Height(6929999)).second, 1007.0 / 2016.0 * 360.0 ); pretty_assert_eq!( ClockSvg::new(Height(6929999)).minute, 209_999.0 / 210_000.0 * 360.0 ); pretty_assert_eq!( ClockSvg::new(Height(6929999)).hour, 6929999.0 / 6930000.0 * 360.0 ); } #[test] fn first_post_subsidy_height() { pretty_assert_eq!(ClockSvg::new(Height(6930000)).second, 180.0); pretty_assert_eq!(ClockSvg::new(Height(6930000)).minute, 0.0); pretty_assert_eq!(ClockSvg::new(Height(6930000)).hour, 0.0); } #[test] fn clock_svg() { assert_regex_match!( ClockSvg::new(Height(6929999)).to_string(), r##"<\?xml version="1.0" encoding="UTF-8"\?> .* 6929999.* Subsidy.* Epoch.* Period.*