tests/test.lua

changeset 301
fcb7e63630ae
parent 271
396edd2f9d2e
child 337
4a1dd1c2c219
equal deleted inserted replaced
300:0ebf2ef5124e 301:fcb7e63630ae
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)"));

mercurial