0
0
Fork 0

add test for postings list count method

This commit is contained in:
Marty Schoch 2017-12-05 13:01:36 -05:00
parent 30e9d6daa5
commit f6be841668
1 changed files with 5 additions and 0 deletions

View File

@ -668,6 +668,11 @@ func TestMultiple(t *testing.T) {
t.Fatal("got nil postings list, expected non-nil")
}
postingsListExcludingCount := postingsListExcluding.Count()
if postingsListExcludingCount != 1 {
t.Errorf("expected count from postings list to be 1, got %d", postingsListExcludingCount)
}
postingsItrExcluding := postingsListExcluding.Iterator()
if postingsItr == nil {
t.Fatal("got nil iterator, expected non-nil")