1import lldb 2from lldbsuite.test.decorators import * 3from lldbsuite.test.lldbtest import * 4from lldbsuite.test import lldbutil 5 6class TestOperatorOverload(TestBase): 7 mydir = TestBase.compute_mydir(__file__) 8 9 def test_overload(self): 10 self.build() 11 (target, process, thread, 12 main_breakpoint) = lldbutil.run_to_source_breakpoint(self, 13 "break here", lldb.SBFileSpec("b.cpp")) 14 frame = thread.GetSelectedFrame() 15 value = frame.EvaluateExpression("x == nil") 16 self.assertFalse(value.GetError().Success()) 17 self.assertIn("comparison between NULL and non-pointer ('Tinky' and NULL)", str(value.GetError())) 18 self.assertIn("invalid operands to binary expression ('Tinky' and", str(value.GetError())) 19