diff options
| author | Even Rouault <even.rouault@mines-paris.org> | 2018-12-03 17:20:48 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-12-03 17:20:48 +0100 |
| commit | d0506e19a71888f7f0c3aa8618d919624e754c4d (patch) | |
| tree | 4468cd5ef29f3f7f6ce2ed950b5d1938cfbf84b5 /test/unit/test_factory.cpp | |
| parent | 4794d755a8dea4f4501c61e896e1829bb720e69a (diff) | |
| parent | ba111ac8323ff194039a06db87d1fb17ed8175b3 (diff) | |
| download | PROJ-d0506e19a71888f7f0c3aa8618d919624e754c4d.tar.gz PROJ-d0506e19a71888f7f0c3aa8618d919624e754c4d.zip | |
Merge pull request #1182 from rouault/plug_new_code
Remove data/epsg, IGNF and esri.* files / support legacy +init=epsg:XXXX syntax
Diffstat (limited to 'test/unit/test_factory.cpp')
| -rw-r--r-- | test/unit/test_factory.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp index 739bb729..7cdb0b40 100644 --- a/test/unit/test_factory.cpp +++ b/test/unit/test_factory.cpp @@ -2703,6 +2703,13 @@ TEST(factory, createObjectsFromName) { .size(), 1); + // Deprecated object (but without explicit deprecated) + EXPECT_EQ( + factoryEPSG + ->createObjectsFromName("NAD27(CGQ77) / SCoPQ zone 2", {}, false, 2) + .size(), + 1); + const auto types = std::vector<AuthorityFactory::ObjectType>{ AuthorityFactory::ObjectType::PRIME_MERIDIAN, AuthorityFactory::ObjectType::ELLIPSOID, @@ -2729,4 +2736,14 @@ TEST(factory, createObjectsFromName) { factory->createObjectsFromName("i_dont_exist", types, false, 1); } +// --------------------------------------------------------------------------- + +TEST(factory, getMetadata) { + auto ctxt = DatabaseContext::create(); + EXPECT_EQ(ctxt->getMetadata("i_do_not_exist"), nullptr); + const char *IGNF_VERSION = ctxt->getMetadata("IGNF.VERSION"); + ASSERT_TRUE(IGNF_VERSION != nullptr); + EXPECT_EQ(std::string(IGNF_VERSION), "3.0.2"); +} + } // namespace |
