Path: news.mathworks.com!not-for-mail
From: "Steven Lord" <slord@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call all methods of an object
Date: Sun, 18 May 2008 19:50:54 -0400
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <g0qfcu$tp$1@fred.mathworks.com>
References: <g0pohu$sji$1@fred.mathworks.com>
Reply-To: "Steven Lord" <slord@mathworks.com>
NNTP-Posting-Host: lords.dhcp.mathworks.com
X-Trace: fred.mathworks.com 1211154655 953 144.212.105.187 (18 May 2008 23:50:55 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 18 May 2008 23:50:55 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
Xref: news.mathworks.com comp.soft-sys.matlab:469131



"per isakson" <poi.nospam@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 handle 
to the method and invoke that using the regular functionHandle() syntax.

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/methods.html

-- 
Steve Lord
slord@mathworks.com