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/sbmodule | |
| parent | 3c8d2aa87c1701ca16e13f06aea484637e03d005 (diff) | |
| download | llvm-779bbbf27fe631154bdfaac7a443f198d4654688.zip llvm-779bbbf27fe631154bdfaac7a443f198d4654688.tar.gz llvm-779bbbf27fe631154bdfaac7a443f198d4654688.tar.bz2 | |
[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/sbmodule')
| -rw-r--r-- | lldb/test/API/python_api/sbmodule/TestSBModule.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/test/API/python_api/sbmodule/TestSBModule.py b/lldb/test/API/python_api/sbmodule/TestSBModule.py index dfb7711..6200ba6 100644 --- a/lldb/test/API/python_api/sbmodule/TestSBModule.py +++ b/lldb/test/API/python_api/sbmodule/TestSBModule.py @@ -54,5 +54,5 @@ class SBModuleAPICase(TestBase): "The module should not be backed by a file on disk.") error = process.Destroy() - self.assertTrue(error.Success(), "couldn't destroy process %s" % background_process.pid) + self.assertSuccess(error, "couldn't destroy process %s" % background_process.pid) |
