diff options
author | Christian Muehlhaeuser <muesli@gmail.com> | 2019-07-19 06:23:18 +0200 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2019-07-19 13:23:18 +0900 |
commit | 3b9dbd4146fce2d5b7551ac65676da344ea6a18d (patch) | |
tree | 64c787eca30de71f55bcd42b25ca5f9f66e251c9 /src/tokenizer_test.go | |
parent | a1260feeed0cc565dfe3cca9927e1f21af7c80ef (diff) |
Code cleanup: remove unnecessary string conversions (#1642)
Diffstat (limited to 'src/tokenizer_test.go')
-rw-r--r-- | src/tokenizer_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tokenizer_test.go b/src/tokenizer_test.go index 0bdd0c19..985cef9f 100644 --- a/src/tokenizer_test.go +++ b/src/tokenizer_test.go @@ -73,7 +73,7 @@ func TestTransform(t *testing.T) { { ranges := splitNth("1,2,3") tx := Transform(tokens, ranges) - if string(joinTokens(tx)) != "abc: def: ghi: " { + if joinTokens(tx) != "abc: def: ghi: " { t.Errorf("%s", tx) } } @@ -95,7 +95,7 @@ func TestTransform(t *testing.T) { { ranges := splitNth("1..2,3,2..,1") tx := Transform(tokens, ranges) - if string(joinTokens(tx)) != " abc: def: ghi: def: ghi: jkl abc:" || + if joinTokens(tx) != " abc: def: ghi: def: ghi: jkl abc:" || len(tx) != 4 || tx[0].text.ToString() != " abc: def:" || tx[0].prefixLength != 0 || tx[1].text.ToString() != " ghi:" || tx[1].prefixLength != 12 || |