[Lldb-commits] [PATCH] D90151: Fix SBError::SetErrorToGenericError

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 26 05:30:46 PDT 2020


teemperor requested changes to this revision.
teemperor added a comment.
This revision now requires changes to proceed.

Could you add a test for this? This should be enough:

  diff --git a/lldb/test/API/python_api/sberror/TestSBError.py b/lldb/test/API/python_api/sberror/TestSBError.py
  new file mode 100644
  index 000000000000..91d5a334bff2
  --- /dev/null
  +++ b/lldb/test/API/python_api/sberror/TestSBError.py
  @@ -0,0 +1,11 @@
  +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)

Otherwise this LGTM, thanks for the patch!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90151/new/

https://reviews.llvm.org/D90151



More information about the lldb-commits mailing list