Skip to content

Commit

Permalink
Update GoogleTest to v1.14.0 (#65823)
Browse files Browse the repository at this point in the history
This PR updates GoogleTest to v1.14.0 . It also updates the Clang
ASTTest to fix a compatibility issue with the new GoogleTest.
  • Loading branch information
zeroomega committed Sep 12, 2023
1 parent 58d50b0 commit 54c1a9b
Show file tree
Hide file tree
Showing 66 changed files with 11,984 additions and 13,509 deletions.
10 changes: 10 additions & 0 deletions clang/unittests/AST/ASTImporterODRStrategiesTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,8 @@ ASTIMPORTER_ODR_INSTANTIATE_TYPED_TEST_SUITE(
INSTANTIATE_TEST_SUITE_P(
ODRViolationTests, FunctionConservative,
DefaultTestValuesForRunOptions );
#else
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(FunctionConservative);
#endif
INSTANTIATE_TEST_SUITE_P(
ODRViolationTests, TypedefConservative,
Expand Down Expand Up @@ -631,6 +633,8 @@ INSTANTIATE_TEST_SUITE_P(
//INSTANTIATE_TEST_SUITE_P(
//ODRViolationTests, VarTemplateConservative,
//DefaultTestValuesForRunOptions);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VarTemplateConservative);

INSTANTIATE_TEST_SUITE_P(
ODRViolationTests, FunctionTemplateSpecConservative,
DefaultTestValuesForRunOptions);
Expand All @@ -641,12 +645,15 @@ INSTANTIATE_TEST_SUITE_P(
//INSTANTIATE_TEST_SUITE_P(
//ODRViolationTests, VarTemplateSpecConservative,
//DefaultTestValuesForRunOptions);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VarTemplateSpecConservative);

// FIXME: These fail on Windows.
#if !defined(_WIN32)
INSTANTIATE_TEST_SUITE_P(
ODRViolationTests, FunctionLiberal,
DefaultTestValuesForRunOptions);
#else
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(FunctionLiberal);
#endif
INSTANTIATE_TEST_SUITE_P(
ODRViolationTests, TypedefLiberal,
Expand Down Expand Up @@ -679,6 +686,8 @@ INSTANTIATE_TEST_SUITE_P(
// INSTANTIATE_TEST_SUITE_P(
// ODRViolationTests, VarTemplateLiberal,
// DefaultTestValuesForRunOptions);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VarTemplateLiberal);

INSTANTIATE_TEST_SUITE_P(
ODRViolationTests, ClassTemplateSpecLiberal,
DefaultTestValuesForRunOptions);
Expand All @@ -689,6 +698,7 @@ INSTANTIATE_TEST_SUITE_P(
//INSTANTIATE_TEST_SUITE_P(
//ODRViolationTests, VarTemplateSpecLiberal,
//DefaultTestValuesForRunOptions );
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(VarTemplateSpecLiberal);

// clang-format on

Expand Down
8 changes: 8 additions & 0 deletions clang/unittests/AST/ASTImporterTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9227,5 +9227,13 @@ INSTANTIATE_TEST_SUITE_P(ParameterizedTests, ImportAttributes,
INSTANTIATE_TEST_SUITE_P(ParameterizedTests, ImportInjectedClassNameType,
DefaultTestValuesForRunOptions);

INSTANTIATE_TEST_SUITE_P(ParameterizedTests, ImportMatrixType,
DefaultTestValuesForRunOptions);

// FIXME: Make ImportOpenCLPipe test work.
// INSTANTIATE_TEST_SUITE_P(ParameterizedTests, ImportOpenCLPipe,
// DefaultTestValuesForRunOptions);
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ImportOpenCLPipe);

} // end namespace ast_matchers
} // end namespace clang
6 changes: 1 addition & 5 deletions third-party/unittest/googlemock/README.LLVM
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LLVM notes
----------

This directory contains the 'googlemock' component of Google Test 1.10.0, with
This directory contains the 'googlemock' component of Google Test 1.14.0, with
all elements removed except for the actual source code, to minimize the
addition to the LLVM distribution.

Expand All @@ -10,14 +10,10 @@ Cleaned up as follows:
# Remove all the unnecessary files and directories
$ rm -f CMakeLists.txt configure* Makefile* CHANGES CONTRIBUTORS README README.md .gitignore
$ rm -rf build-aux make msvc scripts test docs
$ rm -f `find . -name \*\.pump`
$ rm -f src/gmock_main.cc

# Put the license in the consistent place for LLVM.
$ mv LICENSE LICENSE.TXT

Modified as follows:
* Support for std::begin/std::end in gmock-matchers.h
* IWYU pragmas
* Disabled -Wdeprecated-copy for clang
* Added IWYU pragmas from https://github.com/google/googletest/commit/100f6fbf5f81a82d163c1e29735e8a2936eacd4f

0 comments on commit 54c1a9b

Please sign in to comment.