From f05e2fb013f0e2504471a9899dba7d70cc58a63d Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Mon, 26 Jun 2023 16:01:18 -0700 Subject: Don't allow SBValue::Cast to cast from a smaller type to a larger, as we don't in general know where the extra data should come from. Differential Revision: https://reviews.llvm.org/D153657 --- lldb/packages/Python/lldbsuite/test/lldbtest.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lldb/packages/Python/lldbsuite/test/lldbtest.py') diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index a712f6b..2bff1a7 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -2604,6 +2604,17 @@ FileCheck output: if not obj.Success(): error = obj.GetCString() self.fail(self._formatMessage(msg, "'{}' is not success".format(error))) + """Assert that an lldb.SBError is in the "failure" state.""" + + def assertFailure(self, obj, error_str = None, msg=None): + if obj.Success(): + self.fail(self._formatMessage(msg, "Error not in a fail state")) + + if error_str == None: + return + + error = obj.GetCString() + self.assertEqual(error, error_str, msg) """Assert that a command return object is successful""" -- cgit v1.1