diff options
| author | Josh Blum <josh@joshknows.com> | 2011-05-04 18:36:10 -0700 | 
|---|---|---|
| committer | Josh Blum <josh@joshknows.com> | 2011-05-04 18:36:10 -0700 | 
| commit | 7f01386f63850d9e13afb4033d1fae39f6a03764 (patch) | |
| tree | fb68a49ac4d5a41c0af5e4135786c5f169211673 /host/tests | |
| parent | e71d2833fbc2d9b87a8367b6ddc4388c3f182d93 (diff) | |
| download | uhd-7f01386f63850d9e13afb4033d1fae39f6a03764.tar.gz uhd-7f01386f63850d9e13afb4033d1fae39f6a03764.tar.bz2 uhd-7f01386f63850d9e13afb4033d1fae39f6a03764.zip  | |
uhd: replaced warning post with calls to UHD_MSG(warning)
The message api can support warnings, error, and status messages.
The default handler is to stdio, but the user can change this.
Diffstat (limited to 'host/tests')
| -rw-r--r-- | host/tests/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | host/tests/msg_test.cpp (renamed from host/tests/warning_test.cpp) | 18 | 
2 files changed, 15 insertions, 5 deletions
diff --git a/host/tests/CMakeLists.txt b/host/tests/CMakeLists.txt index f08fe669b..b38afccf0 100644 --- a/host/tests/CMakeLists.txt +++ b/host/tests/CMakeLists.txt @@ -26,12 +26,12 @@ SET(test_sources      dict_test.cpp      error_test.cpp      gain_group_test.cpp +    msg_test.cpp      ranges_test.cpp      subdev_spec_test.cpp      time_spec_test.cpp      tune_helper_test.cpp      vrt_test.cpp -    warning_test.cpp      wax_test.cpp  ) diff --git a/host/tests/warning_test.cpp b/host/tests/msg_test.cpp index 3394f84d4..495907504 100644 --- a/host/tests/warning_test.cpp +++ b/host/tests/msg_test.cpp @@ -16,14 +16,24 @@  //  #include <boost/test/unit_test.hpp> -#include <uhd/utils/warning.hpp> +#include <uhd/utils/msg.hpp>  #include <iostream> -BOOST_AUTO_TEST_CASE(test_warning_post){ +BOOST_AUTO_TEST_CASE(test_messages){ +    #ifdef UHD_FUTURE      std::cerr << "---begin print test ---" << std::endl; -    uhd::warning::post( +    UHD_MSG(status) << +        "This is a test print for a status message.\n" +        "And this is the second line of the test print.\n" +    ; +    UHD_MSG(warning) <<          "This is a test print for a warning message.\n"          "And this is the second line of the test print.\n" -    ); +    ; +    UHD_MSG(error) << +        "This is a test print for an error message.\n" +        "And this is the second line of the test print.\n" +    ;      std::cerr << "---end print test ---" << std::endl; +    #endif  }  | 
