Comparison

tests/test.lua @ 2246:eb047fe305aa

tests/test.lua: Print the current test being run if verbosity sufficient
author Matthew Wild <mwild1@gmail.com>
date Fri, 27 Nov 2009 17:39:17 +0000
parent 1972:26d4b99ba211
child 2248:37344b18b551
comparison
equal deleted inserted replaced
2245:df9e18f5c808 2246:eb047fe305aa
147 elseif type(test) ~= "function" then 147 elseif type(test) ~= "function" then
148 if verbosity >= 1 then 148 if verbosity >= 1 then
149 print("WARNING: ", unitname.."."..name.." has no test!"); 149 print("WARNING: ", unitname.."."..name.." has no test!");
150 end 150 end
151 else 151 else
152 if verbosity >= 4 then
153 print("INFO: ", "Testing "..unitname.."."..name);
154 end
152 local line_hook, line_info = new_line_coverage_monitor(fn); 155 local line_hook, line_info = new_line_coverage_monitor(fn);
153 debug.sethook(line_hook, "l") 156 debug.sethook(line_hook, "l")
154 local success, ret = pcall(test, f, unit); 157 local success, ret = pcall(test, f, unit);
155 debug.sethook(); 158 debug.sethook();
156 if not success then 159 if not success then