Mercurial > hg > octave-terminal
changeset 10112:fddfebeeb33a
Run tests in all *.cc files.
author | David Grundberg <davidg@cs.umu.se> |
---|---|
date | Thu, 14 Jan 2010 16:15:53 -0500 |
parents | b52cba8be2eb |
children | 5aff7f14aa7f |
files | test/ChangeLog test/fntests.m |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,7 @@ +2010-01-14 David Grundberg <davidg@cs.umu.se> + + * fntests.m (run_test_script): Check all *.cc files for tests. + 2010-01-13 Rik <octave@nomad.inbox5.com> * build_bc_overload_tests.sh: Correct test syntax (= vs. ==)
--- a/test/fntests.m +++ b/test/fntests.m @@ -139,9 +139,13 @@ endfor for i = 1:length (lst) nm = lst(i).name; + ## Ignore hidden files + if (nm(1) == '.') + continue + endif f = fullfile (d, nm); if ((length (nm) > 2 && strcmp (nm((end-1):end), ".m")) || - (length (nm) > 3 && strcmp (nm((end-2):end), ".cc") && hasfunctions(f))) + (length (nm) > 3 && strcmp (nm((end-2):end), ".cc"))) p = n = xf = 0; ## Only run if it contains %!test, %!assert %!error or %!warning if (hastests (f)) @@ -155,7 +159,9 @@ dxf += xf; dsk += sk; files_with_tests(end+1) = f; - else + elseif (hasfunctions (f)) + ## To reduce the list length, only mark files that contains + ## DEFUN definitions. files_with_no_tests(end+1) = f; endif endif