From maintainers-request at octave dot org Wed Oct 26 07:02:42 2005 Subject: Re: Converting DejaGNU tests to Paul's test/assert infrastructure From: Paul Kienzle To: David dot Bateman at motorola dot com Cc: octave maintainers mailing list Date: Wed, 26 Oct 2005 08:01:38 -0400 On Oct 26, 2005, at 5:22 AM, David Bateman wrote: > > * The functions in the test scripts are converted to funtion handles > and so things like > fsolve("f", ....) won't work. Paul are the function handles really > needed, or is there a way to > get the same functionality in the test scripts without nested > functions? The problem is that the test function might blow away a function of the same name in the users environment. Instead I'm generating a unique name and returning a handle to that. The alternative is to find a way to create a function in a private namespace only, or to modify the name of the function so that it is guaranteed not to collide. For now we can change the definition to use the function name directly, but build a 'private namespace' in the usual way by changing the function name to package_fn, or in this case, changing function a to function __test_a in the definition and use. Later when support is added for private functions those tests will continue to work without change. - Paul