Skip to content

Commit

Permalink
test: don't export tokenizer fixtures
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Bezzubov <[email protected]>
  • Loading branch information
bzz committed Apr 16, 2019
1 parent 6c7b91c commit 7e136ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/tokenizer/tokenize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ var (
"-", "|", "+", "&&", "<", "<", "-", "!", "!", "!", "=", "=", "!", ":", "=", ":", "=", ",", ",", "=", ">", ">", "=", "=", "=", "=", ">",
"'", ",", ">", "=", ">", "=", "=", ">", "=", ">", ":", ">", "=", ">"}

Tests = []struct {
tests = []struct {
name string
content []byte
expected []string
Expand All @@ -101,7 +101,7 @@ var (
)

func TestTokenize(t *testing.T) {
for _, test := range Tests {
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
before := string(test.content)
tokens := Tokenize(test.content)
Expand All @@ -118,7 +118,7 @@ func TestTokenize(t *testing.T) {
func BenchmarkTokenizer_BaselineCopy(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for _, test := range Tests {
for _, test := range tests {
if len(test.content) > ByteLimit {
test.content = test.content[:ByteLimit]
}
Expand All @@ -130,7 +130,7 @@ func BenchmarkTokenizer_BaselineCopy(b *testing.B) {
func BenchmarkTokenizer(b *testing.B) {
b.ReportAllocs()
for i := 0; i < b.N; i++ {
for _, test := range Tests {
for _, test := range tests {
Tokenize(test.content)
}
}
Expand Down

0 comments on commit 7e136ba

Please sign in to comment.