From: <sla...@us...> - 2012-03-18 22:27:50
|
Revision: 9953 http://octave.svn.sourceforge.net/octave/?rev=9953&view=rev Author: slackydeb Date: 2012-03-18 22:27:44 +0000 (Sun, 18 Mar 2012) Log Message: ----------- ga: enable unit test for ga Define test function without using "endfunction" in order to support Octave 3.4. Modified Paths: -------------- trunk/octave-forge/main/ga/inst/ga.m Modified: trunk/octave-forge/main/ga/inst/ga.m =================================================================== --- trunk/octave-forge/main/ga/inst/ga.m 2012-03-18 22:20:41 UTC (rev 9952) +++ trunk/octave-forge/main/ga/inst/ga.m 2012-03-18 22:27:44 UTC (rev 9953) @@ -132,10 +132,9 @@ %!shared f, nvars %! f = @rastriginsfcn; %! nvars = 2; -#%!function [C, Ceq] = nonlcon (x) -#%! C = []; -#%! Ceq = []; -#%!endfunction +%!function [C, Ceq] = nonlcon (x) +%! C = []; +%! Ceq = []; %!test x = ga (f, nvars); %!test x = ga (f, nvars, [], []); %!test x = ga (f, nvars, ones (3, nvars), ones (3, 1)); @@ -145,7 +144,7 @@ %!test x = ga (f, nvars, [], [], [], [], - Inf (1, nvars), Inf (1, nvars)); %!test x = ga (f, nvars, [], [], [], [], - ones (1, nvars), ones (1, nvars)); %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []]); -#%!test x = ga (f, nvars, [], [], [], [], [], [], @nonlcon); +%!test x = ga (f, nvars, [], [], [], [], [], [], @nonlcon); %!test x = ga (f, nvars, [], [], [], [], [], [], @(x) [[], []], gaoptimset ()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |