69 end |
69 end |
70 end |
70 end |
71 end |
71 end |
72 |
72 |
73 function runtest(f, msg) |
73 function runtest(f, msg) |
|
74 if not f then print("SUBTEST NOT FOUND: "..(msg or "(no description)")); return; end |
74 local success, ret = pcall(f); |
75 local success, ret = pcall(f); |
75 if success and verbosity >= 2 then |
76 if success and verbosity >= 2 then |
76 print("SUBTEST PASSED: "..(msg or "(no description)")); |
77 print("SUBTEST PASSED: "..(msg or "(no description)")); |
77 elseif (not success) and verbosity >= 1 then |
78 elseif (not success) and verbosity >= 1 then |
78 print("SUBTEST FAILED: "..(msg or "(no description)")); |
79 print("SUBTEST FAILED: "..(msg or "(no description)")); |