@@ -94,37 +94,37 @@ mod test {
9494 test_is_exact,
9595 test_ceil_precision,
9696 test_ratio,
97- test_ratio_invert => fail( r"assertion failed: `( left == right)`
98- left: ` 0.9999999999999999`,
99- right: ` 1.0`: R::ratio(1, a) * a != 1 for 49 " ) ,
97+ test_ratio_invert => fail( r"assertion ` left == right` failed: R::ratio(1, a) * a != 1 for 49
98+ left: 0.9999999999999999
99+ right: 1.0" ) ,
100100 test_is_zero,
101101 test_zero_is_add_neutral,
102102 test_add_is_commutative,
103103 test_opposite,
104104 test_sub_self,
105- test_add_sub => fail( r"assertion failed: `( left == right)`
106- left: ` 0.9999999999999999`,
107- right: ` 1.0`: (a + b) - b != a for 1, 0.0000000004656613430357376 " ) ,
108- test_sub_add => fail( r"assertion failed: `( left == right)`
109- left: ` 0.0`,
110- right: ` 1.1920928955078125e-7`: (a - b) + b != a for 0.00000011920928955078125, 2147483646 " ) ,
105+ test_add_sub => fail( r"assertion ` left == right` failed: (a + b) - b != a for 1, 0.0000000004656613430357376
106+ left: 0.9999999999999999
107+ right: 1.0" ) ,
108+ test_sub_add => fail( r"assertion ` left == right` failed: (a - b) + b != a for 0.00000011920928955078125, 2147483646
109+ left: 0.0
110+ right: 1.1920928955078125e-7" ) ,
111111 test_one_is_mul_neutral,
112112 test_mul_is_commutative,
113113 test_mul_up_is_commutative,
114114 test_mul_up_integers,
115115 test_mul_up_wrt_mul,
116- test_invert => fail( r"assertion failed: `( left == right)`
117- left: ` 2147483631.0000002`,
118- right: ` 2147483631.0`: 1/(1/a) != a for 2147483631 " ) ,
116+ test_invert => fail( r"assertion ` left == right` failed: 1/(1/a) != a for 2147483631
117+ left: 2147483631.0000002
118+ right: 2147483631.0" ) ,
119119 test_div_self,
120120 test_div_up_self,
121121 test_div_up_wrt_div,
122- test_mul_div => fail( r"assertion failed: `( left == right)`
123- left: ` 2147483646.0000002`,
124- right: ` 2147483646.0`: (a * b) / b != a for 2147483646, 0.000000000465661315280157 " ) ,
125- test_div_mul => fail( r"assertion failed: `( left == right)`
126- left: ` 0.9999999999999999`,
127- right: ` 1.0`: (a / b) * b != a for 1, 2147483631 " ) ,
122+ test_mul_div => fail( r"assertion ` left == right` failed: (a * b) / b != a for 2147483646, 0.000000000465661315280157
123+ left: 2147483646.0000002
124+ right: 2147483646.0" ) ,
125+ test_div_mul => fail( r"assertion ` left == right` failed: (a / b) * b != a for 1, 2147483631
126+ left: 0.9999999999999999
127+ right: 1.0" ) ,
128128 test_mul_by_int,
129129 test_div_by_int,
130130 test_references,
@@ -135,27 +135,27 @@ mod test {
135135 f64 ,
136136 f64 ,
137137 None ,
138- test_add_is_associative => fail( r"assertion failed: `( left == right)`
139- left: ` 2.0000000004656617`,
140- right: ` 2.0000000004656613`: (a + b) + c != a + (b + c) for 1, 1, 0.0000000004656615095692907 " ) ,
141- test_mul_is_associative => fail( r"assertion failed: `( left == right)`
142- left: ` 9.903519996076708e27`,
143- right: ` 9.903519996076707e27`: (a * b) * c != a * (b * c) for 2147483646, 2147483646, 2147483583 " ) ,
144- test_mul_is_distributive => fail( r"assertion failed: `( left == right)`
145- left: ` 4.6116857392545137e18`,
146- right: ` 4.611685739254514e18`: a * (b + c) != (a * b) + (a * c) for 2147483646, 1, 2147483519 " ) ,
147- test_mul_by_int_is_associative => fail( r"assertion failed: `( left == right)`
148- left: ` 4.190951650171264e-9`,
149- right: ` 4.190951650171263e-9`: (a * b) * c != a * (b * c) for 0.0000000004656612944634737, 3, 3 " ) ,
150- test_mul_by_int_is_distributive => fail( r"assertion failed: `( left == right)`
151- left: ` 3.0000000013969848`,
152- right: ` 3.0000000013969843`: (a + b) * c != (a * c) + (b * c) for 1, 0.0000000004656613985469087, 3 " ) ,
153- test_div_by_int_is_associative => fail( r"assertion failed: `( left == right)`
154- left: ` 0.0303030303030303`,
155- right: ` 0.030303030303030304`: (a / b) / c != a / (b * c) for 1, 3, 11 " ) ,
156- test_div_by_int_is_distributive => fail( r"assertion failed: `( left == right)`
157- left: ` 0.6`,
158- right: ` 0.6000000000000001`: (a + b) / c != (a / c) + (b / c) for 1, 2, 5 " ) ,
138+ test_add_is_associative => fail( r"assertion ` left == right` failed: (a + b) + c != a + (b + c) for 1, 1, 0.0000000004656615095692907
139+ left: 2.0000000004656617
140+ right: 2.0000000004656613" ) ,
141+ test_mul_is_associative => fail( r"assertion ` left == right` failed: (a * b) * c != a * (b * c) for 2147483646, 2147483646, 2147483583
142+ left: 9.903519996076708e27
143+ right: 9.903519996076707e27" ) ,
144+ test_mul_is_distributive => fail( r"assertion ` left == right` failed: a * (b + c) != (a * b) + (a * c) for 2147483646, 1, 2147483519
145+ left: 4.6116857392545137e18
146+ right: 4.611685739254514e18" ) ,
147+ test_mul_by_int_is_associative => fail( r"assertion ` left == right` failed: (a * b) * c != a * (b * c) for 0.0000000004656612944634737, 3, 3
148+ left: 4.190951650171264e-9
149+ right: 4.190951650171263e-9" ) ,
150+ test_mul_by_int_is_distributive => fail( r"assertion ` left == right` failed: (a + b) * c != (a * c) + (b * c) for 1, 0.0000000004656613985469087, 3
151+ left: 3.0000000013969848
152+ right: 3.0000000013969843" ) ,
153+ test_div_by_int_is_associative => fail( r"assertion ` left == right` failed: (a / b) / c != a / (b * c) for 1, 3, 11
154+ left: 0.0303030303030303
155+ right: 0.030303030303030304" ) ,
156+ test_div_by_int_is_distributive => fail( r"assertion ` left == right` failed: (a + b) / c != (a / c) + (b / c) for 1, 2, 5
157+ left: 0.6
158+ right: 0.6000000000000001" ) ,
159159 test_sum,
160160 test_product,
161161 ) ;
0 commit comments