diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/test_io.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 74ef82f3..e1d424e9 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -11323,3 +11323,28 @@ TEST(json_import, derived_temporal_crs) { ASSERT_TRUE(crs != nullptr); EXPECT_EQ(crs->exportToJSON((JSONFormatter::create().get())), json); } + +// --------------------------------------------------------------------------- + +TEST(json_import, multiple_ids) { + auto json = "{\n" + " \"type\": \"Ellipsoid\",\n" + " \"name\": \"WGS 84\",\n" + " \"semi_major_axis\": 6378137,\n" + " \"inverse_flattening\": 298.257223563,\n" + " \"ids\": [\n" + " {\n" + " \"authority\": \"EPSG\",\n" + " \"code\": 4326\n" + " },\n" + " {\n" + " \"authority\": \"FOO\",\n" + " \"code\": \"BAR\"\n" + " }\n" + " ]\n" + "}"; + auto obj = createFromUserInput(json, nullptr); + auto ellps = nn_dynamic_pointer_cast<Ellipsoid>(obj); + ASSERT_TRUE(ellps != nullptr); + EXPECT_EQ(ellps->exportToJSON((JSONFormatter::create().get())), json); +} |
