Next: , Previous: allownextresult keyword, Up: Test Case control


5.7.4 allowerrorcodes keyword

The allowerrorcodes keyword is used to add valid result values for a method and for asynchronous commands. The default value for the expected result is 0, and if a value is set with allowerrorcodes, 0 is removed from the expected values. A method may either return or leave with the specified result. Every method call removes all allowed results. That is, after every method call, the default value 0 is again the only expected result value. Either multiple allowerrorcodes keywords can be placed before a method call or allowerrorcodes keyword can have multiple parameters.

Argument
An error code
Error code, which is allowed from the next method. It can be custom value, or errno.

The allowerrorcodes keyword can be used, for example, in the following way:

     allowerrorcodes -1

The allowerrorcodes keyword can be used, for example, in the following way:

     allowerrorcodes -1 -2 -3 -4