mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-24 18:06:42 +02:00
ISO8601d: Added ::leapYear and tests
This commit is contained in:
parent
f615db8a4c
commit
6f5d07dcd4
3 changed files with 18 additions and 1 deletions
|
@ -71,7 +71,7 @@ void testParse (
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (788);
|
||||
UnitTest t (792);
|
||||
|
||||
ISO8601d iso;
|
||||
std::string::size_type start = 0;
|
||||
|
@ -218,6 +218,12 @@ int main (int argc, char** argv)
|
|||
|
||||
try
|
||||
{
|
||||
// Leap year.
|
||||
t.ok (ISO8601d::leapYear (2008), "2008 is a leap year");
|
||||
t.notok (ISO8601d::leapYear (2007), "2007 is not a leap year");
|
||||
t.ok (ISO8601d::leapYear (2000), "2000 is a leap year");
|
||||
t.notok (ISO8601d::leapYear (1900), "1900 is not a leap year");
|
||||
|
||||
t.is (ISO8601d::dayOfWeek ("SUNDAY"), 0, "SUNDAY == 0");
|
||||
t.is (ISO8601d::dayOfWeek ("sunday"), 0, "sunday == 0");
|
||||
t.is (ISO8601d::dayOfWeek ("Sunday"), 0, "Sunday == 0");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue