From ef443fbf777fd001593d135af07f1ff2cfa3294e Mon Sep 17 00:00:00 2001 From: Christopher Di Bella Date: Wed, 12 Oct 2022 17:06:34 +0000 Subject: [PATCH] Changes FunctionNames.Mangled to check for regex instead of equality The demangled name has recently joined two angle brackets, where there was previously a space. This commit makes it possible for both options to pass, since they're both valid source. Bug: b:238678030 Test: Tested locally Fixed: b:243982778 Change-Id: Ic4464709fb8cc5c730a9d14a8627294b24ae70c3 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3949474 Reviewed-by: Lei Zhang --- src/common/stabs_to_module_unittest.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/common/stabs_to_module_unittest.cc b/src/common/stabs_to_module_unittest.cc index 25272482..95bdb261 100644 --- a/src/common/stabs_to_module_unittest.cc +++ b/src/common/stabs_to_module_unittest.cc @@ -210,10 +210,9 @@ TEST(FunctionNames, Mangled) { Module::Function *function = functions[0]; // This is GCC-specific, but we shouldn't be seeing STABS data anywhere // but Linux. - EXPECT_STREQ("std::vector >::" - "push_back(unsigned long long const&)", - function->name.str().c_str()); + EXPECT_THAT(function->name.str(), ::testing::ContainsRegex( + "std::vector\\s?>::" + "push_back\\(unsigned long long const&\\)")); EXPECT_EQ(0xf2cfda63cef7f46dLL, function->address); EXPECT_LT(0U, function->ranges[0].size); // should have used dummy size EXPECT_EQ(0U, function->parameter_size);