Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!nx01.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!m3g2000hsc.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call all methods of an object
Date: Sun, 18 May 2008 17:48:32 -0700 (PDT)
Organization: http://groups.google.com
Lines: 32
Message-ID: <a8af7cd9-686d-422f-afd6-1f184e74bb23@m3g2000hsc.googlegroups.com>
References: <g0pohu$sji$1@fred.mathworks.com> <g0qfcu$tp$1@fred.mathworks.com>
NNTP-Posting-Host: 75.186.67.199
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1211158112 10494 127.0.0.1 (19 May 2008 00:48:32 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 19 May 2008 00:48:32 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: m3g2000hsc.googlegroups.com; posting-host=75.186.67.199; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
Xref: news.mathworks.com comp.soft-sys.matlab:469133


On May 18, 7:50=A0pm, "Steven Lord" <sl...@mathworks.com> wrote:
> "per isakson" <poi.nos...@bimDOTkthDOT.se> wrote in message
>
> news:g0pohu$sji$1@fred.mathworks.com...
>
> > The tool for Unit Testing that I use, MUNIT (xtargets),
> > doesn't work under R2008a. Now I'm looking for a
> > replacement.
>
> > In such a tool one need to run all tests in a file, which
> > might be implemented as invoking "all" methods of an
> > object. What would be the best way to do that? The feature
> > demonstrated by this example looks useful. However, is it
> > documented?
>
> I'd do this using the METHODS function to obtain the list of methods, then=

> use FEVAL to evaluate the method or use STR2FUNC to create a function hand=
le
> to the method and invoke that using the regular functionHandle() syntax.
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html
>
> --
> Steve Lord
> sl...@mathworks.com

-------------------------------------------------------
If you don't know the methods in advance, and have to get their names
from the METHODS function, then how do you know what arguments to pass
to those methods?  Calling a method without passing it the proper
arguments will likely cause an exception.