[lldb] Replace asserts on .Success() with assertSuccess()
authorDave Lee <davelee.com@gmail.com>
Sat, 12 Feb 2022 05:23:16 +0000 (21:23 -0800)
committerDave Lee <davelee.com@gmail.com>
Mon, 14 Feb 2022 16:31:17 +0000 (08:31 -0800)
commit779bbbf27fe631154bdfaac7a443f198d4654688
treefde0e9527bc0d5a37f487bffc9964738222b3418
parent3c8d2aa87c1701ca16e13f06aea484637e03d005
[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
55 files changed:
lldb/test/API/commands/expression/context-object-objc/TestContextObjectObjc.py
lldb/test/API/commands/platform/basic/TestPlatformPython.py
lldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py
lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py
lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py
lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py
lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py
lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py
lldb/test/API/functionalities/dlopen_other_executable/TestDlopenOtherExecutable.py
lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py
lldb/test/API/functionalities/gdb_remote_client/TestGDBRemoteClient.py
lldb/test/API/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py
lldb/test/API/functionalities/gdb_remote_client/TestMemoryRegionDirtyPages.py
lldb/test/API/functionalities/launch_stop_at_entry/TestStopAtEntry.py
lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py
lldb/test/API/functionalities/paths/TestPaths.py
lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py
lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py
lldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py
lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py
lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py
lldb/test/API/functionalities/return-value/TestReturnValue.py
lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
lldb/test/API/functionalities/scripted_process/TestStackCoreScriptedProcess.py
lldb/test/API/functionalities/step_scripted/TestStepScripted.py
lldb/test/API/functionalities/thread/exit_during_expression/TestExitDuringExpression.py
lldb/test/API/functionalities/thread/state_after_expression/TestStateAfterExpression.py
lldb/test/API/functionalities/var_path/TestVarPath.py
lldb/test/API/lang/c/local_types/TestUseClosestType.py
lldb/test/API/lang/cpp/incomplete-types/TestCppIncompleteTypes.py
lldb/test/API/lang/cpp/trivial_abi/TestTrivialABI.py
lldb/test/API/lang/cpp/type_lookup/TestCppTypeLookup.py
lldb/test/API/lang/objc/blocks/TestObjCIvarsInBlocks.py
lldb/test/API/lang/objc/global_ptrs/TestGlobalObjects.py
lldb/test/API/lang/objc/objc-checker/TestObjCCheckers.py
lldb/test/API/lang/objc/objc-ivar-offsets/TestObjCIvarOffsets.py
lldb/test/API/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
lldb/test/API/lang/objc/objc-property/TestObjCProperty.py
lldb/test/API/linux/aarch64/unwind_signal/TestUnwindSignal.py
lldb/test/API/macosx/function-starts/TestFunctionStarts.py
lldb/test/API/macosx/profile_vrs_detach/TestDetachVrsProfile.py
lldb/test/API/macosx/thread_suspend/TestInternalThreadSuspension.py
lldb/test/API/macosx/universal/TestUniversal.py
lldb/test/API/python_api/debugger/TestDebuggerAPI.py
lldb/test/API/python_api/file_handle/TestFileHandle.py
lldb/test/API/python_api/process/read-mem-cstring/TestReadMemCString.py
lldb/test/API/python_api/sbdata/TestSBData.py
lldb/test/API/python_api/sbmodule/TestSBModule.py
lldb/test/API/python_api/sbplatform/TestSBPlatform.py
lldb/test/API/python_api/sbstructureddata/TestStructuredDataAPI.py
lldb/test/API/python_api/target/TestTargetAPI.py
lldb/test/API/python_api/value/change_values/TestChangeValueAPI.py
lldb/test/API/sample_test/TestSampleTest.py
lldb/test/API/sample_test/main.c