From f469cab97b56b79107ce943e13b375add2676d17 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Jan 2021 02:30:03 -0500 Subject: [PATCH] update to newer googletest This matches the version used in Chromium. Change-Id: I1b697c7f79a4e628cecf96f6abc3e5dacac0888a Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/2605357 Reviewed-by: Mark Mentovai --- DEPS | 2 +- default.xml | 2 +- src/common/dwarf/dwarf2reader_die_unittest.cc | 4 ++-- src/common/dwarf_cu_to_module_unittest.cc | 19 ++++++++++--------- .../linux/elf_symbols_to_module_unittest.cc | 12 ++++++------ .../stackwalker_address_list_unittest.cc | 1 + src/processor/stackwalker_mips64_unittest.cc | 1 + src/processor/stackwalker_mips_unittest.cc | 1 + .../windows/dump_syms/dump_syms_unittest.cc | 4 ++-- 9 files changed, 25 insertions(+), 21 deletions(-) diff --git a/DEPS b/DEPS index 3ddaf4e3..064907ff 100644 --- a/DEPS +++ b/DEPS @@ -36,7 +36,7 @@ deps = { # Testing libraries and utilities. "src/src/testing": "https://github.com/google/googletest.git" + - "@5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081", + "@4fe018038f87675c083d0cfb6a6b57c274fb1753", # Protobuf. "src/src/third_party/protobuf/protobuf": diff --git a/default.xml b/default.xml index 195bbb59..767415de 100644 --- a/default.xml +++ b/default.xml @@ -27,7 +27,7 @@ { }; -INSTANTIATE_TEST_CASE_P(AllSituations, FuncLinePairing, - ValuesIn(situations)); +INSTANTIATE_TEST_SUITE_P(AllSituations, FuncLinePairing, + ValuesIn(situations)); TEST_P(FuncLinePairing, Pairing) { const Situation& s = GetParam(); @@ -1043,11 +1044,11 @@ TEST_F(FuncLinePairing, WarnOnceLine) { class CXXQualifiedNames: public CUFixtureBase, public TestWithParam { }; -INSTANTIATE_TEST_CASE_P(VersusEnclosures, CXXQualifiedNames, - Values(dwarf2reader::DW_TAG_class_type, - dwarf2reader::DW_TAG_structure_type, - dwarf2reader::DW_TAG_union_type, - dwarf2reader::DW_TAG_namespace)); +INSTANTIATE_TEST_SUITE_P(VersusEnclosures, CXXQualifiedNames, + Values(dwarf2reader::DW_TAG_class_type, + dwarf2reader::DW_TAG_structure_type, + dwarf2reader::DW_TAG_union_type, + dwarf2reader::DW_TAG_namespace)); TEST_P(CXXQualifiedNames, TwoFunctions) { DwarfTag tag = GetParam(); @@ -1145,8 +1146,8 @@ class QualifiedForLanguage : public CUFixtureBase, public TestWithParam { }; -INSTANTIATE_TEST_CASE_P(LanguageAndQualifiedName, QualifiedForLanguage, - ValuesIn(LanguageAndQualifiedNameCases)); +INSTANTIATE_TEST_SUITE_P(LanguageAndQualifiedName, QualifiedForLanguage, + ValuesIn(LanguageAndQualifiedNameCases)); TEST_P(QualifiedForLanguage, MemberFunction) { const LanguageAndQualifiedName& param = GetParam(); diff --git a/src/common/linux/elf_symbols_to_module_unittest.cc b/src/common/linux/elf_symbols_to_module_unittest.cc index 3f665898..6a860701 100644 --- a/src/common/linux/elf_symbols_to_module_unittest.cc +++ b/src/common/linux/elf_symbols_to_module_unittest.cc @@ -248,9 +248,9 @@ TEST_P(ELFSymbolsToModuleTest32, SkipStuff) { } // Run all the 32-bit tests with both endianness -INSTANTIATE_TEST_CASE_P(Endian, - ELFSymbolsToModuleTest32, - ::testing::Values(kLittleEndian, kBigEndian)); +INSTANTIATE_TEST_SUITE_P(Endian, + ELFSymbolsToModuleTest32, + ::testing::Values(kLittleEndian, kBigEndian)); // Similar tests, but with 64-bit values. Ostensibly this could be // shoehorned into the parameterization by using ::testing::Combine, @@ -365,6 +365,6 @@ TEST_P(ELFSymbolsToModuleTest64, SkipStuff) { } // Run all the 64-bit tests with both endianness -INSTANTIATE_TEST_CASE_P(Endian, - ELFSymbolsToModuleTest64, - ::testing::Values(kLittleEndian, kBigEndian)); +INSTANTIATE_TEST_SUITE_P(Endian, + ELFSymbolsToModuleTest64, + ::testing::Values(kLittleEndian, kBigEndian)); diff --git a/src/processor/stackwalker_address_list_unittest.cc b/src/processor/stackwalker_address_list_unittest.cc index b09137de..2828dff2 100644 --- a/src/processor/stackwalker_address_list_unittest.cc +++ b/src/processor/stackwalker_address_list_unittest.cc @@ -56,6 +56,7 @@ using google_breakpad::StackwalkerAddressList; using std::vector; using testing::_; using testing::AnyNumber; +using testing::DoAll; using testing::Return; using testing::SetArgumentPointee; diff --git a/src/processor/stackwalker_mips64_unittest.cc b/src/processor/stackwalker_mips64_unittest.cc index 2a9784bf..c3c3011a 100644 --- a/src/processor/stackwalker_mips64_unittest.cc +++ b/src/processor/stackwalker_mips64_unittest.cc @@ -65,6 +65,7 @@ using google_breakpad::test_assembler::Section; using std::vector; using testing::_; using testing::AnyNumber; +using testing::DoAll; using testing::Return; using testing::SetArgumentPointee; using testing::Test; diff --git a/src/processor/stackwalker_mips_unittest.cc b/src/processor/stackwalker_mips_unittest.cc index a172f17b..21267aeb 100644 --- a/src/processor/stackwalker_mips_unittest.cc +++ b/src/processor/stackwalker_mips_unittest.cc @@ -64,6 +64,7 @@ using google_breakpad::test_assembler::Section; using std::vector; using testing::_; using testing::AnyNumber; +using testing::DoAll; using testing::Return; using testing::SetArgumentPointee; using testing::Test; diff --git a/src/tools/windows/dump_syms/dump_syms_unittest.cc b/src/tools/windows/dump_syms/dump_syms_unittest.cc index 494b7791..accecda1 100644 --- a/src/tools/windows/dump_syms/dump_syms_unittest.cc +++ b/src/tools/windows/dump_syms/dump_syms_unittest.cc @@ -215,7 +215,7 @@ TEST_P(DumpSymsRegressionTest, EnsureDumpedSymbolsMatch) { EXPECT_EQ(expected_symbols, symbols); } -INSTANTIATE_TEST_CASE_P(DumpSyms, DumpSymsRegressionTest, +INSTANTIATE_TEST_SUITE_P(DumpSyms, DumpSymsRegressionTest, testing::ValuesIn(kRootNames)); TEST_P(DumpSymsPEOnlyRegressionTest, EnsurePEOnlyDumpedSymbolsMatch) { @@ -235,7 +235,7 @@ TEST_P(DumpSymsPEOnlyRegressionTest, EnsurePEOnlyDumpedSymbolsMatch) { EXPECT_EQ(expected_symbols, symbols); } -INSTANTIATE_TEST_CASE_P(PEOnlyDumpSyms, DumpSymsPEOnlyRegressionTest, +INSTANTIATE_TEST_SUITE_P(PEOnlyDumpSyms, DumpSymsPEOnlyRegressionTest, testing::ValuesIn(kPEOnlyRootNames));