diff options
| author | Shulhan <ms@kilabit.info> | 2021-03-14 22:37:59 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-03-14 22:40:05 +0700 |
| commit | e7552ad0189f761875bc1c2ca3dd716d43a01e0d (patch) | |
| tree | fd68ec29d23fb9a807a7382088020e3b17d446fd /lib/math/big/float_test.go | |
| parent | 882727d89c8e7f9b9761009ccdca1af8c18d0a30 (diff) | |
| download | pakakeh.go-e7552ad0189f761875bc1c2ca3dd716d43a01e0d.tar.xz | |
all: refactoring the test.Assert and test.AssertBench signature
Previously, the test.Assert and test.AssertBench functions has the
boolean parameter to print the stack trace of test in case its not equal.
Since this parameter is not mandatory and its usually always set to
"true", we remove them from function signature to simplify the call
to Assert and AssertBench.
Diffstat (limited to 'lib/math/big/float_test.go')
| -rw-r--r-- | lib/math/big/float_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/math/big/float_test.go b/lib/math/big/float_test.go index aed8f21e..9876e7fc 100644 --- a/lib/math/big/float_test.go +++ b/lib/math/big/float_test.go @@ -23,7 +23,7 @@ func TestFloat_Clone(t *testing.T) { got := f.Clone() - test.Assert(t, "Clone", f.String(), got.String(), true) + test.Assert(t, "Clone", f.String(), got.String()) } func TestFloat_IsEqual(t *testing.T) { @@ -57,7 +57,7 @@ func TestFloat_IsEqual(t *testing.T) { for _, c := range cases { got := f.IsEqual(c.g) - test.Assert(t, "IsEqual", c.exp, got, true) + test.Assert(t, "IsEqual", c.exp, got) } } @@ -91,7 +91,7 @@ func TestFloat_Mul(t *testing.T) { f.Mul(g) got := f.String() - test.Assert(t, "Mul", c.exp, got, true) + test.Assert(t, "Mul", c.exp, got) } } @@ -120,7 +120,7 @@ func TestFloat_MulFloat64(t *testing.T) { f.Mul(c.g) got := f.String() - test.Assert(t, "MulFloat64", c.exp, got, true) + test.Assert(t, "MulFloat64", c.exp, got) } } @@ -158,7 +158,7 @@ func TestFloat_Quo(t *testing.T) { got := f.String() - test.Assert(t, "Quo", c.exp, got, true) + test.Assert(t, "Quo", c.exp, got) } } @@ -196,7 +196,7 @@ func TestFloat_QuoFloat64(t *testing.T) { got := f.String() - test.Assert(t, "Quo", c.exp, got, true) + test.Assert(t, "Quo", c.exp, got) } } @@ -246,7 +246,7 @@ func TestFloat_String_fromString(t *testing.T) { if err != nil { t.Fatal(err) } - test.Assert(t, c.in, c.exp, bf.String(), true) + test.Assert(t, c.in, c.exp, bf.String()) } } @@ -290,7 +290,7 @@ func TestFloat_String_fromFloat(t *testing.T) { for _, c := range cases { bf.SetFloat64(c.in) - test.Assert(t, c.exp, c.exp, bf.String(), true) + test.Assert(t, c.exp, c.exp, bf.String()) } } @@ -321,6 +321,6 @@ func TestFloat_UnmarshalJSON(t *testing.T) { t.Fatal(err) } - test.Assert(t, "", c.exp, got.V, true) + test.Assert(t, "", c.exp, got.V) } } |
