aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_factory.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-11-26 15:47:57 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-11-29 00:35:25 +0100
commit67758b2c67ea329116b59818c038797667c4e1d1 (patch)
tree7e6b4ead6cbe9251ea5ef64d6c45179287597b2e /test/unit/test_factory.cpp
parent7e05bd0ff52fe3ba78dfd75f9ebebe3dfe715bca (diff)
downloadPROJ-67758b2c67ea329116b59818c038797667c4e1d1.tar.gz
PROJ-67758b2c67ea329116b59818c038797667c4e1d1.zip
Redirect epsg:XXXX and IGNF:XXXX CRS expansions to the database, and remove the data/epsg and data/IGNF files
Diffstat (limited to 'test/unit/test_factory.cpp')
-rw-r--r--test/unit/test_factory.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/test_factory.cpp b/test/unit/test_factory.cpp
index 739bb729..20869d91 100644
--- a/test/unit/test_factory.cpp
+++ b/test/unit/test_factory.cpp
@@ -2729,4 +2729,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