Skip to content

Commit

Permalink
add third point to test
Browse files Browse the repository at this point in the history
removes any possible confusion around slice len 2
checks in the geo parsing code
  • Loading branch information
mschoch authored and abhinavdangeti committed Jan 14, 2021
1 parent 2d8bf81 commit 47cd3ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mapping/mapping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1192,6 +1192,7 @@ func TestMappingArrayOfStringGeoPoints(t *testing.T) {
"points": []string {
"1.0, 2.0",
"3.0, 4.0",
"5.0, 6.0",
},
}

Expand All @@ -1205,6 +1206,7 @@ func TestMappingArrayOfStringGeoPoints(t *testing.T) {
expectPoints := map[string][]float64{
"first": {2.0, 1.0},
"second": {4.0, 3.0},
"third": {6.0, 5.0},
}

for _, f := range doc.Fields {
Expand Down Expand Up @@ -1237,4 +1239,4 @@ func TestMappingArrayOfStringGeoPoints(t *testing.T) {
t.Errorf("some points not found: %v", expectPoints)
}

}
}

0 comments on commit 47cd3ee

Please sign in to comment.