10 #include <gtest/gtest.h> 
   24 #define EXPECT_THROW_MSG(statement,etype,emsg) \ 
   28         ADD_FAILURE() << "no exception, expected: " << #etype; \ 
   29     } catch (const etype& ex)  { \ 
   30         EXPECT_EQ(std::string(ex.what()), emsg); \ 
   32         ADD_FAILURE() << "wrong exception type thrown, expected: " << #etype; \ 
   36 #define ASSERT_THROW_MSG(statement,etype,emsg) \ 
   49         GTEST_FAIL() << "no exception, expected: " << #etype; \ 
   50     } catch (const etype& ex)  { \ 
   51         ASSERT_EQ(std::string(ex.what()), emsg); \ 
   53         GTEST_FAIL() << "wrong exception type thrown, expected: " << #etype; \ 
   57 #define EXPECT_NO_THROW_LOG(statement) \ 
   65     } catch (const std::exception& ex)  { \ 
   66         ADD_FAILURE() << #statement <<  " threw type: " << typeid(ex).name() \ 
   67                       << ", what: " << ex.what(); \ 
   69         ADD_FAILURE() << #statement <<  "threw non-std::exception"; \ 
   73 #define ASSERT_NO_THROW_LOG(statement) \ 
   81     } catch (const std::exception& ex)  { \ 
   82         GTEST_FAIL() << #statement <<  " threw type: " << typeid(ex).name() \ 
   83                      << ", what: " << ex.what(); \ 
   85         GTEST_FAIL() << #statement <<  " threw non-std::exception"; \ 
   92 #endif // GTEST_UTILS_H 
Defines the logger used by the top-level component of kea-dhcp-ddns.