Skip to content

Commit

Permalink
use same syntax in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Kröplin committed Jan 25, 2019
1 parent c059f25 commit 035bd11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/util/log.d
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,9 @@ unittest
eventInfo.file = "log.d";
eventInfo.line = 42;

alias putMessage = (scope Sink sink) => sink("don't panic");
auto writer = appender!string;

layout(writer, eventInfo, putMessage);
layout(writer, eventInfo, (scope Sink sink) { sink("don't panic"); });
assert(writer.data == "2003-02-01T11:55:00.123+00:00 error log.d:42 don't panic\n");
}

Expand Down

0 comments on commit 035bd11

Please sign in to comment.