changeset 9767:f04c21e6cea8 octave-forge

ga: enable unit test for ga Define test function without using "endfunction" in order to support Octave 3.4.
author slackydeb
date Sun, 18 Mar 2012 22:27:44 +0000
parents 96969904dc6b
children 95d6ad64f640
files main/ga/inst/ga.m
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/main/ga/inst/ga.m	Sun Mar 18 22:20:41 2012 +0000
+++ b/main/ga/inst/ga.m	Sun Mar 18 22:27:44 2012 +0000
@@ -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 ());