octave-maintainers
[Top][All Lists]
Advanced

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

Re: Patch to stop counting missing tests on internal functions


From: John W. Eaton
Subject: Re: Patch to stop counting missing tests on internal functions
Date: Sat, 17 Oct 2009 13:28:32 -0400

On 14-Oct-2009, Rik wrote:

| Maybe we are going about this the wrong way.  The current script
| searches for all *.cc and *.m files and then checks whether there there
| are any test features (%!test, %!assert, %!error, %!warning) in the
| file.  This check is too simplistic and the results are both overly
| pessimistic and overly optimistic.  First, they are overly pessimistic
| because they seem to show that a lot of files are undocumented, but most
| of these files do not contain user functions and instead are helping
| code or auto-generated code.  Secondly, they are overly optimistic about
| coverage because even a single test for a single function will count the
| entire file as being covered.  The file utils.cc has 12 functions in it
| and it would be useful to know which ones actually had coverage.
| 
| What if we start with the list of functions visible to Octave (using
| calls to __builtins__ and __list_functions__) and then cycle through
| that list trying to call any test functions?  If there are no tests then
| the test function returns something to indicate that and we can mark the
| function as needing work.

Searching for .m files seems reasonable because there is one
user-visible function per file.  But yes, we often have more than one
DEFUN in a single .cc file, so I agree that it would be better to do
tests for each DEFUN instead of for each .cc file.  However, we
currently have no way to tag a test as being for a particular
function, so I don't see how to do what you propose.

jwe


reply via email to

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