summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2011-07-21 19:31:59 +0000
committerJohnny Chen <johnny.chen@apple.com>2011-07-21 19:31:59 +0000
commit6853cf66d1d25e7f953574e35acef0fda1c2fa28 (patch)
tree08025d71167345616b1ee8cad21e594a9eee0940 /lldb/test/python_api
parent378f59d4cda7b72057ebce21d49168cedc605115 (diff)
downloadbcm5719-llvm-6853cf66d1d25e7f953574e35acef0fda1c2fa28.tar.gz
bcm5719-llvm-6853cf66d1d25e7f953574e35acef0fda1c2fa28.zip
Add test scenario for exercising SBValue API: TypeIsPointerType() and GetByteSize().
llvm-svn: 135699
Diffstat (limited to 'lldb/test/python_api')
-rw-r--r--lldb/test/python_api/value/TestValueAPI.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/test/python_api/value/TestValueAPI.py b/lldb/test/python_api/value/TestValueAPI.py
index b24752c4684..ee0fdcbed47 100644
--- a/lldb/test/python_api/value/TestValueAPI.py
+++ b/lldb/test/python_api/value/TestValueAPI.py
@@ -64,6 +64,16 @@ class ValueAPITestCase(TestBase):
self.assertTrue(value, VALID_VARIABLE)
self.DebugSBValue(value)
+ # SBValue::TypeIsPointerType() should return true.
+ self.assertTrue(value.TypeIsPointerType())
+
+ # Verify the SBValue::GetByteSize() API is working correctly.
+ arch = self.getArchitecture()
+ if arch == 'i386':
+ self.assertTrue(value.GetByteSize() == 4)
+ elif arch == 'x86_64':
+ self.assertTrue(value.GetByteSize() == 8)
+
# Get child at index 5 => 'Friday'.
child = value.GetChildAtIndex(5, lldb.eNoDynamicValues, True)
self.assertTrue(child, VALID_VARIABLE)
OpenPOWER on IntegriCloud