Skip to content

Commit b748f12

Browse files
committed
[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 (cherry picked from commit 779bbbf)
1 parent 698e047 commit b748f12

File tree

52 files changed

+155
-163
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+155
-163
lines changed

lldb/test/API/commands/expression/context-object-objc/TestContextObjectObjc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def test_context_object_objc(self):
3636
# Test retrieving of a field (not a local with the same name)
3737
value = obj_val.EvaluateExpression("field")
3838
self.assertTrue(value.IsValid())
39-
self.assertTrue(value.GetError().Success())
39+
self.assertSuccess(value.GetError())
4040
self.assertEqual(value.GetValueAsSigned(), 1111)
4141

4242
# Test if the self pointer is properly evaluated

lldb/test/API/commands/platform/basic/TestPlatformPython.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,5 @@ def test_shell_interpreter(self):
9494
self.build()
9595
sh_cmd.SetShell(self.getBuildArtifact('a.out'))
9696
err = platform.Run(sh_cmd)
97-
self.assertTrue(err.Success())
97+
self.assertSuccess(err)
9898
self.assertIn("SUCCESS", sh_cmd.GetOutput())

lldb/test/API/commands/watchpoints/multiple_hits/TestMultipleHits.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test(self):
4343

4444
error = lldb.SBError()
4545
watch = member.Watch(True, True, True, error)
46-
self.assertTrue(error.Success())
46+
self.assertSuccess(error)
4747

4848
process.Continue();
4949
self.assertEqual(process.GetState(), lldb.eStateStopped)

lldb/test/API/commands/watchpoints/step_over_watchpoint/TestStepOverWatchpoint.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@ def test(self):
5555

5656
# resolve_location=True, read=True, write=False
5757
read_watchpoint = read_value.Watch(True, True, False, error)
58-
self.assertTrue(error.Success(),
59-
"Error while setting watchpoint: %s" %
60-
error.GetCString())
58+
self.assertSuccess(error, "Error while setting watchpoint")
6159
self.assertTrue(read_watchpoint, "Failed to set read watchpoint.")
6260

6361
thread.StepOver()
@@ -85,9 +83,7 @@ def test(self):
8583
# resolve_location=True, read=False, write=True
8684
write_watchpoint = write_value.Watch(True, False, True, error)
8785
self.assertTrue(write_watchpoint, "Failed to set write watchpoint.")
88-
self.assertTrue(error.Success(),
89-
"Error while setting watchpoint: %s" %
90-
error.GetCString())
86+
self.assertSuccess(error, "Error while setting watchpoint")
9187

9288
thread.StepOver()
9389
self.assertEquals(thread.GetStopReason(), lldb.eStopReasonWatchpoint,

lldb/test/API/functionalities/breakpoint/auto_continue/TestBreakpointAutoContinue.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def launch_it (self, expected_state):
4848
launch_info.SetWorkingDirectory(self.get_process_working_directory())
4949

5050
process = self.target.Launch(launch_info, error)
51-
self.assertTrue(error.Success(), "Launch failed.")
51+
self.assertSuccess(error, "Launch failed.")
5252

5353
state = process.GetState()
5454
self.assertEqual(state, expected_state, "Didn't get expected state")

lldb/test/API/functionalities/breakpoint/breakpoint_command/TestBreakpointCommandsFromPython.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def do_set_python_command_from_python(self):
110110
stream.Print('{"side_effect" : "I am fancy"}')
111111
extra_args.SetFromJSON(stream)
112112
error = fancy_bkpt.SetScriptCallbackFunction("bktptcmd.another_function", extra_args)
113-
self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
113+
self.assertSuccess(error, "Failed to add callback")
114114

115115
stream.Clear()
116116
stream.Print('{"side_effect" : "I am so much fancier"}')
@@ -123,14 +123,14 @@ def do_set_python_command_from_python(self):
123123
# Not so fancy gets an empty extra_args:
124124
empty_args = lldb.SBStructuredData()
125125
error = not_so_fancy_bkpt.SetScriptCallbackFunction("bktptcmd.empty_extra_args", empty_args)
126-
self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
126+
self.assertSuccess(error, "Failed to add callback")
127127

128128
# Do list breakpoint like fancy:
129129
stream.Clear()
130130
stream.Print('{"side_effect" : "I come from list input"}')
131131
extra_args.SetFromJSON(stream)
132132
error = list_bkpt.SetScriptCallbackFunction("bktptcmd.a_list_function", extra_args)
133-
self.assertTrue(error.Success(), "Failed to add callback %s"%(error.GetCString()))
133+
self.assertSuccess(error, "Failed to add callback")
134134

135135
# Clear out canary variables
136136
side_effect.bktptcmd = None

lldb/test/API/functionalities/breakpoint/scripted_bkpt/TestScriptedResolver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def make_extra_args(self):
7171
json_stream.Print(json_string)
7272
extra_args = lldb.SBStructuredData()
7373
error = extra_args.SetFromJSON(json_stream)
74-
self.assertTrue(error.Success(), "Error making SBStructuredData: %s"%(error.GetCString()))
74+
self.assertSuccess(error, "Error making SBStructuredData")
7575
return extra_args
7676

7777
def do_test(self):

lldb/test/API/functionalities/breakpoint/serialize/TestBreakpointSerialization.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ def check_equivalence(self, source_bps, do_write = True):
119119

120120
if (do_write):
121121
error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, source_bps)
122-
self.assertTrue(error.Success(), "Failed writing breakpoints to file: %s."%(error.GetCString()))
122+
self.assertSuccess(error, "Failed writing breakpoints to file")
123123

124124
copy_bps = lldb.SBBreakpointList(self.copy_target)
125125
error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
126-
self.assertTrue(error.Success(), "Failed reading breakpoints from file: %s"%(error.GetCString()))
126+
self.assertSuccess(error, "Failed reading breakpoints from file")
127127

128128
num_source_bps = source_bps.GetSize()
129129
num_copy_bps = copy_bps.GetSize()
@@ -279,7 +279,7 @@ def do_check_appending(self):
279279

280280
error = lldb.SBError()
281281
error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, source_bps)
282-
self.assertTrue(error.Success(), "Failed writing breakpoints to file: %s."%(error.GetCString()))
282+
self.assertSuccess(error, "Failed writing breakpoints to file")
283283

284284
source_bps.Clear()
285285

@@ -299,7 +299,7 @@ def do_check_appending(self):
299299
all_bps.Append(bkpt)
300300

301301
error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, source_bps, True)
302-
self.assertTrue(error.Success(), "Failed appending breakpoints to file: %s."%(error.GetCString()))
302+
self.assertSuccess(error, "Failed appending breakpoints to file")
303303

304304
self.check_equivalence(all_bps)
305305

@@ -313,19 +313,19 @@ def do_check_names(self):
313313

314314
error = lldb.SBError()
315315
error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
316-
self.assertTrue(error.Success(), "Failed writing breakpoints to file: %s."%(error.GetCString()))
316+
self.assertSuccess(error, "Failed writing breakpoints to file")
317317

318318
copy_bps = lldb.SBBreakpointList(self.copy_target)
319319
names_list = lldb.SBStringList()
320320
names_list.AppendString("NoSuchName")
321321

322322
error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, names_list, copy_bps)
323-
self.assertTrue(error.Success(), "Failed reading breakpoints from file: %s"%(error.GetCString()))
323+
self.assertSuccess(error, "Failed reading breakpoints from file")
324324
self.assertEqual(copy_bps.GetSize(), 0, "Found breakpoints with a nonexistent name.")
325325

326326
names_list.AppendString(good_bkpt_name)
327327
error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, names_list, copy_bps)
328-
self.assertTrue(error.Success(), "Failed reading breakpoints from file: %s"%(error.GetCString()))
328+
self.assertSuccess(error, "Failed reading breakpoints from file")
329329
self.assertEqual(copy_bps.GetSize(), 1, "Found the matching breakpoint.")
330330

331331
def do_check_extra_args(self):
@@ -348,12 +348,12 @@ def do_check_extra_args(self):
348348
write_bps = lldb.SBBreakpointList(self.orig_target)
349349

350350
error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
351-
self.assertTrue(error.Success(), "Failed writing breakpoints: %s"%(error.GetCString()))
351+
self.assertSuccess(error, "Failed writing breakpoints")
352352

353353
side_effect.g_extra_args = None
354354
copy_bps = lldb.SBBreakpointList(self.copy_target)
355355
error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
356-
self.assertTrue(error.Success(), "Failed reading breakpoints: %s"%(error.GetCString()))
356+
self.assertSuccess(error, "Failed reading breakpoints")
357357

