aboutsummaryrefslogtreecommitdiffstats
path: root/test/gtest-typed-test_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/gtest-typed-test_test.cc')
-rw-r--r--test/gtest-typed-test_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/gtest-typed-test_test.cc b/test/gtest-typed-test_test.cc
index 0cec71a7..ec03c95d 100644
--- a/test/gtest-typed-test_test.cc
+++ b/test/gtest-typed-test_test.cc
@@ -348,3 +348,15 @@ INSTANTIATE_TYPED_TEST_CASE_P(My, NumericTest, NumericTypes);
} // namespace library2
#endif // GTEST_HAS_TYPED_TEST_P
+
+#if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P)
+
+// Google Test doesn't support type-parameterized tests on some platforms
+// and compilers, such as MSVC 7.1. If we use conditional compilation to
+// compile out all code referring to the gtest_main library, MSVC linker
+// will not link that library at all and consequently complain about
+// missing entry point defined in that library (fatal error LNK1561:
+// entry point must be defined). This dummy test keeps gtest_main linked in.
+TEST(DummyTest, TypedTestsAreNotSupportedOnThisPlatform) {}
+
+#endif // #if !defined(GTEST_HAS_TYPED_TEST) && !defined(GTEST_HAS_TYPED_TEST_P)