Test: Added more ISO8601d tests
This commit is contained in:
@@ -71,7 +71,7 @@ void testParse (
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int argc, char** argv)
|
int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
UnitTest t (845);
|
UnitTest t (848);
|
||||||
|
|
||||||
ISO8601d iso;
|
ISO8601d iso;
|
||||||
std::string::size_type start = 0;
|
std::string::size_type start = 0;
|
||||||
@@ -308,6 +308,12 @@ int main (int argc, char** argv)
|
|||||||
|
|
||||||
t.is (happyNewYear.toString (), "1/1/2008", "toString 1/1/2008");
|
t.is (happyNewYear.toString (), "1/1/2008", "toString 1/1/2008");
|
||||||
|
|
||||||
|
int m, d, y;
|
||||||
|
happyNewYear.toMDY (m, d, y);
|
||||||
|
t.is (m, 1, "1/1/2008 == January");
|
||||||
|
t.is (d, 1, "1/1/2008 == 1");
|
||||||
|
t.is (y, 2008, "1/1/2008 == 2008");
|
||||||
|
|
||||||
// int ISO8601d::length (const std::string&);
|
// int ISO8601d::length (const std::string&);
|
||||||
t.is (ISO8601d::length ("m"), 2, "length 'm' --> 2");
|
t.is (ISO8601d::length ("m"), 2, "length 'm' --> 2");
|
||||||
t.is (ISO8601d::length ("M"), 2, "length 'M' --> 2");
|
t.is (ISO8601d::length ("M"), 2, "length 'M' --> 2");
|
||||||
|
|||||||
Reference in New Issue
Block a user