changeset 8805:065a05eb148a

test_args.m: don't use assert to test for function handles
author John W. Eaton <jwe@octave.org>
date Wed, 18 Feb 2009 13:05:04 -0500
parents 995f8b064b32
children c7864bb74914
files test/ChangeLog test/test_args.m
diffstat 2 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2009-02-18  John W. Eaton  <jwe@octave.org>
+
+	* test_args.m: Don't use assert to test for function handles.
+
 2009-02-15  John W. Eaton  <jwe@octave.org>
 
 	* test_io.m, test_prefer.m: Avoid command-style function call
--- a/test/test_args.m
+++ b/test/test_args.m
@@ -194,12 +194,16 @@
 
 ## Function handle (builtin)
 %!function f (x = @sin)
-%!  assert (x, @sin)
-%!xtest
+%!  finfo = functions (x);
+%!  fname = finfo.function;
+%!  assert (isa (x, "function_handle") && strcmp (fname, "sin"));
+%!test
 %!  f()
 
 ## Function handle (anonymous)
 %!function f (x = @(x) x.^2)
-%!  assert (x, @(x) x.^2)
-%!xtest
+%!  finfo = functions (x);
+%!  ftype = finfo.type;
+%!  assert (isa (x, "function_handle") && strcmp (ftype, "anonymous"));
+%!test
 %!  f()