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

Function TestParse4_Error

schema/parse_test.go:241–247  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

239}
240
241func TestParse4_Error(t *testing.T) {
242 reset()
243 result, err := Parse("alive:bool @index(geo) .")
244 require.Contains(t, err.Error(),
245 "Tokenizer: geo isn't valid for predicate: alive of type: bool")
246 require.Nil(t, result)
247}
248
249func TestParse4_NoError(t *testing.T) {
250 reset()

Callers

nothing calls this directly

Calls 3

resetFunction · 0.85
ParseFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected