Mercurial > hg > octave-lojdl
diff src/ov-fcn-handle.cc @ 14429:eff4a5933e28
Update %!tests in src/ directory with Octave coding conventions.
* data.cc, defaults.cc, dirfns.cc, file-io.cc, graphics.cc, mappers.cc,
oct-map.cc, octave.cc, ov-base.cc, ov-bool-mat.cc, ov-cell.cc,
ov-fcn-handle.cc, ov-fcn-inline.cc, ov-flt-re-mat.cc, ov-int16.cc, ov-int32.cc,
ov-int64.cc, ov-int8.cc, ov-null-mat.cc, ov-oncleanup.cc, ov-range.cc,
ov-re-mat.cc, ov-struct.cc, ov-typeinfo.cc, ov-uint16.cc, ov-uint32.cc,
ov-uint64.cc, ov-uint8.cc, ov.cc, pr-output.cc, pt-binop.cc, pt-eval.cc,
pt-idx.cc, pt-mat.cc, sighandlers.cc, strfns.cc, symtab.cc, syscalls.cc,
sysdep.cc, toplev.cc, utils.cc, variables.cc: Update %!tests in src/ directory
with Octave coding conventions.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 04 Mar 2012 12:21:10 -0800 (2012-03-04) |
parents | 3972c4caa60a |
children | be18c9e359bf |
line wrap: on
line diff
--- a/src/ov-fcn-handle.cc +++ b/src/ov-fcn-handle.cc @@ -1288,7 +1288,6 @@ #endif /* - %!test %! a = 2; %! f = @(x) a + x; @@ -1302,26 +1301,25 @@ %! hdld2 = hdld; %! hbi2 = hbi; %! modes = {"-text", "-binary"}; -%! if (!isempty(findstr(octave_config_info ("DEFS"),"HAVE_HDF5"))) +%! if (!isempty (findstr (octave_config_info ("DEFS"), "HAVE_HDF5"))) %! modes(end+1) = "-hdf5"; %! endif %! for i = 1:numel (modes) %! mode = modes{i}; -%! nm = tmpnam(); +%! nm = tmpnam (); %! unwind_protect %! save (mode, nm, "f2", "g2", "hm2", "hdld2", "hbi2"); %! clear f2 g2 hm2 hdld2 hbi2 %! load (nm); -%! assert (f(2),f2(2)); -%! assert (g(2),g2(2)); -%! assert (g(3),g2(3)); +%! assert (f (2), f2 (2)); +%! assert (g (2), g2 (2)); +%! assert (g (3), g2 (3)); %! unlink (nm); %! save (mode, nm, "f2", "g2", "hm2", "hdld2", "hbi2"); %! unwind_protect_cleanup %! unlink (nm); %! end_unwind_protect %! endfor - */ void @@ -1592,7 +1590,7 @@ %! "&", "and"; %! "|", "or"}; %! for i = 1:rows (x) -%! assert (functions (str2func (x{i,1})).function, x{i,2}) +%! assert (functions (str2func (x{i,1})).function, x{i,2}); %! endfor */ @@ -1759,7 +1757,6 @@ } /* - %!function y = __testrecursionfunc (f, x, n) %! if (nargin < 3) %! n = 0; @@ -1768,12 +1765,11 @@ %! y = f (x); %! else %! n++; -%! y = __testrecursionfunc (@(x) f(2*x), x, n); +%! y = __testrecursionfunc (@(x) f (2*x), x, n); %! endif %!endfunction %! %!assert (__testrecursionfunc (@(x) x, 1), 8) - */ DEFUN (is_function_handle, args, , @@ -1802,12 +1798,11 @@ %!assert (is_function_handle (fh)) %!assert (! is_function_handle ({fh})) %!assert (! is_function_handle (1)) -%!error is_function_handle (); -%!error is_function_handle (1, 2); +%!error is_function_handle () +%!error is_function_handle (1, 2) */ - octave_fcn_binder::octave_fcn_binder (const octave_value& f, const octave_value& root, const octave_value_list& templ,