diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-07-21 19:31:59 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-07-21 19:31:59 +0000 |
| commit | 6853cf66d1d25e7f953574e35acef0fda1c2fa28 (patch) | |
| tree | 08025d71167345616b1ee8cad21e594a9eee0940 /lldb/test/python_api | |
| parent | 378f59d4cda7b72057ebce21d49168cedc605115 (diff) | |
| download | bcm5719-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.py | 10 |
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) |