358358
self.assertEqual(copy_bps.GetSize(), 1, "Got one breakpoint from file.")
359359
no_keys = lldb.SBStringList()
@@ -377,7 +377,7 @@ def do_check_extra_args(self):
377377
write_bps = lldb.SBBreakpointList(self.orig_target)
378378

379379
error = self.orig_target.BreakpointsWriteToFile(self.bkpts_file_spec, write_bps)
380-
self.assertTrue(error.Success(), "Failed writing breakpoints: %s"%(error.GetCString()))
380+
self.assertSuccess(error, "Failed writing breakpoints")
381381

382382
orig_extra_args = side_effect.g_extra_args
383383
self.assertTrue(orig_extra_args.IsValid(), "Extra args originally valid")
@@ -390,7 +390,7 @@ def do_check_extra_args(self):
390390

391391
copy_bps = lldb.SBBreakpointList(self.copy_target)
392392
error = self.copy_target.BreakpointsCreateFromFile(self.bkpts_file_spec, copy_bps)
393-
self.assertTrue(error.Success(), "Failed reading breakpoints: %s"%(error.GetCString()))
393+
self.assertSuccess(error, "Failed reading breakpoints")
394394

395395
self.assertEqual(copy_bps.GetSize(), 1, "Got one breakpoint from file.")
396396

lldb/test/API/functionalities/dlopen_other_executable/TestDlopenOtherExecutable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def test(self):
3939

4040
# Kill the process and run the program again.
4141
err = self.process().Kill()
42-
self.assertTrue(err.Success(), str(err))
42+
self.assertSuccess(err)
4343

4444
# Test that we hit the breakpoint after dlopen.
4545
lldbutil.run_to_breakpoint_do_run(self, self.target(), breakpoint)

lldb/test/API/functionalities/dyld-launch-linux/TestDyldLaunchLinux.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test(self):
4040
launch_info.SetWorkingDirectory(self.get_process_working_directory())
4141
error = lldb.SBError()
4242
process = target.Launch(launch_info, error)
43-
self.assertTrue(error.Success())
43+
self.assertSuccess(error)
4444

4545
# Stopped on main here.
4646
self.assertEqual(process.GetState(), lldb.eStateStopped)

lldb/test/API/functionalities/gdb_remote_client/TestJLink6Armv7RegisterDefinition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def QListThreadsInStopReply(self):
189189
data = lldb.SBData()
190190
data.SetData(error, val, lldb.eByteOrderBig, 4)
191191
self.assertEqual(r1_valobj.SetData(data, error), True)
192-
self.assertTrue(error.Success())
192+
self.assertSuccess(error)
193193

194194
r1_valobj = process.GetThreadAtIndex(0).GetFrameAtIndex(0).FindRegister("r1")
195195
self.assertEqual(r1_valobj.GetValueAsUnsigned(), 0x11223344)

lldb/test/API/functionalities/gdb_remote_client/TestMemoryRegionDirtyPages.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,30 @@ def qMemoryRegionInfo(self, addr):
3434
# A memory region where we don't know anything about dirty pages
3535
region = lldb.SBMemoryRegionInfo()
3636
err = process.GetMemoryRegionInfo(0, region)
37-
self.assertTrue(err.Success())
37+
self.assertSuccess(err)
3838
self.assertFalse(region.HasDirtyMemoryPageList())
3939
self.assertEqual(region.GetNumDirtyPages(), 0)
4040
region.Clear()
4141

4242
# A memory region with dirty page information -- and zero dirty pages
4343
err = process.GetMemoryRegionInfo(0x100000000, region)
44-
self.assertTrue(err.Success())
44+
self.assertSuccess(err)
4545
self.assertTrue(region.HasDirtyMemoryPageList())
4646
self.assertEqual(region.GetNumDirtyPages(), 0)
4747
self.assertEqual(region.GetPageSize(), 4096)
4848
region.Clear()
4949

5050
# A memory region with one dirty page
5151
err = process.GetMemoryRegionInfo(0x100004000, region)
52-
self.assertTrue(err.Success())
52+
self.assertSuccess(err)
5353
self.assertTrue(region.HasDirtyMemoryPageList())
5454
self.assertEqual(region.GetNumDirtyPages(), 1)
5555
self.assertEqual(region.GetDirtyPageAddressAtIndex(0), 0x100004000)
5656
region.Clear()
5757

