aboutsummaryrefslogtreecommitdiff
path: root/lexer_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2015-03-23 00:19:56 +0100
committerDimitri Sokolyuk <demon@dim13.org>2015-03-23 00:19:56 +0100
commit2da427d49c7c04b83f8ad81534db471d3037a41a (patch)
treec7d8332178dd4bf26be4d4d62622889ead7c9a3d /lexer_test.go
parent50d8fcfe69fce34fed41b006189fd827a124bf97 (diff)
Parser stub
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)
}
}