mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: Added ::total test
This commit is contained in:
parent
e7c872b889
commit
2fe21b0a18
1 changed files with 5 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int, char**)
|
||||
{
|
||||
UnitTest t (63);
|
||||
UnitTest t (64);
|
||||
|
||||
// bool started () const;
|
||||
// bool ended () const;
|
||||
|
@ -220,6 +220,10 @@ int main (int, char**)
|
|||
t.ok (intersection.start.toEpoch () == 0, "Range: adjacent ranges do not intersect");
|
||||
t.ok (intersection.end.toEpoch () == 0, "Range: adjacent ranges do not intersect");
|
||||
|
||||
// Range length.
|
||||
t.ok (Range (Datetime (2016, 1, 1), Datetime (2016, 1, 3)).total () == (2 * 86400),
|
||||
"Range (Datetime (2016, 1, 1), Datetime (2016, 1, 3)).total () == (2 * 86400)");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue