[clang-tools-extra] fde5b24 - [clangd] Make unit test compatible with gtest 1.10.0
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Fri May 14 10:38:30 PDT 2021
Author: Benjamin Kramer
Date: 2021-05-14T19:37:46+02:00
New Revision: fde5b24963f42c8f21e32e1c5b19e81ddc52e575
URL: https://github.com/llvm/llvm-project/commit/fde5b24963f42c8f21e32e1c5b19e81ddc52e575
DIFF: https://github.com/llvm/llvm-project/commit/fde5b24963f42c8f21e32e1c5b19e81ddc52e575.diff
LOG: [clangd] Make unit test compatible with gtest 1.10.0
Added:
Modified:
clang-tools-extra/clangd/unittests/PrintASTTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/PrintASTTests.cpp b/clang-tools-extra/clangd/unittests/PrintASTTests.cpp
index 9e4cc565003f4..d0e2c2406abfb 100644
--- a/clang-tools-extra/clangd/unittests/PrintASTTests.cpp
+++ b/clang-tools-extra/clangd/unittests/PrintASTTests.cpp
@@ -53,15 +53,15 @@ TEST_P(ASTUtils, PrintTemplateArgs) {
EXPECT_THAT(V.TemplateArgsAtPoints, ElementsAreArray(Pair.Expected));
}
-INSTANTIATE_TEST_CASE_P(ASTUtilsTests, ASTUtils,
- ::testing::ValuesIn(std::vector<Case>({
- {
- R"cpp(
+INSTANTIATE_TEST_SUITE_P(ASTUtilsTests, ASTUtils,
+ ::testing::ValuesIn(std::vector<Case>({
+ {
+ R"cpp(
template <class X> class Bar {};
template <> class ^Bar<double> {};)cpp",
- {"<double>"}},
- {
- R"cpp(
+ {"<double>"}},
+ {
+ R"cpp(
template <class X> class Bar {};
template <class T, class U,
template<typename> class Z, int Q>
@@ -69,42 +69,42 @@ INSTANTIATE_TEST_CASE_P(ASTUtilsTests, ASTUtils,
template struct ^Foo<int, bool, Bar, 8>;
template <typename T>
struct ^Foo<T *, T, Bar, 3> {};)cpp",
- {"<int, bool, Bar, 8>", "<T *, T, Bar, 3>"}},
- {
- R"cpp(
+ {"<int, bool, Bar, 8>", "<T *, T, Bar, 3>"}},
+ {
+ R"cpp(
template <int ...> void Foz() {};
template <> void ^Foz<3, 5, 8>() {};)cpp",
- {"<3, 5, 8>"}},
- {
- R"cpp(
+ {"<3, 5, 8>"}},
+ {
+ R"cpp(
template <class X> class Bar {};
template <template <class> class ...>
class Aux {};
template <> class ^Aux<Bar, Bar> {};
template <template <class> class T>
class ^Aux<T, T> {};)cpp",
- {"<Bar, Bar>", "<T, T>"}},
- {
- R"cpp(
+ {"<Bar, Bar>", "<T, T>"}},
+ {
+ R"cpp(
template <typename T> T var = 1234;
template <> int ^var<int> = 1;)cpp",
- {"<int>"}},
- {
- R"cpp(
+ {"<int>"}},
+ {
+ R"cpp(
template <typename T> struct Foo;
struct Bar { friend class Foo<int>; };
template <> struct ^Foo<int> {};)cpp",
- {"<int>"}},
- {
- R"cpp(
+ {"<int>"}},
+ {
+ R"cpp(
template<class T>
T S = T(10);
template <class T>
int ^S<T*> = 0;
template <>
int ^S<double> = 0;)cpp",
- {"<T *>", "<double>"}},
- })), );
+ {"<T *>", "<double>"}},
+ })));
} // namespace
} // namespace clangd
} // namespace clang
More information about the cfe-commits
mailing list