Tests: Added ::hasTag

This commit is contained in:
Paul Beckingham 2016-04-09 00:16:41 -04:00
parent 3652d6e91a
commit 2e8082a2ab

View file

@ -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;
}