# HG changeset patch # User John W. Eaton # Date 1234980304 18000 # Node ID 065a05eb148aeeb1cb2653fc6d9867610d914de5 # Parent 995f8b064b323fef2aac074ad162e5b05d1c1360 test_args.m: don't use assert to test for function handles diff -r 995f8b064b32 -r 065a05eb148a test/ChangeLog --- a/test/ChangeLog Wed Feb 18 11:53:56 2009 -0500 +++ b/test/ChangeLog Wed Feb 18 13:05:04 2009 -0500 @@ -1,3 +1,7 @@ +2009-02-18 John W. Eaton + + * test_args.m: Don't use assert to test for function handles. + 2009-02-15 John W. Eaton * test_io.m, test_prefer.m: Avoid command-style function call diff -r 995f8b064b32 -r 065a05eb148a test/test_args.m --- a/test/test_args.m Wed Feb 18 11:53:56 2009 -0500 +++ b/test/test_args.m Wed Feb 18 13:05:04 2009 -0500 @@ -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()