Passing a typename and string to parameterized test using google test
问题 Is there a way of passing both a type and a string to a parametrized test using google's test. I would like to do: template <typename T> class RawTypesTest : public ::testing::TestWithParam<const char * type> { protected: virtual void SetUp() { message = type; } }; TEST_P(RawTypesTest, Foo) { ASSERT_STREQ(message, type); ParamType * data = ..; ... } Thanks in advance 回答1: Value parameterized tests won't work for passing type information; you can only do that with typed or type parameterized