summaryrefslogtreecommitdiff
path: root/test/test-persistence.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-01 19:13:38 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-11-07 16:41:37 +0000
commit83a501ea0e93f09425c04af8c76d1ebba842fdca (patch)
tree748dbf44c29cd99b085cb8c327f0d69c5da8da3a /test/test-persistence.cpp
parentStandard wrapper in failure cases (diff)
downloadilt-83a501ea0e93f09425c04af8c76d1ebba842fdca.tar.bz2
ilt-83a501ea0e93f09425c04af8c76d1ebba842fdca.tar.xz
ilt-83a501ea0e93f09425c04af8c76d1ebba842fdca.zip
Test case for named type not existing
Diffstat (limited to 'test/test-persistence.cpp')
-rw-r--r--test/test-persistence.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test-persistence.cpp b/test/test-persistence.cpp
index a7b328d..f94ca81 100644
--- a/test/test-persistence.cpp
+++ b/test/test-persistence.cpp
@@ -159,6 +159,11 @@ BOOST_DATA_TEST_CASE_F(JPP, various_parse_failures, fixtures_in(FIXTURESDIR "jso
BOOST_CHECK_THROW(load_json<std::unique_ptr<TestObject>>(path), std::runtime_error);
}
+BOOST_FIXTURE_TEST_CASE(load_obj_no_such_type, JPP)
+{
+ BOOST_CHECK_THROW(load_json<std::unique_ptr<TestObject>>(FIXTURESDIR "json/bad_type.json"), std::out_of_range);
+}
+
BOOST_FIXTURE_TEST_CASE(load_abs_object, JPP)
{
auto to = load_json<std::unique_ptr<TestObject>>(FIXTURESDIR "json/abs.json");