diff --git a/gql/state_test.go b/gql/state_test.go index 69ff92730141c52d6282dc956dd4dc359fc9bd39..ce59d7e58090bb33a0dd2a3d52b776b02be8d43d 100644 --- a/gql/state_test.go +++ b/gql/state_test.go @@ -34,7 +34,8 @@ func TestNewLexer(t *testing.T) { } } }` - l := lex.NewLexer(input) + l := &lex.Lexer{} + l.Init(input) go run(l) for item := range l.Items { if item.Typ == lex.ItemError { @@ -61,7 +62,8 @@ func TestNewLexerMutation(t *testing.T) { _city } }` - l := lex.NewLexer(input) + l := &lex.Lexer{} + l.Init(input) go run(l) for item := range l.Items { if item.Typ == lex.ItemError { @@ -79,7 +81,8 @@ func TestAbruptMutation(t *testing.T) { Why is this #!!? How is this? }` - l := lex.NewLexer(input) + l := &lex.Lexer{} + l.Init(input) go run(l) var typ lex.ItemType for item := range l.Items {