MatUnit is a unit testing framework for MATLAB. Much like it's Java counterpart JUnit, it allows the programmer to easily run many tests and report its results for MATLAB functions.
-We want to be able to teach students how to test numerical software.
- Many of them will have seen JUnit or similar frameworks, so a MATLAB testing framework should imitate it.
- Even if they haven't seen JUnit, it's a good framework, so MATLAB's should imitate it anyway.
- We compromised a solution of testing a list of functions, rather than creating a test class (since many users won't have seen classes)
- We created a function 'funcList' to list the names of the tests or subfunctions of an m-file. We would be grateful if someone can suggest a cleaner way.
MatUnit --Performs each test and report the results
TestNorm--Creates list of tests that is passed to MatUnit to execute
funcList--Runs through the test file and return the subfunction/test names
norm2 --Computes the Euclidean norm
· MATLAB Release: R12