mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Added more ISO8601d tests
This commit is contained in:
parent
843e49e2bc
commit
76db26e3d7
1 changed files with 9 additions and 1 deletions
|
@ -71,7 +71,7 @@ void testParse (
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (840);
|
||||
UnitTest t (845);
|
||||
|
||||
ISO8601d iso;
|
||||
std::string::size_type start = 0;
|
||||
|
@ -300,6 +300,14 @@ int main (int argc, char** argv)
|
|||
t.is (ISO8601d::dayOfWeek ("Friday"), 5, "Friday == 5");
|
||||
t.is (ISO8601d::dayOfWeek ("Saturday"), 6, "Saturday == 6");
|
||||
|
||||
ISO8601d happyNewYear (1, 1, 2008);
|
||||
t.is (happyNewYear.dayOfWeek (), 2, "1/1/2008 == Tuesday");
|
||||
t.is (happyNewYear.month (), 1, "1/1/2008 == January");
|
||||
t.is (happyNewYear.day (), 1, "1/1/2008 == 1");
|
||||
t.is (happyNewYear.year (), 2008, "1/1/2008 == 2008");
|
||||
|
||||
t.is (happyNewYear.toString (), "1/1/2008", "toString 1/1/2008");
|
||||
|
||||
// int ISO8601d::length (const std::string&);
|
||||
t.is (ISO8601d::length ("m"), 2, "length 'm' --> 2");
|
||||
t.is (ISO8601d::length ("M"), 2, "length 'M' --> 2");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue