[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
This commit is contained in:
Dave Lee
2022-02-11 21:23:16 -08:00
parent 3c8d2aa87c
commit 779bbbf27f
55 changed files with 159 additions and 168 deletions

View File

@@ -37,7 +37,7 @@ class TestStructuredDataAPI(TestBase):
# Test that GetDescription works:
s.Clear()
error = example.GetDescription(s)
self.assertTrue(error.Success(), "GetDescription works")
self.assertSuccess(error, "GetDescription works")
if not "key_float" in s.GetData():
self.fail("FAILED: could not find key_float in description output")