On 13 March 2012 22:22, Thomas Weber <twe...@debian.org> wrote: > On Tue, Mar 13, 2012 at 09:04:42PM +0100, c. wrote: >> Actually there is no simple way to automatically run all tests in a package, >> it would be nice to have a command like >> >> pkg test <package_name> >> >> or rather >> >> pkg install -test <package_name> >> >> as the source code must be availableto run tests in .cc files. > > That's only an issue if you insist that tests must stay in .cc files. > While this makes sense for Octave, it might make more sense for > octave-forge packages to just ship a runUnitTests.m file with all tests > in just one file. Easier to explain to newcomers and easier to implement > in pkg.m. Or, create a test/ directory and all .m files therein are > considered test code. > > Thomas
Hello, What input/output arguments do you propose for the runUnitTests.m file? Shouldn't that file have the package name in its name in order to avoid name clashes, e.g. mypackage_runUnitTests.m ? I am interested in the best practices for exposing the unit test suite as I am currently polishing the ga package [0]. The control package defines a test_control.m [1] script (without output arguments) in order to run all unit tests. Thanks Luca [0] /me working at the new release of the ga package, that will remove the dependency on the communications package and restructure the unit test suite. [1] http://octave.svn.sourceforge.net/viewvc/octave/trunk/octave-forge/main/control/inst/test_control.m?revision=9866&view=markup ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev