diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-09-17 20:42:22 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-09-17 20:42:22 +0200 |
| commit | 483717e59333f33e758485c104474ca10e0682ec (patch) | |
| tree | 1c931c9f490732001b3caab568b872f70ff5436a /test/unit | |
| parent | 2db54cc09a6587eba855aebac05baa1ae5130c2c (diff) | |
| download | PROJ-483717e59333f33e758485c104474ca10e0682ec.tar.gz PROJ-483717e59333f33e758485c104474ca10e0682ec.zip | |
test: getInsertStatementsFor(): test datums with anchor
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/test_factory.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 50a4b971..eb362415 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -3871,7 +3871,7 @@ TEST(factory, objectInsertion) { ctxt->startInsertStatementsSession(); const auto datum = GeodeticReferenceFrame::create( PropertyMap().set(IdentifiedObject::NAME_KEY, "my datum"), - Ellipsoid::WGS84, optional<std::string>(), + Ellipsoid::WGS84, optional<std::string>("my anchor"), PrimeMeridian::GREENWICH); const auto crs = GeographicCRS::create( PropertyMap().set(IdentifiedObject::NAME_KEY, "my EPSG:4326"), @@ -3881,8 +3881,8 @@ TEST(factory, objectInsertion) { ASSERT_EQ(sql.size(), 4U); EXPECT_EQ(sql[0], "INSERT INTO geodetic_datum VALUES('HOBU','1','my " - "datum','','EPSG','7030','EPSG','8901',NULL,NULL,NULL,NULL," - "0);"); + "datum','','EPSG','7030','EPSG','8901',NULL,NULL,NULL," + "'my anchor',0);"); const auto identified = crs->identify(AuthorityFactory::create(ctxt, std::string())); ASSERT_EQ(identified.size(), 1U); @@ -4171,7 +4171,8 @@ TEST(factory, objectInsertion) { ctxt->startInsertStatementsSession(); PropertyMap propertiesVDatum; propertiesVDatum.set(IdentifiedObject::NAME_KEY, "my datum"); - auto vdatum = VerticalReferenceFrame::create(propertiesVDatum); + auto vdatum = VerticalReferenceFrame::create( + propertiesVDatum, optional<std::string>("my anchor")); PropertyMap propertiesCRS; propertiesCRS.set(IdentifiedObject::NAME_KEY, "my height"); const auto crs = VerticalCRS::create( @@ -4180,10 +4181,9 @@ TEST(factory, objectInsertion) { const auto sql = ctxt->getInsertStatementsFor(crs, "HOBU", "XXXX", false); ASSERT_EQ(sql.size(), 4U); - EXPECT_EQ(sql[0], - "INSERT INTO vertical_datum VALUES('HOBU'," - "'VERTICAL_DATUM_XXXX','my datum','',NULL,NULL,NULL,NULL," - "0);"); + EXPECT_EQ(sql[0], "INSERT INTO vertical_datum VALUES('HOBU'," + "'VERTICAL_DATUM_XXXX','my datum','',NULL,NULL,NULL," + "'my anchor',0);"); const auto identified = crs->identify(AuthorityFactory::create(ctxt, std::string())); ASSERT_EQ(identified.size(), 1U); |
