diff options
author | Josh Blum <josh@joshknows.com> | 2010-05-05 17:03:59 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-05-05 17:03:59 -0700 |
commit | f27400cd391d2d276df964d8c26ee08aa8ca3662 (patch) | |
tree | 084236f5fcdddf4aab1dc73ddf19bf02e716e0ea /host/test | |
parent | 3198ff91dcd3a06433654f9e50818f4566cbbe13 (diff) | |
download | uhd-f27400cd391d2d276df964d8c26ee08aa8ca3662.tar.gz uhd-f27400cd391d2d276df964d8c26ee08aa8ca3662.tar.bz2 uhd-f27400cd391d2d276df964d8c26ee08aa8ca3662.zip |
Removed the boost exception stuff, replaced it with macro that formats the throw site information.
SWIG didnt handle the boost exception stuff, even with custom exception wrappers.
Now the boost requirement can be lowered back to 3.6.
Diffstat (limited to 'host/test')
-rw-r--r-- | host/test/error_test.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/host/test/error_test.cpp b/host/test/error_test.cpp index c5b0af45e..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> @@ -34,7 +33,16 @@ BOOST_AUTO_TEST_CASE(test_assert_has){ 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; } } |