mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Test: Added more date tests
This commit is contained in:
parent
0449215bbb
commit
c86b562a4a
1 changed files with 37 additions and 34 deletions
|
@ -55,7 +55,7 @@ void testInit (UnitTest& t, const std::string& value, Variant& var)
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int argc, char** argv)
|
||||
{
|
||||
UnitTest t (87);
|
||||
UnitTest t (91);
|
||||
|
||||
Variant sunday; testInit (t, "sunday", sunday);
|
||||
Variant monday; testInit (t, "monday", monday);
|
||||
|
@ -119,7 +119,6 @@ int main (int argc, char** argv)
|
|||
t.ok (november == nov, "november == nov");
|
||||
t.ok (december == dec, "december == dec");
|
||||
|
||||
|
||||
// Simply instantiate these for now. Test later.
|
||||
Variant now; testInit (t, "now", now);
|
||||
Variant today; testInit (t, "today", today);
|
||||
|
@ -143,6 +142,8 @@ int main (int argc, char** argv)
|
|||
Variant pi; testInit (t, "pi", pi);
|
||||
Variant var_true; testInit (t, "true", var_true);
|
||||
Variant var_false; testInit (t, "false", var_false);
|
||||
Variant midsommar; testInit (t, "midsommar", midsommar);
|
||||
Variant midsommarafton; testInit (t, "midsommarafton", midsommarafton);
|
||||
|
||||
t.ok (now >= today, "now >= today");
|
||||
t.ok (sod == tomorrow, "sod == tomorrow");
|
||||
|
@ -154,6 +155,8 @@ int main (int argc, char** argv)
|
|||
t.ok (now < someday, "now < someday");
|
||||
t.ok (goodfriday < easter, "goodfriday < easter");
|
||||
t.ok (easter < eastermonday, "easter < eastermonday");
|
||||
t.ok (easter < midsommarafton, "easter < midsommarafton");
|
||||
t.ok (midsommarafton < midsommar, "midsommarafton < midsommar");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue