CodeTools
TestFailures
find which, if any, tests have failed
Calling Sequence
Description
Examples
Compatibility
TestFailures()
The TestFailures command will return a list of the labels for all of the calls to Test that have failed in the current session (that is, since the last restart command).
with⁡CodeTools:
Consider the following test suite. We would expect the second and third test case to fail.
Test⁡sin⁡π,0,label=sine of pi
sine of pi passed
Test⁡cos⁡π,12,label=cosine of pi
cosine of pi failed Expected result : 1/2 Evaluated result: -1
Error, (in CodeTools:-Test) TEST FAILED: cosine of pi
Test⁡tan⁡π,1
Test 1 failed Expected result : 1 Evaluated result: 0
Error, (in CodeTools:-Test) TEST FAILED
We now obtain the list of failures. Note the label for the third test case has been generated.
TestFailures⁡
cosine of pi,Test 1
The CodeTools[TestFailures] command was introduced in Maple 2021.
For more information on Maple 2021 changes, see Updates in Maple 2021.
Download Help Document