diff options
author | Josh Blum <josh@joshknows.com> | 2011-06-29 13:57:06 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-06-29 13:57:06 -0700 |
commit | bc8aaf3952f1c192030d1c9a0b6ddcbe14d9c062 (patch) | |
tree | 3ab8a27c2ccd0240925cde1c5a23f8b99af0c504 /host/tests | |
parent | d38757f4656028800e393c91bf3fec1986eb0200 (diff) | |
download | uhd-bc8aaf3952f1c192030d1c9a0b6ddcbe14d9c062.tar.gz uhd-bc8aaf3952f1c192030d1c9a0b6ddcbe14d9c062.tar.bz2 uhd-bc8aaf3952f1c192030d1c9a0b6ddcbe14d9c062.zip |
uhd: misc tweaks and also msvc compile
Diffstat (limited to 'host/tests')
-rw-r--r-- | host/tests/property_test.cpp | 7 |
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 |