Skip to content

Commit

Permalink
Add extra test case for GeoJSON feature marshal/unmarshal
Browse files Browse the repository at this point in the history
  • Loading branch information
peterstace committed May 6, 2024
1 parent 5c5f07a commit 4186adc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions geom/geojson_feature_collection_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,11 @@ func TestGeoJSONForeignMembers(t *testing.T) {
members: map[string]interface{}{"foo": "bar", "baz": 42.0},
json: `{"type":"Feature","geometry":{"type":"Point","coordinates":[0,0]},"properties":{},"baz":42,"foo":"bar"}`,
},
{
name: "nested",
members: map[string]interface{}{"metadata": map[string]interface{}{"foo": "bar", "baz": 42.0}},
json: `{"type":"Feature","geometry":{"type":"Point","coordinates":[0,0]},"properties":{},"metadata":{"baz":42,"foo":"bar"}}`,
},
} {
t.Run(tc.name, func(t *testing.T) {
t.Run("marshal", func(t *testing.T) {
Expand Down

0 comments on commit 4186adc

Please sign in to comment.