0
0
Fork 0

add test of location field

This commit is contained in:
Marty Schoch 2017-12-05 12:20:06 -05:00
parent 8f0350865b
commit 8d9d45115f
1 changed files with 6 additions and 0 deletions

View File

@ -273,6 +273,9 @@ func TestSingle(t *testing.T) {
var numLocs uint64
for _, loc := range nextPosting.Locations() {
numLocs++
if loc.Field() != "name" {
t.Errorf("expected loc field to be 'name', got '%s'", loc.Field())
}
if loc.Start() != 0 {
t.Errorf("expected loc start to be 0, got %d", loc.Start())
}
@ -339,6 +342,9 @@ func TestSingle(t *testing.T) {
var numLocs uint64
for _, loc := range nextPosting.Locations() {
numLocs++
if loc.Field() != "name" {
t.Errorf("expected loc field to be 'name', got '%s'", loc.Field())
}
if loc.Start() != 0 {
t.Errorf("expected loc start to be 0, got %d", loc.Start())
}