diff options
| author | Dave Lee <davelee.com@gmail.com> | 2022-02-11 21:23:16 -0800 |
|---|---|---|
| committer | Dave Lee <davelee.com@gmail.com> | 2022-02-14 08:31:17 -0800 |
| commit | 779bbbf27fe631154bdfaac7a443f198d4654688 (patch) | |
| tree | fde0e9527bc0d5a37f487bffc9964738222b3418 /lldb/test/API/python_api/debugger/TestDebuggerAPI.py | |
| parent | 3c8d2aa87c1701ca16e13f06aea484637e03d005 (diff) | |
[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
Diffstat (limited to 'lldb/test/API/python_api/debugger/TestDebuggerAPI.py')
| -rw-r--r-- | lldb/test/API/python_api/debugger/TestDebuggerAPI.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |
