More readable tests.
This commit is contained in:
parent
4faaf77950
commit
c856a35eb0
|
@ -214,10 +214,11 @@ Node[] constructTimestamp()
|
||||||
{
|
{
|
||||||
alias DT = DateTime;
|
alias DT = DateTime;
|
||||||
alias ST = SysTime;
|
alias ST = SysTime;
|
||||||
return [Node([pair("canonical", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"hnsecs"(1000000), UTC())),
|
alias hnsecs = FracSec.from!"hnsecs";
|
||||||
pair("valid iso8601", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"hnsecs"(1000000), UTC())),
|
return [Node([pair("canonical", ST(DT(2001, 12, 15, 2, 59, 43), hnsecs(1000000), UTC())),
|
||||||
pair("space separated", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"hnsecs"(1000000), UTC())),
|
pair("valid iso8601", ST(DT(2001, 12, 15, 2, 59, 43), hnsecs(1000000), UTC())),
|
||||||
pair("no time zone (Z)", ST(DT(2001, 12, 15, 2, 59, 43), FracSec.from!"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()))])];
|
pair("date (00:00:00Z)", ST(DT(2002, 12, 14), UTC()))])];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,12 +278,14 @@ Node[] timestampBugs()
|
||||||
{
|
{
|
||||||
alias DT = DateTime;
|
alias DT = DateTime;
|
||||||
alias ST = SysTime;
|
alias ST = SysTime;
|
||||||
return [Node([Node(ST(DT(2001, 12, 15, 3, 29, 43), FracSec.from!"hnsecs"(1000000), UTC())),
|
alias hnsecs = FracSec.from!"hnsecs";
|
||||||
Node(ST(DT(2001, 12, 14, 16, 29, 43), FracSec.from!"hnsecs"(1000000), UTC())),
|
alias STZ = immutable SimpleTimeZone;
|
||||||
Node(ST(DT(2001, 12, 14, 21, 59, 43), FracSec.from!"hnsecs"(10100), UTC())),
|
return [Node([Node(ST(DT(2001, 12, 15, 3, 29, 43), hnsecs(1000000), UTC())),
|
||||||
Node(ST(DT(2001, 12, 14, 21, 59, 43), new immutable SimpleTimeZone(60.dur!"minutes"))),
|
Node(ST(DT(2001, 12, 14, 16, 29, 43), hnsecs(1000000), UTC())),
|
||||||
Node(ST(DT(2001, 12, 14, 21, 59, 43), new immutable SimpleTimeZone(-90.dur!"minutes"))),
|
Node(ST(DT(2001, 12, 14, 21, 59, 43), hnsecs(10100), UTC())),
|
||||||
Node(ST(DT(2005, 7, 8, 17, 35, 4), FracSec.from!"hnsecs"(5176000), 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()
|
Node[] utf16be()
|
||||||
|
|
Loading…
Reference in a new issue