octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting DejaGNU tests to Paul's test/assert infrastructure


From: David Bateman
Subject: Re: Converting DejaGNU tests to Paul's test/assert infrastructure
Date: Tue, 25 Oct 2005 16:26:11 +0200
User-agent: Mozilla Thunderbird 0.8 (X11/20040923)

Paul Kienzle wrote:


On Oct 24, 2005, at 9:20 AM, David Bateman wrote:

However, nested functions are not permitted with Paul's test infrastructure. I haven't looked at test.m yet to see, but how complicated would it be to include nested functions in test.m?


You should now be able to build test function blocks with the function name being the name of a shared variable which will last until the end of the test or until the next 'shared' block.

A further problem is the case

%!function x = a()
%! x = 2;
%!assert(a(),2);       # Test a test function with no input args
%!assert(a,2);

The first assert works, but as you used function handles to implement the nested functions, then "a()" works correctly but "a" gives the string value of the function handle rather than calling the function handle itself. This is compatiable behaviour. Without using function handles I see no other way to treat this other than adding the empty parenthesis in the perl script...

Regards
David.

--
David Bateman                                address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]