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

Function TestVariables2

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

Source from the content-addressed store, hash-verified

156}
157
158func TestVariables2(t *testing.T) {
159 input := `
160 query testQuery ($username: String, $id: int, $email: string) {
161 me(_xid_: rick) {
162 _city
163 }
164 }`
165 l := lex.Lexer{
166 Input: input,
167 }
168 l.Run(lexTopLevel)
169 it := l.NewIterator()
170 for it.Next() {
171 item := it.Item()
172 require.NotEqual(t, item.Typ, lex.ItemError)
173 t.Log(item.String(), item.Typ)
174 }
175}
176
177func TestVariablesDefault(t *testing.T) {
178 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