[Lldb-commits] [lldb] r135699 - /lldb/trunk/test/python_api/value/TestValueAPI.py

Johnny Chen johnny.chen at apple.com
Thu Jul 21 12:31:59 PDT 2011


Author: johnny
Date: Thu Jul 21 14:31:59 2011
New Revision: 135699

URL: http://llvm.org/viewvc/llvm-project?rev=135699&view=rev
Log:
Add test scenario for exercising SBValue API: TypeIsPointerType() and GetByteSize().

Modified:
    lldb/trunk/test/python_api/value/TestValueAPI.py

Modified: lldb/trunk/test/python_api/value/TestValueAPI.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/value/TestValueAPI.py?rev=135699&r1=135698&r2=135699&view=diff
==============================================================================
--- lldb/trunk/test/python_api/value/TestValueAPI.py (original)
+++ lldb/trunk/test/python_api/value/TestValueAPI.py Thu Jul 21 14:31:59 2011
@@ -64,6 +64,16 @@
         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)





More information about the lldb-commits mailing list