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/strings/string_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/strings/string_test.go')
| -rw-r--r-- | lib/strings/string_test.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/strings/string_test.go b/lib/strings/string_test.go index 1d404a24..62433dd2 100644 --- a/lib/strings/string_test.go +++ b/lib/strings/string_test.go @@ -24,7 +24,7 @@ func TestCleanURI(t *testing.T) { for _, c := range cases { got := CleanURI(c.text) - test.Assert(t, "", c.exp, got, true) + test.Assert(t, "", c.exp, got) } } @@ -72,7 +72,7 @@ func TestCleanWikiMarkup(t *testing.T) { for _, c := range cases { got := CleanWikiMarkup(c.text) - test.Assert(t, "", c.exp, got, true) + test.Assert(t, "", c.exp, got) } } @@ -96,7 +96,7 @@ func TestMergeSpaces(t *testing.T) { for _, c := range cases { got := MergeSpaces(c.text, c.withline) - test.Assert(t, "", c.exp, got, true) + test.Assert(t, "", c.exp, got) } } @@ -112,7 +112,7 @@ func TestReverse(t *testing.T) { for _, c := range cases { got := Reverse(c.input) - test.Assert(t, "Reverse", c.exp, got, true) + test.Assert(t, "Reverse", c.exp, got) } } @@ -128,7 +128,7 @@ func TestSingleSpace(t *testing.T) { }} for _, c := range cases { got := SingleSpace(c.in) - test.Assert(t, c.in, c.exp, got, true) + test.Assert(t, c.in, c.exp, got) } } @@ -160,7 +160,7 @@ func TestSplit(t *testing.T) { for _, c := range cases { got := Split(c.text, true, true) - test.Assert(t, "", c.exp, got, true) + test.Assert(t, "", c.exp, got) } } @@ -182,6 +182,6 @@ func TestTrimNonAlnum(t *testing.T) { for _, c := range cases { got := TrimNonAlnum(c.text) - test.Assert(t, "", c.exp, got, true) + test.Assert(t, "", c.exp, got) } } |
