Skip to content

Commit

Permalink
test(math): added integer file to fix test (#15490)
Browse files Browse the repository at this point in the history
  • Loading branch information
JeancarloBarrios authored Mar 20, 2023
1 parent 0d20a14 commit 8aa0d03
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion math/int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
19 changes: 19 additions & 0 deletions math/testdata/integers.json
Original file line number Diff line number Diff line change
@@ -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"]
]

0 comments on commit 8aa0d03

Please sign in to comment.