diff options
author | Josh Blum <josh@joshknows.com> | 2010-01-28 19:54:55 -0800 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-01-28 19:54:55 -0800 |
commit | d5d9da3114bf069c05a8dcb7fca32ccd70405512 (patch) | |
tree | 5c2c63efe9175ebd2b22c6b4899b997e9fed5b11 /test/wax_test.cpp | |
parent | fc1bffcfd9761c1f60cf322bb58e7f9c8096a5c0 (diff) | |
download | uhd-d5d9da3114bf069c05a8dcb7fca32ccd70405512.tar.gz uhd-d5d9da3114bf069c05a8dcb7fca32ccd70405512.tar.bz2 uhd-d5d9da3114bf069c05a8dcb7fca32ccd70405512.zip |
Added gain handler class to manage wildcard gain settings.
Gets overall gains and sets overall gains when used.
Wild card gain will be a gain with an empty string name.
Diffstat (limited to 'test/wax_test.cpp')
-rw-r--r-- | test/wax_test.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/wax_test.cpp b/test/wax_test.cpp index 353130410..294fe0be7 100644 --- a/test/wax_test.cpp +++ b/test/wax_test.cpp @@ -5,6 +5,15 @@ #include <boost/test/unit_test.hpp> #include <usrp_uhd/wax.hpp> +enum opt_a_t{OPTION_A_0, OPTION_A_1}; +enum opt_b_t{OPTION_B_0, OPTION_B_1}; + +BOOST_AUTO_TEST_CASE(test_enums){ + wax::type opta = OPTION_A_0; + BOOST_CHECK_THROW(wax::cast<opt_b_t>(opta), wax::bad_cast); + BOOST_CHECK_EQUAL(wax::cast<opt_a_t>(opta), OPTION_A_0); +} + /*********************************************************************** * demo class for wax framework **********************************************************************/ @@ -69,6 +78,10 @@ BOOST_AUTO_TEST_CASE(test_proxy){ std::cout << "store proxy" << std::endl; wax::proxy p = wd[size_t(0)][size_t(0)]; p[size_t(0)] = float(5); + + std::cout << "assign proxy" << std::endl; + wax::type a = p[size_t(0)]; + BOOST_CHECK_EQUAL(wax::cast<float>(a), float(5)); } BOOST_AUTO_TEST_CASE(test_print){ |