Function calls

System Testing for C

The CALL instruction lets you call functions or methods in a test script and to check return values of functions or methods.

For the following example, you must pre-declare the param1, param2, param4, and return_param variables in the test script, using native language.

CALL function ( )

-- indicates that the return parameter is neither checked nor stored in a variable.

CALL function ( ) @ "abc"

-- indicates that the return parameter to the function must be compared with the string "abc", but its value is not stored in a variable.

CALL function ( ) @@return_param

-- indicates that the return parameter is not checked, but is stored in the variable return_param.

CALL function ( ) @ 25 @return_param

-- indicates that the return parameter is checked against 25 and is stored in the variable return_param.

Related Topics

Using Native Language | CALL