(t *testing.T)
| 137 | } |
| 138 | |
| 139 | func TestVariables1(t *testing.T) { |
| 140 | input := ` |
| 141 | query testQuery($username: String!) { |
| 142 | me(_xid_: rick) { |
| 143 | _city |
| 144 | } |
| 145 | }` |
| 146 | l := lex.Lexer{ |
| 147 | Input: input, |
| 148 | } |
| 149 | l.Run(lexTopLevel) |
| 150 | it := l.NewIterator() |
| 151 | for it.Next() { |
| 152 | item := it.Item() |
| 153 | require.NotEqual(t, item.Typ, lex.ItemError) |
| 154 | t.Log(item.String(), item.Typ) |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | func TestVariables2(t *testing.T) { |
| 159 | input := ` |