From 6853cf66d1d25e7f953574e35acef0fda1c2fa28 Mon Sep 17 00:00:00 2001 From: Johnny Chen Date: Thu, 21 Jul 2011 19:31:59 +0000 Subject: Add test scenario for exercising SBValue API: TypeIsPointerType() and GetByteSize(). llvm-svn: 135699 --- lldb/test/python_api/value/TestValueAPI.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lldb/test/python_api/value') 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) -- cgit v1.2.3