/
assert
assert
Description
Provides a runtime test for error conditions. If the test returns true, the assert passes and does nothing. If the test returns false, the script terminates and an assertion failure is reported along with any number of additional arguments supplied to the assert statement after the test.
The additional arguments can be any string or value that can be printed, similar to the print command.
Functional area
System
Command syntax
Syntax
assert booleanExpression [optionalMessage1] [optionalMessage2] ... |
Arguments
Name | Type | Required | Comments |
---|---|---|---|
booleanExpression | boolean | yes | The condition to check for. If this condition evaluates to false, then the assert will fire and your script will fail. |
Flags
None
Return value
void
Examples
int $i; // Do something intelligent to set the value of i $i = 400; // Check to make sure $i was set properly assert( $i == 400, "i was improperly set to ", $i );
Additional information
Related commands
, multiple selections available,
Related content
hasParameter
hasParameter
More like this
getUseAxiomSolving
getUseAxiomSolving
More like this
compareXMLFiles
compareXMLFiles
More like this
setCheckBoxCheck
setCheckBoxCheck
More like this
getCheckBoxCheck
getCheckBoxCheck
More like this
writeBool
writeBool
More like this