[Lldb-commits] [lldb] r146922 - /lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
Johnny Chen
johnny.chen at apple.com
Mon Dec 19 15:09:54 PST 2011
Author: johnny
Date: Mon Dec 19 17:09:54 2011
New Revision: 146922
URL: http://llvm.org/viewvc/llvm-project?rev=146922&view=rev
Log:
Add a test sequence which passes None to lldb.SBFileSpec(). LLDB should not crash.
Modified:
lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
Modified: lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py?rev=146922&r1=146921&r2=146922&view=diff
==============================================================================
--- lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py (original)
+++ lldb/trunk/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py Mon Dec 19 17:09:54 2011
@@ -2,6 +2,10 @@
Test lldb Python API object's default constructor and make sure it is invalid
after initial construction.
+There are also some cases of boundary condition testings sprinkled throughout
+the tests where None is passed to SB API which expects (const char *) in the
+C++ API counterpart. Passing None should not crash lldb!
+
There are three exceptions to the above general rules, though; API objects
SBCommadnReturnObject, SBStream, and SBSymbolContextList, are all valid objects
after default construction.
@@ -130,6 +134,8 @@
@python_api_test
def test_SBFileSpec(self):
obj = lldb.SBFileSpec()
+ # This is just to test that FileSpec(None) does not crash.
+ obj2 = lldb.SBFileSpec(None, True)
if self.TraceOn():
print obj
self.assertFalse(obj)
More information about the lldb-commits
mailing list