TestFailures - Maple Help

Online Help

All Products    Maple    MapleSim


CodeTools

  

TestFailures

  

find which, if any, tests have failed

 

Calling Sequence

Description

Examples

Compatibility

Calling Sequence

TestFailures()

Description

• 

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).

Examples

withCodeTools:

Consider the following test suite. We would expect the second and third test case to fail.

Testsinπ,0,label=sine of pi

sine of pi passed

Testcosπ,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

Testtanπ,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

(1)

Compatibility

• 

The CodeTools[TestFailures] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.