summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/function_symbol
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2013-03-19 17:59:30 +0000
committerGreg Clayton <gclayton@apple.com>2013-03-19 17:59:30 +0000
commit53c5ddf0d7a9a37b6a73d078d42ecaeb8b76427f (patch)
tree9ec4eda39f1eb37caaa9735722e6ea7c25844db6 /lldb/test/python_api/function_symbol
parentafcef33de7b9931a9e98f4b83274a7869728ecac (diff)
downloadbcm5719-llvm-53c5ddf0d7a9a37b6a73d078d42ecaeb8b76427f.tar.gz
bcm5719-llvm-53c5ddf0d7a9a37b6a73d078d42ecaeb8b76427f.zip
Fixed incorrect python that was trying to validate that we got a valid lldb.SBThread object by checking to see if it is equal to "None".
This test is incorrect as functions that return lldb.SBThread objects never return None, they just return lldb.SBThread objects that contain invalid opaque classes. llvm-svn: 177416
Diffstat (limited to 'lldb/test/python_api/function_symbol')
-rw-r--r--lldb/test/python_api/function_symbol/TestDisasmAPI.py4
-rw-r--r--lldb/test/python_api/function_symbol/TestSymbolAPI.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
index ac7bd3fe7c8..11e68162ea8 100644
--- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py
+++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
@@ -61,7 +61,7 @@ class DisasmAPITestCase(TestBase):
# Frame #0 should be on self.line1.
self.assertTrue(process.GetState() == lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
- self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
+ self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
lineEntry = frame0.GetLineEntry()
self.assertTrue(lineEntry.GetLine() == self.line1)
@@ -80,7 +80,7 @@ class DisasmAPITestCase(TestBase):
process.Continue()
self.assertTrue(process.GetState() == lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
- self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
+ self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
lineEntry = frame0.GetLineEntry()
self.assertTrue(lineEntry.GetLine() == self.line2)
diff --git a/lldb/test/python_api/function_symbol/TestSymbolAPI.py b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
index 5242ff08b99..60d4ffb1d7c 100644
--- a/lldb/test/python_api/function_symbol/TestSymbolAPI.py
+++ b/lldb/test/python_api/function_symbol/TestSymbolAPI.py
@@ -61,7 +61,7 @@ class SymbolAPITestCase(TestBase):
# Frame #0 should be on self.line1.
self.assertTrue(process.GetState() == lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
- self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
+ self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
symbol_line1 = frame0.GetSymbol()
# We should have a symbol type of code.
@@ -74,7 +74,7 @@ class SymbolAPITestCase(TestBase):
process.Continue()
self.assertTrue(process.GetState() == lldb.eStateStopped)
thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint)
- self.assertTrue(thread != None, "There should be a thread stopped due to breakpoint condition")
+ self.assertTrue(thread.IsValid(), "There should be a thread stopped due to breakpoint condition")
frame0 = thread.GetFrameAtIndex(0)
symbol_line2 = frame0.GetSymbol()
# We should have a symbol type of code.
OpenPOWER on IntegriCloud