aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/property_test.cpp
diff options
context:
space:
mode:
authorSteven Koo <steven.koo@ni.com>2021-01-06 11:18:14 -0600
committerAaron Rossetto <aaron.rossetto@ni.com>2021-01-08 11:23:17 -0600
commitf22e3c2d475f4579d9fdd0cd533c509a52a47ad1 (patch)
treef0a5356ac4597455b095e01467ef7e791ec1511e /host/tests/property_test.cpp
parent9f3ec1c5ab3cc4b5ced2048a8666dd66b743cc99 (diff)
downloaduhd-f22e3c2d475f4579d9fdd0cd533c509a52a47ad1.tar.gz
uhd-f22e3c2d475f4579d9fdd0cd533c509a52a47ad1.tar.bz2
uhd-f22e3c2d475f4579d9fdd0cd533c509a52a47ad1.zip
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 <steven.koo@ni.com>
Diffstat (limited to 'host/tests/property_test.cpp')
-rw-r--r--host/tests/property_test.cpp18
1 files changed, 0 insertions, 18 deletions
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<int>("/intprop");
- tree->create<double>("/doubleprop");
- tree->create<std::string>("/stringprop");
- BOOST_CHECK_NO_THROW(tree->access<int>("/intprop"));
- BOOST_CHECK_NO_THROW(tree->access<double>("/doubleprop"));
- BOOST_CHECK_NO_THROW(tree->access<std::string>("/stringprop"));
-
- // accesses of the incorrect type should throw an exception
- BOOST_CHECK_THROW(tree->access<int>("/doubleprop"), uhd::runtime_error);
- BOOST_CHECK_THROW(tree->access<double>("/stringprop"), uhd::runtime_error);
- BOOST_CHECK_THROW(tree->access<std::string>("/intprop"), uhd::runtime_error);
-}