From 3b9dbd4146fce2d5b7551ac65676da344ea6a18d Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Fri, 19 Jul 2019 06:23:18 +0200 Subject: Code cleanup: remove unnecessary string conversions (#1642) --- src/tokenizer_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tokenizer_test.go') 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 || -- cgit v1.2.3