aboutsummaryrefslogtreecommitdiff
path: root/lexer_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'lexer_test.go')
-rw-r--r--lexer_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/lexer_test.go b/lexer_test.go
index 785a810..27cdfed 100644
--- a/lexer_test.go
+++ b/lexer_test.go
@@ -4,12 +4,13 @@ import "testing"
func testInput(t *testing.T, ty int, s ...string) {
for _, input := range s {
+ yy := new(yySymType)
l := lex(input + "\n")
- typ, s := l.Lex()
+ typ := l.Lex(yy)
if input[0] == '\'' {
input = input[1 : len(input)-1]
}
- if typ != ty || s != input {
+ if typ != ty || yy.sval != input {
t.Error("expeced", input, "got", s)
}
}