From d8b75ca5324204bfb3d7cdb1a03831d9ecd97e73 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Mon, 30 Sep 2019 16:35:51 +0200 Subject: Revert "uhd: Check property type at access; error if mismatch" This reverts commit 94592641f0647563bc4d2163805d5284a6796273. The commit itself was OK, but it changed the requirements such that UHD could only be compiled with C++11. --- host/tests/property_test.cpp | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) (limited to 'host/tests') diff --git a/host/tests/property_test.cpp b/host/tests/property_test.cpp index 732e3ca84..907ca9f73 100644 --- a/host/tests/property_test.cpp +++ b/host/tests/property_test.cpp @@ -239,6 +239,7 @@ BOOST_AUTO_TEST_CASE(test_prop_subtree) tree_dirs2.begin(), tree_dirs2.end(), subtree2_dirs.begin(), subtree2_dirs.end()); } + BOOST_AUTO_TEST_CASE(test_prop_operators) { uhd::fs_path path1 = "/root/"; @@ -258,22 +259,3 @@ BOOST_AUTO_TEST_CASE(test_prop_operators) path4 = path4 / x; BOOST_CHECK_EQUAL(path4, "/root/2"); } - -BOOST_AUTO_TEST_CASE(test_mismatched_type_access) -{ - uhd::property_tree::sptr tree = uhd::property_tree::make(); - - // accesses of the correct type should succeed - tree->create("/intprop"); - tree->create("/doubleprop"); - tree->create("/stringprop"); - BOOST_CHECK_NO_THROW(tree->access("/intprop")); - BOOST_CHECK_NO_THROW(tree->access("/doubleprop")); - BOOST_CHECK_NO_THROW(tree->access("/stringprop")); - - // accesses of the incorrect type should throw an exception - BOOST_CHECK_THROW(tree->access("/doubleprop"), uhd::runtime_error); - BOOST_CHECK_THROW(tree->access("/stringprop"), uhd::runtime_error); - BOOST_CHECK_THROW(tree->access("/intprop"), uhd::runtime_error); -} - -- cgit v1.2.3