From b095a4d9b7461eeef8bd59fb3e4d4dcc469ba4ec Mon Sep 17 00:00:00 2001 From: Jeancarlo Date: Mon, 20 Mar 2023 15:59:36 -0600 Subject: [PATCH] fix: added integer file to fix test; --- math/int_test.go | 2 +- math/testdata/integers.json | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 math/testdata/integers.json diff --git a/math/int_test.go b/math/int_test.go index 6ea405d7f57e..c86165c712ed 100644 --- a/math/int_test.go +++ b/math/int_test.go @@ -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) diff --git a/math/testdata/integers.json b/math/testdata/integers.json new file mode 100644 index 000000000000..0faa4f5fea4b --- /dev/null +++ b/math/testdata/integers.json @@ -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"] +]