diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2017-07-15 12:28:29 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2017-07-16 23:34:32 +0900 |
commit | d4f3d5a16423fbf039644f04516c052d1654326c (patch) | |
tree | 2cb3f9519a23e9e9c162d135636d9f99373deadc /src/pattern_test.go | |
parent | 7b5ccc45bc76f289fe2c48cf91e895b9ca99b1e2 (diff) |
Remove pointer indirection by changing Chunk definition
Diffstat (limited to 'src/pattern_test.go')
-rw-r--r-- | src/pattern_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pattern_test.go b/src/pattern_test.go index 9d66c798..5722be4a 100644 --- a/src/pattern_test.go +++ b/src/pattern_test.go @@ -139,7 +139,7 @@ func TestOrigTextAndTransformed(t *testing.T) { origBytes := []byte("junegunn.choi") for _, extended := range []bool{false, true} { chunk := Chunk{ - &Item{ + Item{ text: util.RunesToChars([]rune("junegunn")), origText: &origBytes, transformed: trans}, @@ -152,7 +152,7 @@ func TestOrigTextAndTransformed(t *testing.T) { t.Error("Invalid match result", matches) } - match, offsets, pos := pattern.MatchItem(chunk[0], true, slab) + match, offsets, pos := pattern.MatchItem(&chunk[0], true, slab) if !(match.item.text.ToString() == "junegunn" && string(*match.item.origText) == "junegunn.choi" && offsets[0][0] == 0 && offsets[0][1] == 5 && |