If the TEST_P and INSTANTIATE_TEST_CASE_P macros age given parameters that are
macros themselves, they do not expand those macros. Expanding the macros in
parameters would make possible to conditionally disable tests.
Example:
#if defined(GTEST_OS_WINDOWS)
#define MAYBE_SomeTest DISABLED_SomeTest
#else
#define MAYBE_SomeTest SomeTest
#endif
TEST(MyTestClass, MAYBE_SomeTest) {
} // -> will produce a disabled test on Windows (DISABLED_SomeTest)
TEST_P(MyTestClass, MAYBE_SomeTest) {
} // -> will produce test named MAYBE_SomeTest
More details at
https://groups.google.com/d/topic/googletestframework/N5wCBXetcVk/discussion.
Original issue reported on code.google.com by vladlosev on 8 Nov 2011 at 5:12
Original issue reported on code.google.com by
vladlosev
on 8 Nov 2011 at 5:12