On Windows, the function name contains the return parameter, so

the test has to be "function name contains the name we used to specify
the breakpoint" not IS the name...
This commit is contained in:
Jim Ingham 2022-02-16 19:09:01 -08:00
parent 64f5f6d759
commit 05f10ae0d8
1 changed files with 6 additions and 1 deletions

View File

@ -18,7 +18,12 @@ class TestBreakpointOnOverload(TestBase):
self.assertEqual(bkpt.num_locations, 1, "Got one location")
addr = bkpt.locations[0].GetAddress()
self.assertTrue(addr.function.IsValid(), "Got a real function")
self.assertEqual(addr.function.name, name, "Got the right name")
# On Window, the name of the function includes the return value.
# We still succeed in setting the breakpoint, but the resultant
# name is not the same.
# So just look for the name we used for the breakpoint in the
# function name, rather than doing an equality check.
self.assertIn(name, addr.function.name, "Got the right name")
def test_break_on_overload(self):
self.build()