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