5858
# A memory region with multple dirty pages
5959
err = process.GetMemoryRegionInfo(0x1000a2000, region)
60-
self.assertTrue(err.Success())
60+
self.assertSuccess(err)
6161
self.assertTrue(region.HasDirtyMemoryPageList())
6262
self.assertEqual(region.GetNumDirtyPages(), 5)
6363
self.assertEqual(region.GetDirtyPageAddressAtIndex(4), 0x1000a6000)

lldb/test/API/functionalities/launch_stop_at_entry/TestStopAtEntry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def cleanup ():
8686
error = lldb.SBError()
8787

8888
process = target.Launch(launch_info, error)
89-
self.assertTrue(error.Success(), "Launch failed: {0}".format(error.description))
89+
self.assertSuccess(error, "Launch failed")
9090
# If we are asynchronous, we have to wait for the events:
9191
if not synchronous:
9292
listener = launch_info.GetListener()
@@ -106,7 +106,7 @@ def cleanup ():
106106

107107
# Now make sure that we can resume the process and have it exit.
108108
error = process.Continue()
109-
self.assertTrue(error.Success(), "Error continuing: {0}".format(error.description))
109+
self.assertSuccess(error, "Error continuing")
110110
# Fetch events till we get eStateExited:
111111
if not synchronous:
112112
# Get events till exited.

lldb/test/API/functionalities/load_using_paths/TestLoadUsingPaths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_load_using_paths(self):
8585

8686
# Now see that we can call a function in the loaded module.
8787
value = thread.frames[0].EvaluateExpression("d_function()", lldb.SBExpressionOptions())
88-
self.assertTrue(value.GetError().Success(), "Got a value from the expression")
88+
self.assertSuccess(value.GetError(), "Got a value from the expression")
8989
ret_val = value.GetValueAsSigned()
9090
self.assertEqual(ret_val, 12345, "Got the right value")
9191

lldb/test/API/functionalities/paths/TestPaths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def test_interpreter_info(self):
4949
info_sd = self.dbg.GetScriptInterpreterInfo(self.dbg.GetScriptingLanguage("python"))
5050
self.assertTrue(info_sd.IsValid())
5151
stream = lldb.SBStream()
52-
self.assertTrue(info_sd.GetAsJSON(stream).Success())
52+
self.assertSuccess(info_sd.GetAsJSON(stream))
5353
info = json.loads(stream.GetData())
5454
prefix = info['prefix']
5555
self.assertEqual(os.path.realpath(sys.prefix), os.path.realpath(prefix))

lldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def test_two_cores_same_pid(self):
109109
error = lldb.SBError()
110110
F = altprocess.ReadCStringFromMemory(
111111
altframe.FindVariable("F").GetValueAsUnsigned(), 256, error)
112-
self.assertTrue(error.Success())
112+
self.assertSuccess(error)
113113
self.assertEqual(F, "_start")
114114

115115
# without destroying this process, run the test which opens another core file with the

lldb/test/API/functionalities/postmortem/minidump-new/TestMiniDumpNew.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def test_loadcore_error_status(self):
6565
error = lldb.SBError()
6666
self.process = self.target.LoadCore(minidump_path, error)
6767
self.assertTrue(self.process, PROCESS_IS_VALID)
68-
self.assertTrue(error.Success())
68+
self.assertSuccess(error)
6969

7070
def test_loadcore_error_status_failure(self):
7171
"""Test the SBTarget.LoadCore(core, error) overload."""

lldb/test/API/functionalities/postmortem/minidump/TestMiniDump.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_deeper_stack_in_mini_dump(self):
123123
self.assertEqual(process.GetState(), lldb.eStateStopped)
124124
self.assertTrue(process.SaveCore(core))
125125
self.assertTrue(os.path.isfile(core))
126-
self.assertTrue(process.Kill().Success())
126+
self.assertSuccess(process.Kill())
127127

