Skip to content

Commit

Permalink
Merge pull request #80 from dylan-lang/indent-log-report
Browse files Browse the repository at this point in the history
[log report] Indent based on suite/test hierarchy.
  • Loading branch information
cgay committed Feb 27, 2016
2 parents 0d21ef5 + ebbe819 commit 27e9d95
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions reports.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ end method remove-newlines;

define method log-report-function
(result :: <result>, stream :: <stream>) => ()
let stream = make(<indenting-stream>, inner-stream: stream);
local method generate-report (result :: <result>) => ()
let test-type = result-type-name(result);
format(stream, "\nObject: %s\n", test-type);
Expand All @@ -237,8 +238,10 @@ define method log-report-function
format(stream, "Reason: %s\n", result.result-reason);
end;
for (subresult in result-subresults(result))
generate-report(subresult)
end
with-indentation (stream, 2)
generate-report(subresult);
end with-indentation;
end for;
else
let reason = result.result-reason;
if (reason)
Expand Down

0 comments on commit 27e9d95

Please sign in to comment.