This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

Testing and Code Verification

Write single tests and test scripts

MuPAD Functions

testargs Decide whether procedure arguments should be tested
prog::check Checking objects
prog::init Loading objects
prog::tcov Report on test coverage (passed program lines)
prog::test Automatic comparing of calculation results
prog::testexit Closing tests
prog::testinit Initialize tests

Examples and How To

Write Single Tests

The prog::test function is the basic testing tool in MuPAD®.

Write Test Scripts

If you write your code in collaboration with other developers or intend to extend or update it later, you need to test your code more than once.

Code Verification

Even if your code executes without errors, and all your tests run without failures, the code can still have some flaws.


Why Test Your Code

After you debug and optimize your code, you might still need to test it.

Was this topic helpful?