diff options
| author | Johnny Chen <johnny.chen@apple.com> | 2011-12-19 23:09:54 +0000 |
|---|---|---|
| committer | Johnny Chen <johnny.chen@apple.com> | 2011-12-19 23:09:54 +0000 |
| commit | a7bd08be8d409ba6c695847e9688588fab4f1b4c (patch) | |
| tree | fae2cbf46da9d9e6962251018bbf9f47ce81bc45 /lldb/test/python_api | |
| parent | 8648c1018464b743019f6f1c796b200e49b5b8a8 (diff) | |
| download | bcm5719-llvm-a7bd08be8d409ba6c695847e9688588fab4f1b4c.tar.gz bcm5719-llvm-a7bd08be8d409ba6c695847e9688588fab4f1b4c.zip | |
Add a test sequence which passes None to lldb.SBFileSpec(). LLDB should not crash.
llvm-svn: 146922
Diffstat (limited to 'lldb/test/python_api')
| -rw-r--r-- | lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py index f5f9aef0014..6ec0350d3d5 100644 --- a/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py +++ b/lldb/test/python_api/default-constructor/TestDefaultConstructorForAPIObjects.py @@ -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 @@ class APIDefaultConstructorTestCase(TestBase): @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) |

