(t *testing.T)
| 38 | } |
| 39 | |
| 40 | func TestMutationLexing(t *testing.T) { |
| 41 | input := ` |
| 42 | mutation { |
| 43 | set { |
| 44 | What is <this> . |
| 45 | Why is this #!!? |
| 46 | How is this? |
| 47 | } |
| 48 | delete { |
| 49 | Why is this |
| 50 | } |
| 51 | } |
| 52 | query { |
| 53 | me(_xid_: rick) { |
| 54 | _city |
| 55 | } |
| 56 | }` |
| 57 | l := &lex.Lexer{} |
| 58 | l.Reset(input) |
| 59 | l.Run(lexTopLevel) |
| 60 | it := l.NewIterator() |
| 61 | for it.Next() { |
| 62 | item := it.Item() |
| 63 | require.NotEqual(t, item.Typ, lex.ItemError, "Error: %v", item.String()) |
| 64 | t.Log(item.String()) |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | func TestNewSchemaQuery(t *testing.T) { |
| 69 | input := ` |