diff options
author | Josh Blum <josh@joshknows.com> | 2010-05-04 09:46:02 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-05-04 09:46:02 +0000 |
commit | 77b9aaf5bdb9c50a2456f1aa5e3498ec228ab679 (patch) | |
tree | 0192aed78f868048ae871c0ec5c079c1cbbd8e70 /host/test | |
parent | 8f21adbed40db490bec8ead6b8d50d2b3d1a4136 (diff) | |
download | uhd-77b9aaf5bdb9c50a2456f1aa5e3498ec228ab679.tar.gz uhd-77b9aaf5bdb9c50a2456f1aa5e3498ec228ab679.tar.bz2 uhd-77b9aaf5bdb9c50a2456f1aa5e3498ec228ab679.zip |
fix files before pull
Diffstat (limited to 'host/test')
-rw-r--r-- | host/test/error_test.cpp | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/host/test/error_test.cpp b/host/test/error_test.cpp index 3f2479f99..c76a15ab7 100644 --- a/host/test/error_test.cpp +++ b/host/test/error_test.cpp @@ -17,7 +17,6 @@ #include <boost/test/unit_test.hpp> #include <uhd/utils/assert.hpp> -//#include <boost/exception/diagnostic_information.hpp> #include <vector> #include <iostream> @@ -30,12 +29,20 @@ BOOST_AUTO_TEST_CASE(test_assert_has){ //verify the std::has utility BOOST_CHECK(std::has(vec, 2)); BOOST_CHECK(not std::has(vec, 1)); -/* + std::cout << "The output of the assert_has error:" << std::endl; try{ uhd::assert_has(vec, 1, "prime"); - }catch(const boost::exception &e){ - std::cout << boost::diagnostic_information(e) << std::endl; + }catch(const std::exception &e){ + std::cout << e.what() << std::endl; + } +} + +BOOST_AUTO_TEST_CASE(test_assert_throw){ + std::cout << "The output of the assert throw error:" << std::endl; + try{ + UHD_ASSERT_THROW(2 + 2 == 5); + }catch(const std::exception &e){ + std::cout << e.what() << std::endl; } -*/ } |