changeset 14548:604696c3ff93

maint: Add missing test/nest files to build system. * nest/module.mk: Add missing files to list of test files. * nest/test_nest.m: Use Octave coding standards for %!tests.
author Rik <octave@nomad.inbox5.com>
date Wed, 11 Apr 2012 10:35:54 -0700
parents 1bf39e944e43
children ad542fdd8c8f
files test/nest/module.mk test/nest/test_nest.m
diffstat 2 files changed, 21 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/test/nest/module.mk	Wed Apr 11 11:21:30 2012 -0400
+++ b/test/nest/module.mk	Wed Apr 11 10:35:54 2012 -0700
@@ -2,12 +2,14 @@
   nest/arg_nest.m \
   nest/arg_ret.m \
   nest/no_closure.m \
+  nest/persistent_nest.m \
   nest/recursive_nest.m \
   nest/recursive_nest2.m \
   nest/recursive_nest3.m \
   nest/scope0.m \
   nest/scope1.m \
   nest/scope2.m \
+  nest/scope3.m \
   nest/script_nest.m \
   nest/script_nest_script.m \
   nest/test_nest.m \
@@ -15,3 +17,4 @@
   nest/varg_nest2.m
 
 FCN_FILES += $(nest_FCN_FILES)
+
--- a/test/nest/test_nest.m	Wed Apr 11 11:21:30 2012 -0400
+++ b/test/nest/test_nest.m	Wed Apr 11 10:35:54 2012 -0700
@@ -16,19 +16,27 @@
 ## along with Octave; see the file COPYING.  If not, see
 ## <http://www.gnu.org/licenses/>.
 
-%!assert (recursive_nest (), 25);
+################################################################################
+## This file actually executes the tests on nested functions.
+##
+## It relies on the function files defined in the nest/ directory.
+################################################################################
 
-%!assert (recursive_nest2 (), 20);
+%!assert (recursive_nest (), 25)
 
-%!assert (recursive_nest3 (), 5);
+%!assert (recursive_nest2 (), 20)
 
-%!assert (script_nest (), 5);
+%!assert (recursive_nest3 (), 5)
 
-%!assert (arg_ret (), 10);
+%!assert (script_nest (), 5)
+
+%!assert (arg_ret (), 10)
 
-%!assert (varg_nest (-1), 6);
+%!assert (arg_nest, 1)
 
-%!assert (varg_nest2, 5);
+%!assert (varg_nest (-1), 6)
+
+%!assert (varg_nest2, 5)
 
 %!test
 %! scope0;
@@ -39,8 +47,7 @@
 %!test
 %! scope3;
 
-%!assert (arg_nest, 1);
+%!error <D' undefined near line 7> scope2
+%!error <handles to nested functions are not yet supported> no_closure (0)
+%!error <handles to nested functions are not yet supported> no_closure (1)
 
-%!error <D' undefined near line 7> scope2;
-%!error <handles to nested functions are not yet supported> no_closure (0);
-%!error <handles to nested functions are not yet supported> no_closure (1);