forked from OSchip/llvm-project
parent
e8c97a7cd7
commit
41a2ad5f85
|
@ -29,6 +29,7 @@ class TestArrayTypes(unittest.TestCase):
|
|||
self.ci.HandleCommand("file " + exe, res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
|
||||
# Break on line 42 inside main().
|
||||
self.ci.HandleCommand("breakpoint set -f main.c -l 42", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
self.assertTrue(res.GetOutput().startswith(
|
||||
|
@ -37,15 +38,19 @@ class TestArrayTypes(unittest.TestCase):
|
|||
self.ci.HandleCommand("run", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
|
||||
# The breakpoint should have a hit count of 1.
|
||||
self.ci.HandleCommand("breakpoint list", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
self.assertTrue(res.GetOutput().find('resolved, hit count = 1'))
|
||||
|
||||
# And the stop reason of the thread should be breakpoint.
|
||||
self.ci.HandleCommand("thread list", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
self.assertTrue(res.GetOutput().find('state is Stopped') and
|
||||
res.GetOutput().find('stop reason = breakpoint'))
|
||||
|
||||
# Issue 'variable list' command on several array-type variables.
|
||||
|
||||
self.ci.HandleCommand("variable list strings", res);
|
||||
self.assertTrue(res.Succeeded())
|
||||
output = res.GetOutput()
|
||||
|
|
|
@ -29,6 +29,7 @@ class TestClassTypes(unittest.TestCase):
|
|||
self.ci.HandleCommand("file " + exe, res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
|
||||
# Break on the ctor function of class C.
|
||||
self.ci.HandleCommand("breakpoint set -f main.cpp -l 73", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
self.assertTrue(res.GetOutput().startswith(
|
||||
|
@ -37,15 +38,18 @@ class TestClassTypes(unittest.TestCase):
|
|||
self.ci.HandleCommand("run", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
|
||||
# The breakpoint should have a hit count of 1.
|
||||
self.ci.HandleCommand("breakpoint list", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
self.assertTrue(res.GetOutput().find('resolved, hit count = 1'))
|
||||
|
||||
# And the stop reason of the thread should be breakpoint.
|
||||
self.ci.HandleCommand("thread list", res)
|
||||
self.assertTrue(res.Succeeded())
|
||||
self.assertTrue(res.GetOutput().find('state is Stopped') and
|
||||
res.GetOutput().find('stop reason = breakpoint'))
|
||||
|
||||
# We should be stopped on the ctor function of class C.
|
||||
self.ci.HandleCommand("variable list this", res);
|
||||
self.assertTrue(res.Succeeded())
|
||||
self.assertTrue(res.GetOutput().startswith('(class C *const) this = '))
|
||||
|
|
Loading…
Reference in New Issue