[Lldb-commits] [lldb] d602e0d - fix PythonDataObjectsTest.TestExceptions on windows

Lawrence D'Anna via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 21 20:59:23 PDT 2019


Author: Lawrence D'Anna
Date: 2019-10-22T04:00:37Z
New Revision: d602e0d0cab270761553c79d2e42b8ac6b756157

URL: https://github.com/llvm/llvm-project/commit/d602e0d0cab270761553c79d2e42b8ac6b756157
DIFF: https://github.com/llvm/llvm-project/commit/d602e0d0cab270761553c79d2e42b8ac6b756157.diff

LOG: fix PythonDataObjectsTest.TestExceptions on windows

Looks like on windows googlemock regexes treat newlines differently
from on darwin.    This patch fixes the regex in this test so it
will work on both.

Fixes: https://reviews.llvm.org/D69214
llvm-svn: 375477

Added: 
    

Modified: 
    lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
index b676b42da666..7481482fd8fc 100644
--- a/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
+++ b/lldb/unittests/ScriptInterpreter/Python/PythonDataObjectsTests.cpp
@@ -805,13 +805,13 @@ main = foo
 
   PythonScript foo(script);
 
-  EXPECT_THAT_EXPECTED(foo(),
-                       llvm::Failed<PythonException>(testing::Property(
-                           &PythonException::ReadBacktrace,
-                           testing::ContainsRegex("line 3, in foo..*"
-                                                  "line 5, in bar.*"
-                                                  "line 7, in baz.*"
-                                                  "ZeroDivisionError"))));
+  EXPECT_THAT_EXPECTED(
+      foo(), llvm::Failed<PythonException>(testing::Property(
+                 &PythonException::ReadBacktrace,
+                 testing::AllOf(testing::ContainsRegex("line 3, in foo"),
+                                testing::ContainsRegex("line 5, in bar"),
+                                testing::ContainsRegex("line 7, in baz"),
+                                testing::ContainsRegex("ZeroDivisionError")))));
 
   static const char script2[] = R"(
 class MyError(Exception):


        


More information about the lldb-commits mailing list