test(math): added integer file to fix test (#15490)

This commit is contained in:
Jeancarlo Barrios 2023-03-20 16:55:34 -06:00 committed by GitHub
parent 0d20a1456d
commit 8aa0d035d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View File

@ -432,7 +432,7 @@ func TestRoundTripMarshalToInt(t *testing.T) {
func TestFormatInt(t *testing.T) {
type integerTest []string
var testcases []integerTest
raw, err := os.ReadFile("../x/tx/textual/internal/testdata/integers.json")
raw, err := os.ReadFile("testdata/integers.json")
require.NoError(t, err)
err = json.Unmarshal(raw, &testcases)
require.NoError(t, err)

19
math/testdata/integers.json vendored Normal file
View File

@ -0,0 +1,19 @@
[
["0", "0"],
["1", "1"],
["12", "12"],
["123", "123"],
["1234", "1'234"],
["12345", "12'345"],
["123456", "123'456"],
["1234567", "1'234'567"],
["9007199254740991", "9'007'199'254'740'991"],
["9007199254740992", "9'007'199'254'740'992"],
["18446744073709551615", "18'446'744'073'709'551'615"],
["18446744073709551616", "18'446'744'073'709'551'616"],
["340282366920938463463374607431768211455", "340'282'366'920'938'463'463'374'607'431'768'211'455"],
["01", "1"],
["001", "1"],
["0001", "1"],
["00001", "1"]
]