&&assertStatus: Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (Ekern moved page &&assertStatus function to &&assertStatus without leaving a redirect)
No edit summary
 
Line 21: Line 21:
| <span class="f_Para">Build 50</span>
| <span class="f_Para">Build 50</span>
|}
|}
[[Category:Debugger Functions]]

Latest revision as of 21:28, 24 August 2022

Action:

Returns a string that contains a summary of the counts of assert command results (since the beginning of the execution of the macro that contains the assert).

Syntax:

&&assertStatus 

The "assert" functions (also including &&assertSuccessCount and &&assertFailureCount) are particularly useful if you are using the assert command to automate your code testing, letting you keep track of the successes and failures of the assertions.

To report the function result, you may want to use the echo command, as shown in the following macro trace output:

>>>macroTrace: macroTrace on
>>>macroTrace: echo &&assertStatus 
Macro message: Assert Summary: Failed: 0, Succeeded: 17 

Introduced: Build 50