From f22e3c2d475f4579d9fdd0cd533c509a52a47ad1 Mon Sep 17 00:00:00 2001 From: Steven Koo Date: Wed, 6 Jan 2021 11:18:14 -0600 Subject: uhd: revert "Check property type at access..." This change reverts cb9329a681552e6ac6277d16e1627afcbb23e637. The type checking is causing some conversion issues on clang/macos. The type_index checking doesn't work correctly across shared libraries and should not be relied on to verify type, since it can vary from compiler to compiler. Signed-off-by: Steven Koo --- host/tests/property_test.cpp | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'host/tests') diff --git a/host/tests/property_test.cpp b/host/tests/property_test.cpp index dbd39000f..9776dd91b 100644 --- a/host/tests/property_test.cpp +++ b/host/tests/property_test.cpp @@ -265,21 +265,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