// // This code was generated by the UnitCodeGenerator tool // // Changes to this file will be lost if the code is regenerated // #[cfg(test)] mod tests { use unit_conversions::*; use assert_approx_eq::assert_approx_eq; /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_milliseconds_1() { let result: f64 = time::days::to_milliseconds(0.0009); assert_approx_eq!(77760.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_milliseconds_2() { let result: f64 = time::days::to_milliseconds(0.03); assert_approx_eq!(2592000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_milliseconds_3() { let result: f64 = time::days::to_milliseconds(0.006); assert_approx_eq!(518400.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_seconds_1() { let result: f64 = time::days::to_seconds(1.4); assert_approx_eq!(120960.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_seconds_2() { let result: f64 = time::days::to_seconds(0.06); assert_approx_eq!(5184.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_seconds_3() { let result: f64 = time::days::to_seconds(0.2); assert_approx_eq!(17280.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_minutes_1() { let result: f64 = time::days::to_minutes(34.0); assert_approx_eq!(48960.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_minutes_2() { let result: f64 = time::days::to_minutes(0.06); assert_approx_eq!(86.4, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_minutes_3() { let result: f64 = time::days::to_minutes(8.1); assert_approx_eq!(11664.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_hours_1() { let result: f64 = time::days::to_hours(8.1); assert_approx_eq!(194.4, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_hours_2() { let result: f64 = time::days::to_hours(0.2); assert_approx_eq!(4.8, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_hours_3() { let result: f64 = time::days::to_hours(121.0); assert_approx_eq!(2904.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_weeks_1() { let result: f64 = time::days::to_weeks(121.0); assert_approx_eq!(17.2857, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_weeks_2() { let result: f64 = time::days::to_weeks(7.2); assert_approx_eq!(1.02857, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_weeks_3() { let result: f64 = time::days::to_weeks(0.9); assert_approx_eq!(0.128571, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_months_1() { let result: f64 = time::days::to_months(0.9); assert_approx_eq!(0.029589, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_months_2() { let result: f64 = time::days::to_months(108.0); assert_approx_eq!(3.55068, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_months_3() { let result: f64 = time::days::to_months(55.0); assert_approx_eq!(1.80822, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_years_1() { let result: f64 = time::days::to_years(55.0); assert_approx_eq!(0.150685, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_years_2() { let result: f64 = time::days::to_years(123.0); assert_approx_eq!(0.336986, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knowndays_to_years_3() { let result: f64 = time::days::to_years(900.0); assert_approx_eq!(2.46575, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_milliseconds_1() { let result: f64 = time::hours::to_milliseconds(0.006); assert_approx_eq!(21600.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_milliseconds_2() { let result: f64 = time::hours::to_milliseconds(0.09); assert_approx_eq!(324000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_milliseconds_3() { let result: f64 = time::hours::to_milliseconds(0.007); assert_approx_eq!(25200.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_seconds_1() { let result: f64 = time::hours::to_seconds(12.0); assert_approx_eq!(43200.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_seconds_2() { let result: f64 = time::hours::to_seconds(3.2); assert_approx_eq!(11520.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_seconds_3() { let result: f64 = time::hours::to_seconds(0.3); assert_approx_eq!(1080.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_minutes_1() { let result: f64 = time::hours::to_minutes(0.3); assert_approx_eq!(18.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_minutes_2() { let result: f64 = time::hours::to_minutes(700.0); assert_approx_eq!(42000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_minutes_3() { let result: f64 = time::hours::to_minutes(4.8); assert_approx_eq!(288.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_days_1() { let result: f64 = time::hours::to_days(4.8); assert_approx_eq!(0.2, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_days_2() { let result: f64 = time::hours::to_days(190.0); assert_approx_eq!(7.91667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_days_3() { let result: f64 = time::hours::to_days(8.5); assert_approx_eq!(0.354167, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_weeks_1() { let result: f64 = time::hours::to_weeks(800.0); assert_approx_eq!(4.7619, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_weeks_2() { let result: f64 = time::hours::to_weeks(90.0); assert_approx_eq!(0.535714, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_weeks_3() { let result: f64 = time::hours::to_weeks(102.0); assert_approx_eq!(0.607143, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_months_1() { let result: f64 = time::hours::to_months(102.0); assert_approx_eq!(0.139726, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_months_2() { let result: f64 = time::hours::to_months(9876.0); assert_approx_eq!(13.52875, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_months_3() { let result: f64 = time::hours::to_months(100.8); assert_approx_eq!(0.13808204, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_years_1() { let result: f64 = time::hours::to_years(9000.0); assert_approx_eq!(1.027397, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_years_2() { let result: f64 = time::hours::to_years(1003.0); assert_approx_eq!(0.1144977, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownhours_to_years_3() { let result: f64 = time::hours::to_years(809.0); assert_approx_eq!(0.0923516, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_seconds_1() { let result: f64 = time::milliseconds::to_seconds(8.0); assert_approx_eq!(0.008, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_seconds_2() { let result: f64 = time::milliseconds::to_seconds(780.0); assert_approx_eq!(0.78, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_seconds_3() { let result: f64 = time::milliseconds::to_seconds(900.0); assert_approx_eq!(0.9, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_minutes_1() { let result: f64 = time::milliseconds::to_minutes(900.0); assert_approx_eq!(0.015, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_minutes_2() { let result: f64 = time::milliseconds::to_minutes(67000.0); assert_approx_eq!(1.1166667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_minutes_3() { let result: f64 = time::milliseconds::to_minutes(1234567.0); assert_approx_eq!(20.57611667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_hours_1() { let result: f64 = time::milliseconds::to_hours(1234567.0); assert_approx_eq!(0.3429352778, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_hours_2() { let result: f64 = time::milliseconds::to_hours(100900.0); assert_approx_eq!(0.0280277778, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_hours_3() { let result: f64 = time::milliseconds::to_hours(46000.0); assert_approx_eq!(0.012777778, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_days_1() { let result: f64 = time::milliseconds::to_days(9000000.0); assert_approx_eq!(0.1041666667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_days_2() { let result: f64 = time::milliseconds::to_days(123456789.0); assert_approx_eq!(1.42889802083, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_days_3() { let result: f64 = time::milliseconds::to_days(89008900.0); assert_approx_eq!(1.0301956019, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_weeks_1() { let result: f64 = time::milliseconds::to_weeks(89008900.0); assert_approx_eq!(0.14717080026, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_weeks_2() { let result: f64 = time::milliseconds::to_weeks(1234567890.0); assert_approx_eq!(2.041282886905, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_weeks_3() { let result: f64 = time::milliseconds::to_weeks(100200300.0); assert_approx_eq!(0.165675099206, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_months_1() { let result: f64 = time::milliseconds::to_months(100200300400.0); assert_approx_eq!(38.102653412154631, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_months_2() { let result: f64 = time::milliseconds::to_months(90001000.0); assert_approx_eq!(0.034246918329, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_months_3() { let result: f64 = time::milliseconds::to_months(8888888888.0); assert_approx_eq!(3.382374104552, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_years_1() { let result: f64 = time::milliseconds::to_years(8888888888.0); assert_approx_eq!(0.28167767558793383, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_years_2() { let result: f64 = time::milliseconds::to_years(123456789123.0); assert_approx_eq!(3.9121899074093087, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmilliseconds_to_years_3() { let result: f64 = time::milliseconds::to_years(900080007000.0); assert_approx_eq!(28.522399977032002, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_milliseconds_1() { let result: f64 = time::minutes::to_milliseconds(0.007); assert_approx_eq!(420.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_milliseconds_2() { let result: f64 = time::minutes::to_milliseconds(0.8); assert_approx_eq!(48000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_milliseconds_3() { let result: f64 = time::minutes::to_milliseconds(9.0); assert_approx_eq!(540000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_seconds_1() { let result: f64 = time::minutes::to_seconds(90.0); assert_approx_eq!(5400.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_seconds_2() { let result: f64 = time::minutes::to_seconds(0.9); assert_approx_eq!(54.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_seconds_3() { let result: f64 = time::minutes::to_seconds(123.0); assert_approx_eq!(7380.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_hours_1() { let result: f64 = time::minutes::to_hours(123.0); assert_approx_eq!(2.05, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_hours_2() { let result: f64 = time::minutes::to_hours(77.0); assert_approx_eq!(1.28333, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_hours_3() { let result: f64 = time::minutes::to_hours(0.8); assert_approx_eq!(0.0133333, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_days_1() { let result: f64 = time::minutes::to_days(800.0); assert_approx_eq!(0.555556, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_days_2() { let result: f64 = time::minutes::to_days(190.0); assert_approx_eq!(0.131944, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_days_3() { let result: f64 = time::minutes::to_days(55.0); assert_approx_eq!(0.0381944, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_weeks_1() { let result: f64 = time::minutes::to_weeks(1900.0); assert_approx_eq!(0.1884921, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_weeks_2() { let result: f64 = time::minutes::to_weeks(800.0); assert_approx_eq!(0.0793651, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_weeks_3() { let result: f64 = time::minutes::to_weeks(12345.0); assert_approx_eq!(1.2247024, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_months_1() { let result: f64 = time::minutes::to_months(1234.0); assert_approx_eq!(0.02817349, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_months_2() { let result: f64 = time::minutes::to_months(90000.0); assert_approx_eq!(2.0547923, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_months_3() { let result: f64 = time::minutes::to_months(7100.0); assert_approx_eq!(0.1621003, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_years_1() { let result: f64 = time::minutes::to_years(900800.0); assert_approx_eq!(1.71385084, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_years_2() { let result: f64 = time::minutes::to_years(12345.0); assert_approx_eq!(0.023487443, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownminutes_to_years_3() { let result: f64 = time::minutes::to_years(610910.0); assert_approx_eq!(1.16230974, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_milliseconds_1() { let result: f64 = time::months::to_milliseconds(0.00034); assert_approx_eq!(894113.64, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_milliseconds_2() { let result: f64 = time::months::to_milliseconds(0.001); assert_approx_eq!(2629746.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_milliseconds_3() { let result: f64 = time::months::to_milliseconds(0.006); assert_approx_eq!(15778476.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_seconds_1() { let result: f64 = time::months::to_seconds(0.03); assert_approx_eq!(78840.00, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_seconds_2() { let result: f64 = time::months::to_seconds(0.1); assert_approx_eq!(262800.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_seconds_3() { let result: f64 = time::months::to_seconds(0.008); assert_approx_eq!(21024.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_minutes_1() { let result: f64 = time::months::to_minutes(0.7); assert_approx_eq!(30660.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_minutes_2() { let result: f64 = time::months::to_minutes(1.4); assert_approx_eq!(61319.99, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_minutes_3() { let result: f64 = time::months::to_minutes(5.0); assert_approx_eq!(219000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_hours_1() { let result: f64 = time::months::to_hours(4.0); assert_approx_eq!(2920.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_hours_2() { let result: f64 = time::months::to_hours(0.3); assert_approx_eq!(219.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_hours_3() { let result: f64 = time::months::to_hours(4.5); assert_approx_eq!(3285.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_days_1() { let result: f64 = time::months::to_days(4.5); assert_approx_eq!(136.875, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_days_2() { let result: f64 = time::months::to_days(90.0); assert_approx_eq!(2737.5029, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_days_3() { let result: f64 = time::months::to_days(0.4); assert_approx_eq!(12.1667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_weeks_1() { let result: f64 = time::months::to_weeks(0.5); assert_approx_eq!(2.17262, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_weeks_2() { let result: f64 = time::months::to_weeks(88.0); assert_approx_eq!(382.381120, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_weeks_3() { let result: f64 = time::months::to_weeks(12.6); assert_approx_eq!(54.75006, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_years_1() { let result: f64 = time::months::to_years(12.6); assert_approx_eq!(1.050001, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_years_2() { let result: f64 = time::months::to_years(109.0); assert_approx_eq!(9.08334, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownmonths_to_years_3() { let result: f64 = time::months::to_years(23.0); assert_approx_eq!(1.91667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_microseconds_1() { let result: f64 = time::nanoseconds::to_microseconds(1234.0); assert_approx_eq!(1.234, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_microseconds_2() { let result: f64 = time::nanoseconds::to_microseconds(90.9); assert_approx_eq!(0.0909, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_microseconds_3() { let result: f64 = time::nanoseconds::to_microseconds(70000.0); assert_approx_eq!(70.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_milliseconds_1() { let result: f64 = time::nanoseconds::to_milliseconds(70000.0); assert_approx_eq!(0.07, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_milliseconds_2() { let result: f64 = time::nanoseconds::to_milliseconds(123456.0); assert_approx_eq!(0.123456, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_milliseconds_3() { let result: f64 = time::nanoseconds::to_milliseconds(900900.0); assert_approx_eq!(0.9009, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_seconds_1() { let result: f64 = time::nanoseconds::to_seconds(900000000.0); assert_approx_eq!(0.9, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_seconds_2() { let result: f64 = time::nanoseconds::to_seconds(123456789.0); assert_approx_eq!(0.123456789, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_seconds_3() { let result: f64 = time::nanoseconds::to_seconds(800400700.0); assert_approx_eq!(0.8004007, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_minutes_1() { let result: f64 = time::nanoseconds::to_minutes(1234567890.0); assert_approx_eq!(0.0205761315, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_minutes_2() { let result: f64 = time::nanoseconds::to_minutes(800400700.0); assert_approx_eq!(0.0133400116667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_minutes_3() { let result: f64 = time::nanoseconds::to_minutes(800100800.0); assert_approx_eq!(0.0133350133333, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_hours_1() { let result: f64 = time::nanoseconds::to_hours(1234567890123.0); assert_approx_eq!(0.3429355250341667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_hours_2() { let result: f64 = time::nanoseconds::to_hours(900800700600.0); assert_approx_eq!(0.250222416833333, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownnanoseconds_to_hours_3() { let result: f64 = time::nanoseconds::to_hours(66677788999.0); assert_approx_eq!(0.018521608055278, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_milliseconds_1() { let result: f64 = time::seconds::to_milliseconds(9.0); assert_approx_eq!(9000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_milliseconds_2() { let result: f64 = time::seconds::to_milliseconds(3.1); assert_approx_eq!(3100.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_milliseconds_3() { let result: f64 = time::seconds::to_milliseconds(0.9); assert_approx_eq!(900.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_minutes_1() { let result: f64 = time::seconds::to_minutes(100.0); assert_approx_eq!(1.66667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_minutes_2() { let result: f64 = time::seconds::to_minutes(9000.0); assert_approx_eq!(150.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_minutes_3() { let result: f64 = time::seconds::to_minutes(2300.0); assert_approx_eq!(38.33333, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_hours_1() { let result: f64 = time::seconds::to_hours(2300.0); assert_approx_eq!(0.6388889, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_hours_2() { let result: f64 = time::seconds::to_hours(9999.0); assert_approx_eq!(2.7775, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_hours_3() { let result: f64 = time::seconds::to_hours(36000.0); assert_approx_eq!(10.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_days_1() { let result: f64 = time::seconds::to_days(36000.0); assert_approx_eq!(0.41666667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_days_2() { let result: f64 = time::seconds::to_days(90000.0); assert_approx_eq!(1.0416667, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_days_3() { let result: f64 = time::seconds::to_days(190000.0); assert_approx_eq!(2.19907407, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_weeks_1() { let result: f64 = time::seconds::to_weeks(190000.0); assert_approx_eq!(0.314153439, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_weeks_2() { let result: f64 = time::seconds::to_weeks(1234567.0); assert_approx_eq!(2.041281415, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_weeks_3() { let result: f64 = time::seconds::to_weeks(100200.0); assert_approx_eq!(0.165674603, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_months_1() { let result: f64 = time::seconds::to_months(1000000.0); assert_approx_eq!(0.380517087, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_months_2() { let result: f64 = time::seconds::to_months(9876543.0); assert_approx_eq!(3.75819337, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_months_3() { let result: f64 = time::seconds::to_months(200900.0); assert_approx_eq!(0.0764458827, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_years_1() { let result: f64 = time::seconds::to_years(123456789.0); assert_approx_eq!(3.91478909817, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_years_2() { let result: f64 = time::seconds::to_years(100900.0); assert_approx_eq!(0.00319951801, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownseconds_to_years_3() { let result: f64 = time::seconds::to_years(987654.0); assert_approx_eq!(0.0313183029, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_milliseconds_1() { let result: f64 = time::weeks::to_milliseconds(0.001); assert_approx_eq!(604800.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_milliseconds_2() { let result: f64 = time::weeks::to_milliseconds(0.005); assert_approx_eq!(3024000.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_milliseconds_3() { let result: f64 = time::weeks::to_milliseconds(0.0009); assert_approx_eq!(544320.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_seconds_1() { let result: f64 = time::weeks::to_seconds(0.1); assert_approx_eq!(60480.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_seconds_2() { let result: f64 = time::weeks::to_seconds(0.08); assert_approx_eq!(48384.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_seconds_3() { let result: f64 = time::weeks::to_seconds(3.0); assert_approx_eq!(1814400.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_minutes_1() { let result: f64 = time::weeks::to_minutes(2.0); assert_approx_eq!(20160.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_minutes_2() { let result: f64 = time::weeks::to_minutes(0.4); assert_approx_eq!(4032.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_minutes_3() { let result: f64 = time::weeks::to_minutes(0.02); assert_approx_eq!(201.6, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_hours_1() { let result: f64 = time::weeks::to_hours(0.02); assert_approx_eq!(3.36, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_hours_2() { let result: f64 = time::weeks::to_hours(77.0); assert_approx_eq!(12936.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_hours_3() { let result: f64 = time::weeks::to_hours(9.2); assert_approx_eq!(1545.6, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_days_1() { let result: f64 = time::weeks::to_days(9.2); assert_approx_eq!(64.4, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_days_2() { let result: f64 = time::weeks::to_days(169.0); assert_approx_eq!(1183.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_days_3() { let result: f64 = time::weeks::to_days(4.0); assert_approx_eq!(28.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_months_1() { let result: f64 = time::weeks::to_months(4.0); assert_approx_eq!(0.920547, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_months_2() { let result: f64 = time::weeks::to_months(900.0); assert_approx_eq!(207.12319687, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_months_3() { let result: f64 = time::weeks::to_months(3.8); assert_approx_eq!(0.87452, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_years_1() { let result: f64 = time::weeks::to_years(3.0); assert_approx_eq!(0.0575342, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_years_2() { let result: f64 = time::weeks::to_years(235.0); assert_approx_eq!(4.50685, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownweeks_to_years_3() { let result: f64 = time::weeks::to_years(1090.0); assert_approx_eq!(20.90411, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_milliseconds_1() { let result: f64 = time::years::to_milliseconds(0.001); assert_approx_eq!(31556952.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_milliseconds_2() { let result: f64 = time::years::to_milliseconds(0.0009); assert_approx_eq!(28401256.8, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_milliseconds_3() { let result: f64 = time::years::to_milliseconds(0.00034); assert_approx_eq!(10729363.680000002, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_seconds_1() { let result: f64 = time::years::to_seconds(0.06); assert_approx_eq!(1892160.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_seconds_2() { let result: f64 = time::years::to_seconds(0.009); assert_approx_eq!(283824.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_seconds_3() { let result: f64 = time::years::to_seconds(0.02); assert_approx_eq!(630720.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_minutes_1() { let result: f64 = time::years::to_minutes(0.02); assert_approx_eq!(10512.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_minutes_2() { let result: f64 = time::years::to_minutes(0.3); assert_approx_eq!(157680.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_minutes_3() { let result: f64 = time::years::to_minutes(0.001); assert_approx_eq!(525.6, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_hours_1() { let result: f64 = time::years::to_hours(0.001); assert_approx_eq!(8.76, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_hours_2() { let result: f64 = time::years::to_hours(0.3); assert_approx_eq!(2628.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_hours_3() { let result: f64 = time::years::to_hours(2.0); assert_approx_eq!(17520.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_days_1() { let result: f64 = time::years::to_days(2.0); assert_approx_eq!(730.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_days_2() { let result: f64 = time::years::to_days(1009.0); assert_approx_eq!(368285.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_days_3() { let result: f64 = time::years::to_days(7.0); assert_approx_eq!(2555.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_weeks_1() { let result: f64 = time::years::to_weeks(7.0); assert_approx_eq!(365.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_weeks_2() { let result: f64 = time::years::to_weeks(1.3); assert_approx_eq!(67.7857, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_weeks_3() { let result: f64 = time::years::to_weeks(88.0); assert_approx_eq!(4588.5839, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_months_1() { let result: f64 = time::years::to_months(6.0); assert_approx_eq!(71.9999, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_months_2() { let result: f64 = time::years::to_months(12.0); assert_approx_eq!(144.0, result, 0.01); } /// Need to convert to parameterized tests #[test] fn it_convert_knownyears_to_months_3() { let result: f64 = time::years::to_months(0.3); assert_approx_eq!(3.6, result, 0.01); } }