Add test scenario for exercising SBValue API: TypeIsPointerType() and GetByteSize().

llvm-svn: 135699
This commit is contained in:
Johnny Chen 2011-07-21 19:31:59 +00:00
parent 378f59d4cd
commit 6853cf66d1
1 changed files with 10 additions and 0 deletions

View File

@ -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)