octave-maintainers
[Top][All Lists]
Advanced

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

Re: tests in private m-scripts


From: John W. Eaton
Subject: Re: tests in private m-scripts
Date: Fri, 18 Jul 2014 16:04:43 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

On 07/18/2014 12:26 PM, Rik wrote:
On 07/18/2014 08:32 AM, Andreas Weber wrote:
Hi Rik.

While digging into the fltk plotting routines I found a note from you
(http://hg.savannah.gnu.org/hgweb/octave/rev/12793):

## Test blocks are not allowed (and not needed) for private functions
and the following tests in
scripts/plot/util/private/__print_parse_opts__.m are disables with #%!test.
Andreas,

In general the private functions are helping functions for some other main
function.  Tests for behavior should be in the main function.

Maybe others on the Maintainers list have an opinion on this one.  I would
lean towards removing them as I can see that several are out of date.o

I'd also favor removing tests for the private functions.

It's not always possible to test private functions in isolation, any more than it would be to test a subfunction or a nested function outside of the context of the parent function. For example, correctly testing them and ensuring the proper scoping rules requires that they be in the private directory (not in a directory that is explicitly in the load path) and that they are called from a function in the directory that contains the private subdirectory.

jwe





reply via email to

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