Files
clang-p2996/lldb/test/API/python_api/sberror/TestSBError.py
Andy Yankovsky 206e8d8905 Fix SBError::SetErrorToGenericError
`SBError::SetErrorToGenericError` should call `Status::SetErrorToGenericError`,
not `Status::SetErrorToErrno`.

Reviewed By: teemperor

Differential Revision: https://reviews.llvm.org/D90151
2020-10-26 15:44:38 +01:00

14 lines
349 B
Python

"""Test the SBError APIs."""
from lldbsuite.test.lldbtest import *
class TestSBError(TestBase):
mydir = TestBase.compute_mydir(__file__)
NO_DEBUG_INFO_TESTCASE = True
def test_generic_error(self):
error = lldb.SBError()
error.SetErrorToGenericError()
self.assertEqual(error.GetType(), lldb.eErrorTypeGeneric)