Comparison

tests/test.lua @ 370:9ade55e059ea

Update test.lua with a work-in-progress
author Matthew Wild <mwild1@gmail.com>
date Fri, 21 Nov 2008 05:46:15 +0000
parent 361:a2d83b04d769
child 470:2f9d42fdeffa
comparison
equal deleted inserted replaced
369:42de92add67b 370:9ade55e059ea
73 local success, ret = pcall(test, f, unit); 73 local success, ret = pcall(test, f, unit);
74 debug.sethook(); 74 debug.sethook();
75 if not success then 75 if not success then
76 print("TEST FAILED! Unit: ["..unitname.."] Function: ["..name.."]"); 76 print("TEST FAILED! Unit: ["..unitname.."] Function: ["..name.."]");
77 print(" Location: "..ret:gsub(":%s*\n", "\n")); 77 print(" Location: "..ret:gsub(":%s*\n", "\n"));
78 line_info(name, false); 78 line_info(name, false, report_file);
79 elseif verbosity >= 2 then 79 elseif verbosity >= 2 then
80 print("TEST SUCCEEDED: ", unitname, name); 80 print("TEST SUCCEEDED: ", unitname, name);
81 print(string.format("TEST COVERED %d/%d lines", line_info(name, true))); 81 print(string.format("TEST COVERED %d/%d lines", line_info(name, true, report_file)));
82 else 82 else
83 line_info(name, success); 83 line_info(name, success, report_file);
84 end 84 end
85 end 85 end
86 end 86 end
87 end 87 end
88 88