Check that condition is true.
flag = assert_checktrue ( condition )
flag = assert_checktrue ( condition )
[flag,errmsg] = assert_checktrue ( condition )
condition: | a matrix of booleans |
---|
:
Performs silently if all entries in condition are true.
Generates an error if any entry in the condition matrix is false. Generates an error if condition is not a boolean.
If any entry in condition is false,
// Tests which pass
assert_checktrue ( %t );
flag = assert_checktrue ( %t )
[flag,errmsg] = assert_checktrue ( %t )
[flag,errmsg] = assert_checktrue ( [%t %t] );
// Tests which fail
assert_checktrue ( [%t %f] );
flag = assert_checktrue ( [%t %f] )
// No error generated
[flag,errmsg] = assert_checktrue ( [%t %f] )
// Wrong calls
assert_checktrue ( "a" )
Version Description 5.4.0 Function introduced