This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Testing and Code Verification

Write single tests and test scripts

MuPAD Functions

testargsDecide whether procedure arguments should be tested
prog::checkChecking objects
prog::initLoading objects
prog::tcovReport on test coverage (passed program lines)
prog::testAutomatic comparing of calculation results
prog::testexitClosing tests
prog::testinitInitialize 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?