mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-12-06 14:11:26 +00:00
Now that we have added a post-processing step for adding truth value testing to
those lldb objects which implement the IsValid() method, let's change the rest of the test suite to use the more compact truth value testing pattern (the Python way). llvm-svn: 131970
This commit is contained in:
1 parent
97019c709d
commit
4ebd019b97
27 files changed
+137
-137
No files matched your search
@@ -109,10 +109,10 @@ class ThreadAPITestCase(TestBase):
|
||||
exe = os.path.join(os.getcwd(), "a.out")
|
||||
|
||||
target = self.dbg.CreateTarget(exe)
|
||||
self.assertTrue(target.IsValid(), VALID_TARGET)
|
||||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line)
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
self.assertTrue(breakpoint, VALID_BREAKPOINT)
|
||||
self.runCmd("breakpoint list")
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
@@ -131,10 +131,10 @@ class ThreadAPITestCase(TestBase):
|
||||
exe = os.path.join(os.getcwd(), "a.out")
|
||||
|
||||
target = self.dbg.CreateTarget(exe)
|
||||
self.assertTrue(target.IsValid(), VALID_TARGET)
|
||||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
breakpoint = target.BreakpointCreateByLocation("main.cpp", self.line)
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
self.assertTrue(breakpoint, VALID_BREAKPOINT)
|
||||
#self.runCmd("breakpoint list")
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
@@ -156,10 +156,10 @@ class ThreadAPITestCase(TestBase):
|
||||
exe = os.path.join(os.getcwd(), "a.out")
|
||||
|
||||
target = self.dbg.CreateTarget(exe)
|
||||
self.assertTrue(target.IsValid(), VALID_TARGET)
|
||||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
breakpoint = target.BreakpointCreateByName('malloc')
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
self.assertTrue(breakpoint, VALID_BREAKPOINT)
|
||||
self.runCmd("breakpoint list")
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
@@ -189,16 +189,16 @@ class ThreadAPITestCase(TestBase):
|
||||
exe = os.path.join(os.getcwd(), "a.out")
|
||||
|
||||
target = self.dbg.CreateTarget(exe)
|
||||
self.assertTrue(target.IsValid(), VALID_TARGET)
|
||||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
breakpoint = target.BreakpointCreateByLocation('main2.cpp', self.line2)
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
self.assertTrue(breakpoint, VALID_BREAKPOINT)
|
||||
self.runCmd("breakpoint list")
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
self.process = target.LaunchSimple(None, None, os.getcwd())
|
||||
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
self.assertTrue(self.process, PROCESS_IS_VALID)
|
||||
|
||||
# Frame #0 should be on self.line2.
|
||||
self.assertTrue(self.process.GetState() == lldb.eStateStopped)
|
||||
@@ -230,16 +230,16 @@ class ThreadAPITestCase(TestBase):
|
||||
exe = os.path.join(os.getcwd(), "a.out")
|
||||
|
||||
target = self.dbg.CreateTarget(exe)
|
||||
self.assertTrue(target.IsValid(), VALID_TARGET)
|
||||
self.assertTrue(target, VALID_TARGET)
|
||||
|
||||
breakpoint = target.BreakpointCreateByLocation('main2.cpp', self.line2)
|
||||
self.assertTrue(breakpoint.IsValid(), VALID_BREAKPOINT)
|
||||
self.assertTrue(breakpoint, VALID_BREAKPOINT)
|
||||
self.runCmd("breakpoint list")
|
||||
|
||||
# Launch the process, and do not stop at the entry point.
|
||||
self.process = target.LaunchSimple(None, None, os.getcwd())
|
||||
|
||||
self.assertTrue(self.process.IsValid(), PROCESS_IS_VALID)
|
||||
self.assertTrue(self.process, PROCESS_IS_VALID)
|
||||
|
||||
# Frame #0 should be on self.line2.
|
||||
self.assertTrue(self.process.GetState() == lldb.eStateStopped)
|
||||
|
||||
Reference in new issue
Block a user