MCPcopy
hub / github.com/dgraph-io/dgraph / TestAbruptSchemaQuery

Function TestAbruptSchemaQuery

dql/state_test.go:98–115  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

96}
97
98func TestAbruptSchemaQuery(t *testing.T) {
99 input := `
100 schema {
101 pred
102 `
103 l := lex.Lexer{
104 Input: input,
105 }
106 l.Run(lexTopLevel)
107 var typ lex.ItemType
108 it := l.NewIterator()
109 for it.Next() {
110 item := it.Item()
111 t.Log(item.String())
112 typ = item.Typ
113 }
114 require.Equal(t, lex.ItemError, typ)
115}
116
117func TestAbruptMutation(t *testing.T) {
118 input := `

Callers

nothing calls this directly

Calls 6

RunMethod · 0.95
NewIteratorMethod · 0.95
ItemMethod · 0.80
LogMethod · 0.80
NextMethod · 0.45
StringMethod · 0.45

Tested by

no test coverage detected