From 779bbbf27fe631154bdfaac7a443f198d4654688 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Fri, 11 Feb 2022 21:23:16 -0800 Subject: [lldb] Replace asserts on .Success() with assertSuccess() Replace forms of `assertTrue(err.Success())` with `assertSuccess(err)` (added in D82759). * `assertSuccess` prints out the error's message * `assertSuccess` expresses explicit higher level semantics, both to the reader and for test failure output * `assertSuccess` seems not to be well known, using it where possible will help spread knowledge * `assertSuccess` statements are more succinct Differential Revision: https://reviews.llvm.org/D119616 --- lldb/test/API/python_api/debugger/TestDebuggerAPI.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/test/API/python_api/debugger/TestDebuggerAPI.py') diff --git a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py index f9fe64d3a4d0..0a19945af109 100644 --- a/lldb/test/API/python_api/debugger/TestDebuggerAPI.py +++ b/lldb/test/API/python_api/debugger/TestDebuggerAPI.py @@ -81,8 +81,8 @@ class DebuggerAPITestCase(TestBase): error = self.dbg.SetInternalVariable(property_name, str(new_cache_line_size), self.dbg.GetInstanceName()) - self.assertTrue(error.Success(), - property_name + " value was changed successfully") + self.assertSuccess(error, + property_name + " value was changed successfully") # Check that it was set actually. self.assertEqual(get_cache_line_size(), new_cache_line_size) -- cgit v1.2.3