summaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/property_test.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/host/tests/property_test.cpp b/host/tests/property_test.cpp
index 20f6b6924..4c1aa046c 100644
--- a/host/tests/property_test.cpp
+++ b/host/tests/property_test.cpp
@@ -46,6 +46,11 @@ struct getter_type{
BOOST_AUTO_TEST_CASE(test_prop_simple){
uhd::property_tree::sptr tree = uhd::property_tree::make();
uhd::property<int> &prop = tree->create<int>("/");
+
+ BOOST_CHECK(prop.empty());
+ prop.set(0);
+ BOOST_CHECK(not prop.empty());
+
prop.set(42);
BOOST_CHECK_EQUAL(prop.get(), 42);
prop.set(34);
@@ -72,8 +77,10 @@ BOOST_AUTO_TEST_CASE(test_prop_with_publisher){
uhd::property_tree::sptr tree = uhd::property_tree::make();
uhd::property<int> &prop = tree->create<int>("/");
+ BOOST_CHECK(prop.empty());
getter_type getter;
prop.publish(boost::bind(&getter_type::doit, &getter));
+ BOOST_CHECK(not prop.empty());
getter._x = 42;
prop.set(0); //should not change