From 2e8082a2abbd9359e19bda1cce4120c3cf9a73f2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 9 Apr 2016 00:16:41 -0400 Subject: [PATCH] Tests: Added ::hasTag --- test/interval.t.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/interval.t.cpp b/test/interval.t.cpp index 4c3b3bdb..153ebee5 100644 --- a/test/interval.t.cpp +++ b/test/interval.t.cpp @@ -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; }