summaryrefslogtreecommitdiffstats
path: root/lldb/test/python_api/default-constructor/sb_error.py
blob: f38d079972eb8e2aeac68066ba3b65cfa056487e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"""
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.GetCString()
    obj.Fail()
    obj.Success()
    obj.GetError()
    obj.GetType()
    obj.SetError(5, lldb.eErrorTypeGeneric)
    obj.SetErrorToErrno()
    obj.SetErrorToGenericError()
    obj.SetErrorString("xyz")
    obj.SetErrorStringWithFormat("%s!", "error")
    obj.GetDescription(lldb.SBStream())
OpenPOWER on IntegriCloud