mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Tests: Added Interval::empty tests
This commit is contained in:
parent
1c14e1ae62
commit
db65ca2024
1 changed files with 4 additions and 2 deletions
|
@ -31,17 +31,19 @@
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int main (int, char**)
|
int main (int, char**)
|
||||||
{
|
{
|
||||||
UnitTest t (34);
|
UnitTest t (36);
|
||||||
|
|
||||||
// bool isStarted () const;
|
// bool isStarted () const;
|
||||||
// bool isEnded () const;
|
// bool isEnded () const;
|
||||||
Interval i1;
|
Interval i1;
|
||||||
|
t.is (i1.empty (), true, "Interval().empty -> true");
|
||||||
t.is (i1.isStarted (), false, "Interval().isStarted -> false");
|
t.is (i1.isStarted (), false, "Interval().isStarted -> false");
|
||||||
t.is (i1.isEnded (), false, "Interval().isEnded -> false");
|
t.is (i1.isEnded (), false, "Interval().isEnded -> false");
|
||||||
|
|
||||||
// void start (Datetime);
|
// void start (Datetime);
|
||||||
i1.start (Datetime ());
|
i1.start (Datetime ());
|
||||||
t.is (i1.isStarted (), true, "Interval(start=now).isStarted -> true");
|
t.is (i1.empty (), false, "Interval().empty -> false");
|
||||||
|
t.is (i1.isStarted (), true, "Interval(start=now).isStarted -> true");
|
||||||
t.is (i1.isEnded (), false, "Interval(start=now).isEnded -> false");
|
t.is (i1.isEnded (), false, "Interval(start=now).isEnded -> false");
|
||||||
|
|
||||||
// void end (Datetime);
|
// void end (Datetime);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue