mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Tests: Added ::hasTag
This commit is contained in:
parent
3652d6e91a
commit
2e8082a2ab
1 changed files with 6 additions and 1 deletions
|
@ -31,7 +31,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
int main (int, char**)
|
||||
{
|
||||
UnitTest t (36);
|
||||
UnitTest t (38);
|
||||
|
||||
// bool isStarted () const;
|
||||
// bool isEnded () const;
|
||||
|
@ -162,6 +162,11 @@ int main (int, char**)
|
|||
t.is (i19.json (), "{\"start\":\"19700101T000001Z\",\"end\":\"19700101T000002Z\",\"tags\":[\"Trans-Europe Express\",\"bar\",\"foo\"]}",
|
||||
"JSON '{\"start\":\"19700101T000001Z\",\"end\":\"19700101T000002Z\",\"tags\":[\"Trans-Europe Express\",\"bar\",\"foo\"]}'");
|
||||
|
||||
Interval i20;
|
||||
i20.tag ("foo");
|
||||
t.ok (i20.hasTag ("foo"), "hasTag positive");
|
||||
t.notok (i20.hasTag ("bar"), "hasTag negative");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue