diff options
author | misterg <misterg@google.com> | 2019-02-04 16:40:09 (GMT) |
---|---|---|
committer | Gennadiy Civil <misterg@google.com> | 2019-02-04 19:19:50 (GMT) |
commit | 52ea4f7beaa6e05a52ded6b04a73b7eadbc09996 (patch) | |
tree | 46b2dd53f81bb14c60509ed23bcd73a16b3a54a8 /googletest/include/gtest/gtest-typed-test.h | |
parent | 876bdfa565b7260394baecdb4a132a738b9ec508 (diff) | |
download | googletest-52ea4f7beaa6e05a52ded6b04a73b7eadbc09996.zip googletest-52ea4f7beaa6e05a52ded6b04a73b7eadbc09996.tar.gz googletest-52ea4f7beaa6e05a52ded6b04a73b7eadbc09996.tar.bz2 |
Googletest export
Mark legacy _TEST_CASE_ macros as deprecated
PiperOrigin-RevId: 232303251
Diffstat (limited to 'googletest/include/gtest/gtest-typed-test.h')
-rw-r--r-- | googletest/include/gtest/gtest-typed-test.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/googletest/include/gtest/gtest-typed-test.h b/googletest/include/gtest/gtest-typed-test.h index 30a89cf..b3319f6 100644 --- a/googletest/include/gtest/gtest-typed-test.h +++ b/googletest/include/gtest/gtest-typed-test.h @@ -226,7 +226,9 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ -#define TYPED_TEST_CASE TYPED_TEST_SUITE +#define TYPED_TEST_CASE \ + static_assert(::testing::internal::TypedTestCaseIsDeprecated(), ""); \ + TYPED_TEST_SUITE #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ #endif // GTEST_HAS_TYPED_TEST @@ -265,7 +267,9 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ -#define TYPED_TEST_CASE_P TYPED_TEST_SUITE_P +#define TYPED_TEST_CASE_P \ + static_assert(::testing::internal::TypedTestCase_P_IsDeprecated(), ""); \ + TYPED_TEST_SUITE_P #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ #define TYPED_TEST_P(SuiteName, TestName) \ @@ -296,7 +300,10 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ -#define REGISTER_TYPED_TEST_CASE_P REGISTER_TYPED_TEST_SUITE_P +#define REGISTER_TYPED_TEST_CASE_P \ + static_assert(::testing::internal::RegisterTypedTestCase_P_IsDeprecated(), \ + ""); \ + REGISTER_TYPED_TEST_SUITE_P #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ // The 'Types' template argument below must have spaces around it @@ -318,7 +325,10 @@ INSTANTIATE_TYPED_TEST_SUITE_P(My, FooTest, MyTypes); // Legacy API is deprecated but still available #ifndef GTEST_REMOVE_LEGACY_TEST_CASEAPI_ -#define INSTANTIATE_TYPED_TEST_CASE_P INSTANTIATE_TYPED_TEST_SUITE_P +#define INSTANTIATE_TYPED_TEST_CASE_P \ + static_assert( \ + ::testing::internal::InstantiateTypedTestCase_P_IsDeprecated(), ""); \ + INSTANTIATE_TYPED_TEST_SUITE_P #endif // GTEST_REMOVE_LEGACY_TEST_CASEAPI_ #endif // GTEST_HAS_TYPED_TEST_P |