aboutsummaryrefslogtreecommitdiff
path: root/spec/lexer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lexer_test.go')
-rw-r--r--spec/lexer_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lexer_test.go b/spec/lexer_test.go
index 569f278..e016def 100644
--- a/spec/lexer_test.go
+++ b/spec/lexer_test.go
@@ -24,6 +24,10 @@ func TestLexer_Run(t *testing.T) {
return newPositionToken(num, newPosition(1))
}
+ invalidTok := func(text string) *token {
+ return newInvalidToken(text, newPosition(1))
+ }
+
tests := []struct {
caption string
src string
@@ -131,7 +135,7 @@ bar // This is the fourth comment.
src: `abc!!!def`,
tokens: []*token{
idTok("abc"),
- newInvalidToken("!!!"),
+ invalidTok("!!!"),
idTok("def"),
newEOFToken(),
},