Excellent work! I agree with the comment that the use of i and j of variables should be avoided altogether (because i and j are used to work with complex numbers) and to start iterators with k. But that's the only fault I find. I've been using a lot of this for years, but there's still some useful new insights here as well.
In R2013a, a curious glitch has emerged in the behavior of the documentation. When I type 'doc', go to the home page, and click on 'Supplemental Software', I get the documentation for this package (and some others). However, the display flickers. MATLAB Support uncovered the source of the problem: the line
<meta http-equiv="REFRESH" content="0;url=xunit_product_page.html">
in the file index.html.
The fix was to delete index.html and replace it with a copy of xunit_product_page.html, renamed to index.html.
Keith - On my Mac, MATLAB xUnit passes 150 of the 151 test cases in its own test suite. (The one failure seems to be a bad test case.) Use the contact form on my author page (http://www.mathworks.com/matlabcentral/fileexchange/authors/22204) to send me more details about the problem you are experiencing.
Hey, I understand that xUnit is superceded by the official unit test framework in 2013b, but I have a lot of test functions set up for xUnit. When I try to run them in 2013b, even with xUnit put at the top of the path, it doesn't work. Is there a way to either (a) get my old functions to work, or (b) automatically convert my xUnit tests to the new system?
I am sorry it took me so long to post here the promised link to the mocking framework created by Vladimir Peric, a student of mine.
You can download mmockito from GitHub:
It is a lightweight package, that definitely cannot do all the mocking things out there, but for the basic usage it shall be quite handy.
It is created using the new MATLAB unit test framework and should be compliant with it. It should also work with Steve Edins' MATLAB xUnit Framework, although maybe with a bit limited capabilities.
Feel free to report any issues directly on the GitHub page.
We hope you will find it useful.