[Lldb-commits] [lldb] 621f845 - [lldb] Modernize TestOperatorOverload.py asserts

Raphael Isemann via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 30 02:39:22 PDT 2020


Author: Raphael Isemann
Date: 2020-06-30T11:38:42+02:00
New Revision: 621f84567920bf5a8d79789f01a622115ec8252d

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

LOG: [lldb] Modernize TestOperatorOverload.py asserts

Added: 
    

Modified: 
    lldb/test/API/lang/cpp/operator-overload/TestOperatorOverload.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/lang/cpp/operator-overload/TestOperatorOverload.py b/lldb/test/API/lang/cpp/operator-overload/TestOperatorOverload.py
index f541a6617e3a..c361a3916fb2 100644
--- a/lldb/test/API/lang/cpp/operator-overload/TestOperatorOverload.py
+++ b/lldb/test/API/lang/cpp/operator-overload/TestOperatorOverload.py
@@ -13,10 +13,6 @@ def test_overload(self):
         "break here", lldb.SBFileSpec("b.cpp"))
     frame = thread.GetSelectedFrame()
     value = frame.EvaluateExpression("x == nil")
-    self.assertTrue(str(value.GetError())
-      .find("comparison between NULL and non-pointer ('Tinky' and NULL)")
-        != -1)
-    self.assertTrue(str(value.GetError())
-      .find("invalid operands to binary expression ('Tinky' and")
-        != -1)
     self.assertFalse(value.GetError().Success())
+    self.assertIn("comparison between NULL and non-pointer ('Tinky' and NULL)", str(value.GetError()))
+    self.assertIn("invalid operands to binary expression ('Tinky' and", str(value.GetError()))


        


More information about the lldb-commits mailing list