Skip to content

Expectation::toRunProcedure ​

Member of Expectation

idl
Expectation.toRunProcedure, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, $
  /_expect_failure, $
  _ref_extra = value, $
  /debug, $
  /time

Verifies that the expectation value is a procedure and can be called with the specified arguments/keywords.

Examples ​

idl
; run a procedure
(it.expects('my_pro')).toRunProcedure

; run with a keyword and verify the result
(it.expects('my_pro')).toRunProcedure, my_keyword = value
(it.expects(value))._not_.toBeNull

Arguments ​

arg1 ​

optionalinputtype=any

First argument passed on to the procedure being called.

arg2 ​

optionalinputtype=any

Second argument passed on to the procedure being called.

arg3 ​

optionalinputtype=any

Third argument passed on to the procedure being called.

arg4 ​

optionalinputtype=any

Fourth argument passed on to the procedure being called.

arg5 ​

optionalinputtype=any

Fifth argument passed on to the procedure being called.

arg6 ​

optionalinputtype=any

Sixth argument passed on to the procedure being called.

arg7 ​

optionalinputtype=any

Seventh argument passed on to the procedure being called.

arg8 ​

optionalinputtype=any

Eighth argument passed on to the procedure being called.

Keywords ​

_expect_failure {#kw-_expect_failure} ​

optionalinputtype=Boolean

If the test fails for some reason, set this to force passing because we expected failure. This is an internal keyword and should not be used.

_ref_extra {#kw-_ref_extra} ​

optionalinputtype=any

All other specified keywords will be passed to the procedure that is being called.

debug ​

optionalinputtype=Boolean

If set, errors in the procedure/function will be stopped on to make it easier to debug errors.

time ​

optionalinputtype=Boolean

If set, the time to run the function will be added to the test summary. Note that this is different from profiling the tests and only times this specific function call.

Licensed under MIT.