summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/function_symbol/TestDisasmAPI.py
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-06-09 22:04:56 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-06-09 22:04:56 +0000
commite2b5cfd826d486c22148d770406b24d81c7480ad (patch)
tree282760efcf50ad9a15695faf166c77f3d34ab8b2 /lldb/test/python_api/function_symbol/TestDisasmAPI.py
parentc90a32a4e6a6d221d8bcd61dbc4bd7124d760c5b (diff)
downloadbcm5719-llvm-e2b5cfd826d486c22148d770406b24d81c7480ad.tar.gz
bcm5719-llvm-e2b5cfd826d486c22148d770406b24d81c7480ad.zip
Add rich comparison methods for the SBAddress object.
If two SBAddress's have the same module and file address, they are considered equal. Add a test snippet 'sa1 == sa2' to exercise the rich comparison methods for SBAddress. llvm-svn: 132807
Diffstat (limited to 'lldb/test/python_api/function_symbol/TestDisasmAPI.py')
-rw-r--r--lldb/test/python_api/function_symbol/TestDisasmAPI.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/test/python_api/function_symbol/TestDisasmAPI.py b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
index 1ac0d206650..e25754961ce 100644
--- a/lldb/test/python_api/function_symbol/TestDisasmAPI.py
+++ b/lldb/test/python_api/function_symbol/TestDisasmAPI.py
@@ -102,18 +102,23 @@ class DisasmAPITestCase(TestBase):
sa1 = symbol.GetStartAddress()
#print "sa1:", sa1
+ print "sa1.GetFileAddress():", sa1.GetFileAddress()
#ea1 = symbol.GetEndAddress()
#print "ea1:", ea1
+ print "ea1.GetFileAddress():", sa1.GetFileAddress()
sa2 = function.GetStartAddress()
#print "sa2:", sa2
+ print "sa2.GetFileAddress():", sa2.GetFileAddress()
#ea2 = function.GetEndAddress()
#print "ea2:", ea2
+ self.assertTrue(sa1 and sa2 and sa1 == sa2,
+ "The two starting addresses should be the same")
from lldbutil import get_description
desc1 = get_description(sa1)
desc2 = get_description(sa2)
self.assertTrue(desc1 and desc2 and desc1 == desc2,
- "The two starting addresses should be the same")
+ "SBAddress.GetDescription() API of sa1 and sa2 should return the same string")
if __name__ == '__main__':
OpenPOWER on IntegriCloud