diff --git a/source/dyaml/test/emitter.d b/source/dyaml/test/emitter.d index 293f236..19ca2cf 100644 --- a/source/dyaml/test/emitter.d +++ b/source/dyaml/test/emitter.d @@ -8,7 +8,7 @@ module dyaml.test.emitter; @safe unittest { - import std.array : Appender; + import std.array : Appender, array; import std.range : ElementType, isInputRange; import dyaml : CollectionStyle, LineBreak, Loader, Mark, ScalarStyle; @@ -40,14 +40,14 @@ module dyaml.test.emitter; { //Must exist due to Anchor, Tags reference counts. auto loader = Loader.fromFile(dataFilename); - auto events = loader.parse(); + auto events = loader.parse().array; auto emitStream = Appender!string(); emitTestCommon(emitStream, events); auto loader2 = Loader.fromString(emitStream.data); loader2.name = "TEST"; auto newEvents = loader2.parse(); - assertEventsEqual(events, newEvents); + assertEventsEqual(dataFilename, events, newEvents); } /** Test emitter by getting events from parsing a canonical YAML file, emitting @@ -60,7 +60,7 @@ module dyaml.test.emitter; { //Must exist due to Anchor, Tags reference counts. auto loader = Loader.fromFile(canonicalFilename); - auto events = loader.parse(); + auto events = loader.parse().array; foreach (canonical; [false, true]) { auto emitStream = Appender!string(); @@ -69,7 +69,7 @@ module dyaml.test.emitter; auto loader2 = Loader.fromString(emitStream.data); loader2.name = "TEST"; auto newEvents = loader2.parse(); - assertEventsEqual(events, newEvents); + assertEventsEqual(canonicalFilename, events, newEvents); } } /** @@ -88,7 +88,7 @@ module dyaml.test.emitter; { //must exist due to Anchor, Tags reference counts auto loader = Loader.fromFile(canonicalFilename); - auto events = loader.parse(); + auto events = loader.parse().array; foreach (flowStyle; [CollectionStyle.block, CollectionStyle.flow]) { foreach (style; [ScalarStyle.literal, ScalarStyle.folded, @@ -121,7 +121,7 @@ module dyaml.test.emitter; auto loader2 = Loader.fromString(emitStream.data); loader2.name = "TEST"; auto newEvents = loader2.parse(); - assertEventsEqual(events, newEvents); + assertEventsEqual(filename, events, newEvents); } } }