From 7cf2592ff2b7df3705ccf9f9e37952f12181fce4 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 4 Aug 2017 00:16:43 +0200 Subject: [PATCH] fixed delay unittests --- source/fahrplanparser.d | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/fahrplanparser.d b/source/fahrplanparser.d index 2273c87..952c487 100644 --- a/source/fahrplanparser.d +++ b/source/fahrplanparser.d @@ -96,7 +96,7 @@ in body { auto timeNodes = dp.parseXPath(timeXPath!_timeNodeName); - if(timeNodes.empty) + if (timeNodes.empty) throw new CouldNotFindeNodeException(_timeNodeName); return TimeOfDay.fromISOString(timeNodes.front.getCData ~ "00"); @@ -189,13 +189,13 @@ body assertThrown!(UnexpectedValueException!string)(xml.delay); xml = "1".readDocument.parseXPath("/dp").front; - assertThrown!AssertError(xml.delay); + assert(xml.delay == dur!"seconds"(0)); xml = "1".readDocument.parseXPath("/dp").front; assertThrown!DateTimeException(xml.delay); xml = "1".readDocument.parseXPath("/dp").front; - assertThrown!AssertError(xml.delay); + assert(xml.delay == dur!"seconds"(0)); xml = "".readDocument.parseXPath("/dp").front; assertThrown!AssertError(xml.delay);