Skip to content

Commit 85ae4f3

Browse files
Karel Bilekwadey
Karel Bilek
andauthored
Better test printing (#9)
* Better test printing The current test results are confusing as they are written as rationals. Let's write them as float strings. * Update round_test.go lets print both args the same to make it even easier Co-authored-by: Wade Simmons <[email protected]>
1 parent cd93292 commit 85ae4f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

round_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func testRounding(t *testing.T, a, b string, prec int, method RoundingMode) {
184184
Round(x, prec, method)
185185

186186
if x.Cmp(y) != 0 {
187-
t.Errorf("test Round(%v, %v, %v) == %s. Got %v", a, prec, method, y, x)
187+
t.Errorf("test Round(%v, %v, %v) == %s. Got %v", a, prec, method, y.FloatString(3), x.FloatString(3))
188188
}
189189
}
190190

0 commit comments

Comments
 (0)