# HG changeset patch # User David Grundberg # Date 1263503753 18000 # Node ID fddfebeeb33ac1ea4187305aa6490adcf23ed99c # Parent b52cba8be2eb3d9da0a2a8ea791a9b56e5942a48 Run tests in all *.cc files. diff -r b52cba8be2eb -r fddfebeeb33a test/ChangeLog --- a/test/ChangeLog Thu Jan 14 21:50:37 2010 +0100 +++ b/test/ChangeLog Thu Jan 14 16:15:53 2010 -0500 @@ -1,3 +1,7 @@ +2010-01-14 David Grundberg + + * fntests.m (run_test_script): Check all *.cc files for tests. + 2010-01-13 Rik * build_bc_overload_tests.sh: Correct test syntax (= vs. ==) diff -r b52cba8be2eb -r fddfebeeb33a test/fntests.m --- a/test/fntests.m Thu Jan 14 21:50:37 2010 +0100 +++ b/test/fntests.m Thu Jan 14 16:15:53 2010 -0500 @@ -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