128128
# Launch with the mini dump, and inspect the stack.
129129
target = self.dbg.CreateTarget(None)
@@ -159,7 +159,7 @@ def test_local_variables_in_mini_dump(self):
159159
self.assertEqual(process.GetState(), lldb.eStateStopped)
160160
self.assertTrue(process.SaveCore(core))
161161
self.assertTrue(os.path.isfile(core))
162-
self.assertTrue(process.Kill().Success())
162+
self.assertSuccess(process.Kill())
163163

164164
# Launch with the mini dump, and inspect a local variable.
165165
target = self.dbg.CreateTarget(None)

lldb/test/API/functionalities/process_crash_info/TestProcessCrashInfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_api(self):
6363

6464
error = crash_info.GetAsJSON(stream)
6565

66-
self.assertTrue(error.Success())
66+
self.assertSuccess(error)
6767

6868
self.assertTrue(crash_info.IsValid())
6969

lldb/test/API/functionalities/process_save_core/TestProcessSaveCore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_save_windows_mini_dump(self):
4343
self.assertEqual(process.GetState(), lldb.eStateStopped)
4444
self.assertTrue(process.SaveCore(core))
4545
self.assertTrue(os.path.isfile(core))
46-
self.assertTrue(process.Kill().Success())
46+
self.assertSuccess(process.Kill())
4747

4848
# To verify, we'll launch with the mini dump, and ensure that we see
4949
# the executable in the module list.
@@ -77,7 +77,7 @@ def test_save_core_via_process_plugin(self):
7777
self.assertEqual(process.GetState(), lldb.eStateStopped)
7878
self.assertTrue(process.SaveCore(core))
7979
self.assertTrue(os.path.isfile(core))
80-
self.assertTrue(process.Kill().Success())
80+
self.assertSuccess(process.Kill())
8181
pid = process.GetProcessID()
8282

8383
target = self.dbg.CreateTarget(None)

lldb/test/API/functionalities/process_save_core_minidump/TestProcessSaveCoreMinidump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_save_linux_mini_dump(self):
4343
# save core and, kill process and verify corefile existence
4444
self.runCmd("process save-core --plugin-name=minidump --style=stack " + core)
4545
self.assertTrue(os.path.isfile(core))
46-
self.assertTrue(process.Kill().Success())
46+
self.assertSuccess(process.Kill())
4747

4848
# To verify, we'll launch with the mini dump
4949
target = self.dbg.CreateTarget(None)

lldb/test/API/functionalities/return-value/TestReturnValue.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_with_python(self):
5050
# inner_sint returns the variable value, so capture that here:
5151
in_int = thread.GetFrameAtIndex(0).FindVariable(
5252
"value").GetValueAsSigned(error)
53-
self.assertTrue(error.Success())
53+
self.assertSuccess(error)
5454

5555
thread.StepOut()
5656

@@ -65,7 +65,7 @@ def test_with_python(self):
6565
self.assertTrue(return_value.IsValid())
6666

6767
ret_int = return_value.GetValueAsSigned(error)
68-
self.assertTrue(error.Success())
68+
self.assertSuccess(error)
6969
self.assertEquals(in_int, ret_int)
7070

7171
# Run again and we will stop in inner_sint the second time outer_sint is called.
@@ -82,7 +82,7 @@ def test_with_python(self):
8282
fun_name = frame.GetFunctionName()
8383
self.assertEquals(fun_name, "outer_sint(int)")
8484
in_int = frame.FindVariable("value").GetValueAsSigned(error)
85-
self.assertTrue(error.Success())
85+
self.assertSuccess(error)
8686

8787
thread.StepOutOfFrame(frame)
8888

@@ -95,7 +95,7 @@ def test_with_python(self):
9595
ret_value = thread.GetStopReturnValue()
9696
self.assertTrue(return_value.IsValid())
9797
ret_int = ret_value.GetValueAsSigned(error)
98-
self.assertTrue(error.Success())
98+
self.assertSuccess(error)
9999
self.assertEquals(2 * in_int, ret_int)
100100

101101
# Now try some simple returns that have different types:

lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def cleanup():
7070

7171
process = target.Launch(launch_info, error)
7272

73-
self.assertTrue(error.Success(), error.GetCString())
73+
self.assertSuccess(error)
7474
self.assertTrue(process, PROCESS_IS_VALID)
7575
self.assertEqual(process.GetProcessID(), 666)
7676
self.assertEqual(process.GetNumThreads(), 0)

0 commit comments

Comments
 (0)