mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
Add parse "122.416294033786585" test case
This commit is contained in:
1 parent
1d19157668
commit
75faea996d
2 files changed
+16
No files matched your search
@@ -126,6 +126,10 @@ var f64TestCases = []float64{
|
||||
6.022141e23,
|
||||
6.0221408e23,
|
||||
6.02214076e23,
|
||||
|
||||
// Some "parse to float64" implementations find this one tricky.
|
||||
// https://github.com/serde-rs/json/issues/707
|
||||
122.416294033786585,
|
||||
}
|
||||
|
||||
var u64TestCases = []uint64{
|
||||
|
||||
@@ -1008,6 +1008,9 @@ test_wuffs_strconv_parse_number_f64_regular() {
|
||||
{.want = 0x4038000000000000, .str = "2.4E1"},
|
||||
{.want = 0x4038000000000000, .str = "24"},
|
||||
{.want = 0x4038000000000000, .str = "2400_00000_00000.00000_e-_1_2"},
|
||||
{.want = 0x405E9AA48FBB2888, .str = "122.416294033786585"},
|
||||
{.want = 0x405E9AA48FBB2888, .str = "122.41629403378658"},
|
||||
{.want = 0x405E9AA48FBB2889, .str = "122.4162940337866"},
|
||||
{.want = 0x40FE240C9FCB0C02, .str = "123456.789012"},
|
||||
{.want = 0x41E0246690000001,
|
||||
.str = "2.16656806400000023841857910156251e9"},
|
||||
@@ -1709,6 +1712,15 @@ test_wuffs_strconv_render_number_f64() {
|
||||
.want_3f = "24.000",
|
||||
.want_4g = "24",
|
||||
},
|
||||
{
|
||||
.x = 0x405E9AA48FBB2888,
|
||||
.want__e = "1.2241629403378658e+02",
|
||||
.want__f = "122.41629403378658",
|
||||
.want_0g = "1e+02",
|
||||
.want_2e = "1.22e+02",
|
||||
.want_3f = "122.416",
|
||||
.want_4g = "122.4",
|
||||
},
|
||||
{
|
||||
.x = 0x40FE240C9FCB0C02,
|
||||
.want__e = "1.23456789012e+05",
|
||||
|
||||
Reference in new issue
Block a user