More readable tests.

This commit is contained in:
Ferdinand Majerech 2014-07-19 04:08:20 +02:00
parent 4faaf77950
commit c856a35eb0

View file

@ -214,10 +214,11 @@ Node[] constructTimestamp()
{
alias DT = DateTime;
alias ST = SysTime;
return [Node([pair("canonical", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"hnsecs"(1000000), UTC())),
pair("valid iso8601", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"hnsecs"(1000000), UTC())),
pair("space separated", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"hnsecs"(1000000), UTC())),
pair("no time zone (Z)", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"hnsecs"(1000000), UTC())),
alias hnsecs = FracSec.from!"hnsecs";
return [Node([pair("canonical", ST(DT(2001, 12, 15, 2, 59, 43), hnsecs(1000000), UTC())),
pair("valid iso8601", ST(DT(2001, 12, 15, 2, 59, 43), hnsecs(1000000), UTC())),
pair("space separated", ST(DT(2001, 12, 15, 2, 59, 43), hnsecs(1000000), UTC())),
pair("no time zone (Z)", ST(DT(2001, 12, 15, 2, 59, 43), hnsecs(1000000), UTC())),
pair("date (00:00:00Z)", ST(DT(2002, 12, 14), UTC()))])];
}
@ -277,12 +278,14 @@ Node[] timestampBugs()
{
alias DT = DateTime;
alias ST = SysTime;
return [Node([Node(ST(DT(2001, 12, 15, 3, 29, 43), FracSec.from!"hnsecs"(1000000), UTC())),
Node(ST(DT(2001, 12, 14, 16, 29, 43), FracSec.from!"hnsecs"(1000000), UTC())),
Node(ST(DT(2001, 12, 14, 21, 59, 43), FracSec.from!"hnsecs"(10100), UTC())),
Node(ST(DT(2001, 12, 14, 21, 59, 43), new immutable SimpleTimeZone(60.dur!"minutes"))),
Node(ST(DT(2001, 12, 14, 21, 59, 43), new immutable SimpleTimeZone(-90.dur!"minutes"))),
Node(ST(DT(2005, 7, 8, 17, 35, 4), FracSec.from!"hnsecs"(5176000), UTC()))])];
alias hnsecs = FracSec.from!"hnsecs";
alias STZ = immutable SimpleTimeZone;
return [Node([Node(ST(DT(2001, 12, 15, 3, 29, 43), hnsecs(1000000), UTC())),
Node(ST(DT(2001, 12, 14, 16, 29, 43), hnsecs(1000000), UTC())),
Node(ST(DT(2001, 12, 14, 21, 59, 43), hnsecs(10100), UTC())),
Node(ST(DT(2001, 12, 14, 21, 59, 43), new STZ(60.dur!"minutes"))),
Node(ST(DT(2001, 12, 14, 21, 59, 43), new STZ(-90.dur!"minutes"))),
Node(ST(DT(2005, 7, 8, 17, 35, 4), hnsecs(5176000), UTC()))])];
}
Node[] utf16be()