improving coverage in top score collector
This commit is contained in:
parent
267811a6d2
commit
ce87f46403
|
@ -80,6 +80,17 @@ func TestTop10Scores(t *testing.T) {
|
|||
|
||||
collector := NewTopScorerCollector(10)
|
||||
collector.Collect(searcher)
|
||||
|
||||
maxScore := collector.MaxScore()
|
||||
if maxScore != 99.0 {
|
||||
t.Errorf("expected max score 99.0, got %f", maxScore)
|
||||
}
|
||||
|
||||
total := collector.Total()
|
||||
if total != 14 {
|
||||
t.Errorf("expected 14 total results, got %d", total)
|
||||
}
|
||||
|
||||
results := collector.Results()
|
||||
|
||||
if len(results) != 10 {
|
||||
|
|
Loading…
Reference in New Issue