indexTokensForTest is just a wrapper around indexTokens used for convenience.
(attr, lang string, val types.Val)
| 29 | |
| 30 | // indexTokensForTest is just a wrapper around indexTokens used for convenience. |
| 31 | func indexTokensForTest(attr, lang string, val types.Val) ([]string, error) { |
| 32 | return indexTokens(context.Background(), &indexMutationInfo{ |
| 33 | tokenizers: schema.State().Tokenizer(context.Background(), x.AttrInRootNamespace(attr)), |
| 34 | edge: &pb.DirectedEdge{ |
| 35 | Attr: x.AttrInRootNamespace(attr), |
| 36 | Lang: lang, |
| 37 | }, |
| 38 | val: val, |
| 39 | }) |
| 40 | } |
| 41 | |
| 42 | func TestIndexingInt(t *testing.T) { |
| 43 | require.NoError(t, schema.ParseBytes([]byte("age:int @index(int) ."), 1)) |
no test coverage detected