Here is the workaround I came up with for now. Define `packageName`, e.g. `mypackage.test`, then build up the test suite from the files in the package. There is probably a more straightforward way to implement something like this directly xunit, which I'll investigate when I have more time.
ts = TestSuite();
for i = 1:numel( fileName )
fqClassName = [ packageName '.' fileName(i).name(1:end-2) ];
if xunit.utils.isTestCaseSubclass( fqClassName )
ts.add( TestSuite( fqClassName ) );
Dennis, thanks for the proposed fix. This fix wouldn't directly apply to my situation because I'm running tests cases in a package, by passing the package name to `runtests`. If I try specifying the relative or full path to a package, I get "No test cases found", which seems to be because fully qualified function names are not being used to build up the test suite. So your fix might work for the case of specifying a package name if some additional modifications were made to the `fromName` function.
When a package name is specified when calling runtests, the issue seems to be that matlab's meta.package.fromName (line 283 in TestSuite.m) will not return in the list of classes any class that has a syntax error. I'm not sure how to work around that.
Bug report: I have a package of tests, let's call it mypkg.tests. I run all of the tests in the package by typing `runtests mypkg.tests`. I have noticed that if there is a syntax error in one of the test classes, it will be silently skipped. However, if I run the test class by specifying the class explicitly, e.g. `runtests mypkg.tests.MyTestClass`, I see that the tests fail to run because of the syntax error. The syntax error can be an incorrect import statement, or something else equally likely to arise in practice. We have hundreds of tests and dozens of test classes, so this can cause problems for us that are not obvious.
30 Dec 2009
A MATLAB class which controls layout and resize of a figure/uipanel/uicontainer.
Author has done a great job of responding to suggestions and making improvements and minor bug fixes.
In other words, how to draw their values, provided they are stored in my data.mat?
Will the "plot" are the same and I have to use a loop "for"?
Ask directly about the code sample, it's here I deal with a couple of hours.