10 #include <gtest/gtest.h> 34 #define TST_FOR_TYPE(__TSTTYPE) \ 35 EXPECT_STREQ(#__TSTTYPE, TTypeName<__TSTTYPE>::get().c_str()) 38 #define TST_FOR_TYPE2(__TSTTYPE, __TSTTYPE2ndpart) \ 39 if (std::string(#__TSTTYPE "," #__TSTTYPE2ndpart) != \ 40 TTypeName<__TSTTYPE, __TSTTYPE2ndpart>::get().c_str()) \ 41 GTEST_FAIL() << "Failed: " << #__TSTTYPE "," #__TSTTYPE2ndpart \ 42 << "\n Computed type is: " \ 43 << TTypeName<__TSTTYPE, __TSTTYPE2ndpart>::get().c_str() \ 85 "std::shared_ptr<MyFooClass>",
95 const std::string s1(st1.c_str());
96 const std::string s2(
"uint8_t");
97 EXPECT_STREQ(s1.c_str(), s2.c_str());
DECLARE_CUSTOM_TTYPENAME(MyFooClass)
TEST(TTypeName, types2str)
#define TST_FOR_TYPE2(__TSTTYPE, __TSTTYPE2ndpart)
#define TST_FOR_TYPE(__TSTTYPE)
#define DECLARE_TTYPENAME_CLASSNAME(_CLASSNAME)
Like DECLARE_CUSTOM_TTYPENAME(), but for use within the class declaration body.