Some checks failed
Coverage / coverage (push) Failing after 6s
Tests / test (1.24.x, ubuntu-latest) (push) Failing after 42s
Tests / test (1.26.x, ubuntu-latest) (push) Failing after 38s
Tests / test (1.25.x, ubuntu-latest) (push) Failing after 35s
Tests / test (1.25.x, windows-latest) (push) Has been cancelled
Tests / test (1.26.x, macos-latest) (push) Has been cancelled
Tests / test (1.26.x, windows-latest) (push) Has been cancelled
Tests / test (1.24.x, macos-latest) (push) Has been cancelled
Tests / test (1.24.x, windows-latest) (push) Has been cancelled
Tests / test (1.25.x, macos-latest) (push) Has been cancelled
17 lines
371 B
Go
17 lines
371 B
Go
package document
|
|
|
|
import "testing"
|
|
|
|
func TestGeoPointField(t *testing.T) {
|
|
gf := NewGeoPointField("loc", []uint64{}, 0.0015, 0.0015)
|
|
gf.Analyze()
|
|
numTokens := gf.AnalyzedLength()
|
|
tokenFreqs := gf.AnalyzedTokenFrequencies()
|
|
if numTokens != 8 {
|
|
t.Errorf("expected 8 tokens, got %d", numTokens)
|
|
}
|
|
if len(tokenFreqs) != 8 {
|
|
t.Errorf("expected 8 token freqs")
|
|
}
|
|
}
|