NMEA: make nmeatool available with/without ENABLE_IO
[marnav.git] / test / nmea / exception_helper.hpp
blob98959d0938c7fb9ee3a39da77a83916037becb25
1 #ifndef TEST_NMEA_EXCEPTION_HELPER_HPP
2 #define TEST_NMEA_EXCEPTION_HELPER_HPP
4 #define EXPECT_EXCEPTION_STREQ(action, exception_type, s) \
5 try { \
6 { \
7 action; \
8 } \
9 FAIL() << "must not be reached"; \
10 } catch (exception_type & e) { \
11 EXPECT_STREQ(s, e.what()); \
12 } catch (...) { \
13 FAIL() << "unexpected exception caught"; \
16 #endif