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

Function TestIndexingIntNegative

posting/index_test.go:49–55  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

47}
48
49func TestIndexingIntNegative(t *testing.T) {
50 require.NoError(t, schema.ParseBytes([]byte("age:int @index(int) ."), 1))
51 a, err := indexTokensForTest("age", "", types.Val{Tid: types.StringID, Value: []byte("-10")})
52 require.NoError(t, err)
53 require.EqualValues(t, []byte{0x6, 0x0, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf6},
54 []byte(a[0]))
55}
56
57func TestIndexingFloat(t *testing.T) {
58 require.NoError(t, schema.ParseBytes([]byte("age:float @index(float) ."), 1))

Callers

nothing calls this directly

Calls 2

ParseBytesFunction · 0.92
indexTokensForTestFunction · 0.85

Tested by

no test coverage detected