File: field_geopoint_test.go

package info (click to toggle)
golang-github-blevesearch-bleve 0.5.0%2Bgit20170912.278.6eea5b78-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,764 kB
  • sloc: yacc: 311; sh: 51; makefile: 7
file content (14 lines) | stat: -rw-r--r-- 317 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package document

import "testing"

func TestGeoPointField(t *testing.T) {
	gf := NewGeoPointField("loc", []uint64{}, 0.0015, 0.0015)
	numTokens, tokenFreqs := gf.Analyze()
	if numTokens != 8 {
		t.Errorf("expected 8 tokens, got %d", numTokens)
	}
	if len(tokenFreqs) != 8 {
		t.Errorf("expected 8 token freqs")
	}
}