"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/math/big/ratconv_test.go" between
go1.16.4.src.tar.gz and go1.16.5.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language. Latest stable release (1.16).

ratconv_test.go  (go1.16.4.src):ratconv_test.go  (go1.16.5.src)
skipping to change at line 592 skipping to change at line 592
"8.192", "8.192",
"16.000", "16.000",
} { } {
x.SetString(want) x.SetString(want)
got := x.FloatString(3) got := x.FloatString(3)
if got != want { if got != want {
t.Errorf("got %s, want %s", got, want) t.Errorf("got %s, want %s", got, want)
} }
} }
} }
func TestIssue45910(t *testing.T) {
var x Rat
for _, test := range []struct {
input string
want bool
}{
{"1e-1000001", false},
{"1e-1000000", true},
{"1e+1000000", true},
{"1e+1000001", false},
{"0p1000000000000", true},
{"1p-10000001", false},
{"1p-10000000", true},
{"1p+10000000", true},
{"1p+10000001", false},
{"1.770p02041010010011001001", false}, // test case from issue
} {
_, got := x.SetString(test.input)
if got != test.want {
t.Errorf("SetString(%s) got ok = %v; want %v", test.input
, got, test.want)
}
}
}
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)