diff options
author | Johnny Chen <johnny.chen@apple.com> | 2011-05-24 18:22:45 +0000 |
---|---|---|
committer | Johnny Chen <johnny.chen@apple.com> | 2011-05-24 18:22:45 +0000 |
commit | 4ebd019b977b7d0bb5b9dc6fd10562e7a47c8de1 (patch) | |
tree | 7c017fb66ee57a8982cf69b765ffa0a1232b034e /lldb/test/python_api/thread/TestThreadAPI.py | |
parent | 97019c709db572b78e5e60a0c4eb13a03de8b709 (diff) | |
download | bcm5719-llvm-4ebd019b977b7d0bb5b9dc6fd10562e7a47c8de1.tar.gz bcm5719-llvm-4ebd019b977b7d0bb5b9dc6fd10562e7a47c8de1.zip |
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
Diffstat (limited to 'lldb/test/python_api/thread/TestThreadAPI.py')
-rw-r--r-- | lldb/test/python_api/thread/TestThreadAPI.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lldb/test/python_api/thread/TestThreadAPI.py b/lldb/test/python_api/thread/TestThreadAPI.py index 50bab95c787..aee34f04ea4 100644 --- a/lldb/test/python_api/thread/TestThreadAPI.py +++ b/lldb/test/python_api/thread/TestThreadAPI.py @@ -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) |