From: <tho...@us...> - 2011-02-17 23:17:12
|
Revision: 8122 http://octave.svn.sourceforge.net/octave/?rev=8122&view=rev Author: thomas-weber Date: 2011-02-17 23:17:06 +0000 (Thu, 17 Feb 2011) Log Message: ----------- Add test with data from the demo Modified Paths: -------------- trunk/octave-forge/main/combinatorics/src/partint.cc Modified: trunk/octave-forge/main/combinatorics/src/partint.cc =================================================================== --- trunk/octave-forge/main/combinatorics/src/partint.cc 2011-02-16 21:53:41 UTC (rev 8121) +++ trunk/octave-forge/main/combinatorics/src/partint.cc 2011-02-17 23:17:06 UTC (rev 8122) @@ -221,6 +221,9 @@ %!assert(partint(1), 1); %!assert(all(partint(n=17) * [1:n]' == n) - 1, 0); +%!test +%! expected = [4,0,0,0; 2,1,0,0; 0,2,0,0; 1,0,1,0; 0,0,0,1]; +%! assert(partint(4), expected); %!fail("partint()", "partint"); %!fail("partint(1,2)", "partint"); %!fail("partint('xyz')", "partint"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |