diff options
Diffstat (limited to 'test/yaml-parser.cpp')
-rw-r--r-- | test/yaml-parser.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/yaml-parser.cpp b/test/yaml-parser.cpp index 34799983..4cc77e26 100644 --- a/test/yaml-parser.cpp +++ b/test/yaml-parser.cpp @@ -536,6 +536,12 @@ protected: return TestFail; } + /* Test access to nonexistent member. */ + if (dictObj["nonexistent"].get<std::string>("default") != "default") { + cerr << "Accessing nonexistent dict entry fails to return default" << std::endl; + return TestFail; + } + /* Make sure utils::map_keys() works on the adapter. */ (void)utils::map_keys(dictObj.asDict()); |