Add fuzz calls for SBLineEntry.

llvm-svn: 134028
This commit is contained in:
Johnny Chen 2011-06-28 20:46:03 +00:00
parent 0beca53a29
commit 520eeff0ef
3 changed files with 18 additions and 1 deletions

View File

@ -191,6 +191,9 @@ class APIDefaultConstructorTestCase(TestBase):
if self.TraceOn():
print obj
self.assertFalse(obj)
# Do fuzz testing on the invalid obj, it should not crash lldb.
import sb_lineentry
sb_lineentry.fuzz_obj(obj)
@python_api_test
def test_SBListener(self):

View File

@ -7,7 +7,7 @@ import lldb
def fuzz_obj(obj):
obj.GetAddress()
obj.GetByteSize
obj.GetByteSize()
obj.DoesBranch()
obj.Print(None)
obj.GetDescription(lldb.SBStream())

View File

@ -0,0 +1,14 @@
"""
Fuzz tests an object after the default construction to make sure it does not crash lldb.
"""
import sys
import lldb
def fuzz_obj(obj):
obj.GetStartAddress()
obj.GetEndAddress()
obj.GetFileSpec()
obj.GetLine()
obj.GetColumn()
obj.GetDescription(lldb.SBStream())