Warn when subtest function does not exist

Sat, 15 Nov 2008 23:11:17 +0000

author
Matthew Wild <mwild1@gmail.com>
date
Sat, 15 Nov 2008 23:11:17 +0000
changeset 301
fcb7e63630ae
parent 300
0ebf2ef5124e
child 302
8aedb3766ec7

Warn when subtest function does not exist

tests/test.lua file | annotate | diff | comparison | revisions
--- a/tests/test.lua	Sat Nov 15 23:10:41 2008 +0000
+++ b/tests/test.lua	Sat Nov 15 23:11:17 2008 +0000
@@ -71,6 +71,7 @@
 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)"));

mercurial