Warn when subtest function does not exist
authorMatthew Wild <mwild1@gmail.com>
Sat, 15 Nov 2008 23:11:17 +0000 (23:11 +0000)
committerMatthew Wild <mwild1@gmail.com>
Sat, 15 Nov 2008 23:11:17 +0000 (23:11 +0000)
tests/test.lua

index c0a27abd2751b86a425ba21ac6dde7d659ef5c83..c028e8595c00186385400c283034efa95d356820 100644 (file)
@@ -71,6 +71,7 @@ function dotest(unitname)
 end
 
 function runtest(f, msg)
+       if not f then print("SUBTEST NOT FOUND: "..(msg or "(no description)")); return; end
        local success, ret = pcall(f);
        if success and verbosity >= 2 then
                print("SUBTEST PASSED: "..(msg or "(no description)"));