Skip to content

Commit

Permalink
Change Test() to report file locations in FILE:LINE format
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Feb 8, 2016
1 parent 247740a commit 17ca2a9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions lib/test.gi
Original file line number Diff line number Diff line change
Expand Up @@ -329,20 +329,25 @@ InstallGlobalFunction("Test", function(arg)
if d[1] <> '-' then
d := Concatenation("+", d);
fi;
Print("########> Time diff in ",
fnam,", line ",line,":\n");
Print("########> Time diff in ");
if IsStream(fnam) then
Print("test stream, line ",line,"\n");
else
Print(fnam,":",line,"\n");
fi;
Print("# Input:\n", inp);
Print("# Old time: ", oldt," New time: ", newt,
" (", d, "%)\n");
end,
rewriteToFile := false,
breakOnError := false,
reportDiff := function(inp, expout, found, fnam, line, time)
Print("########> Diff in ");
if IsStream(fnam) then
fnam := "test stream";
Print("test stream, line ",line,"\n");
else
Print(fnam,":",line,"\n");
fi;
Print("########> Diff in ",
fnam,", line ",line,":\n");
Print("# Input is:\n", inp);
Print("# Expected output:\n", expout);
Print("# But found:\n", found);
Expand Down

0 comments on commit 17ca2a9

Please sign in to comment.