Output buffer to write to.
IRCEvent to construct assert statements for.
Number of tabs to indent the output by.
IRCEvent event; Appender!(char[]) sink; sink.formatEventAssertBlock(event);
import std.array : Appender; Appender!(char[]) sink; sink.reserve(1024); IRCClient client; IRCServer server; auto parser = IRCParser(client, server); immutable event = parser.toIRCEvent(":zorael!~NaN@2001:41d0:2:80b4:: PRIVMSG #flerrp :kameloso: 8ball"); sink.formatEventAssertBlock(event, 0); assert(sink.data == `{ enum input = ":zorael!~NaN@2001:41d0:2:80b4:: PRIVMSG #flerrp :kameloso: 8ball"; immutable event = parser.toIRCEvent(input); with (event) { assert((type == IRCEvent.Type.CHAN), Enum!(IRCEvent.Type).toString(type)); assert((sender.nickname == "zorael"), sender.nickname); assert((sender.ident == "~NaN"), sender.ident); assert((sender.address == "2001:41d0:2:80b4::"), sender.address); assert((channel == "#flerrp"), channel); assert((content == "kameloso: 8ball"), content); } }`, '\n' ~ sink.data);
Constructs assert statement blocks for each changed field of an IRCEvent.