diff options
Diffstat (limited to 'related/inverted_index_test.go')
-rw-r--r-- | related/inverted_index_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/related/inverted_index_test.go b/related/inverted_index_test.go index fdef06b13..7a3bd89c7 100644 --- a/related/inverted_index_test.go +++ b/related/inverted_index_test.go @@ -212,6 +212,19 @@ func TestToKeywordsToLower(t *testing.T) { }) } +func TestToKeywordsAnySlice(t *testing.T) { + c := qt.New(t) + var config IndexConfig + slice := []any{"A", 32, "C"} + keywords, err := config.ToKeywords(slice) + c.Assert(err, qt.IsNil) + c.Assert(keywords, qt.DeepEquals, []Keyword{ + StringKeyword("A"), + StringKeyword("32"), + StringKeyword("C"), + }) +} + func BenchmarkRelatedNewIndex(b *testing.B) { pages := make([]*testDoc, 100) numkeywords := 30 |