Added comments.

llvm-svn: 107333
This commit is contained in:
Johnny Chen 2010-06-30 22:22:37 +00:00
parent e8c97a7cd7
commit 41a2ad5f85
2 changed files with 9 additions and 0 deletions

View File

@ -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()

View File

@ -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 = '))