From 4d266412ee6f34b874c9c0f89222cd8312c62d81 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 28 Jul 2010 19:58:32 -0400 Subject: [PATCH] Unit Tests - Date - Added unit tests for Date::operator-. --- src/tests/date.t.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/tests/date.t.cpp b/src/tests/date.t.cpp index 23134979f..8d3b663c0 100644 --- a/src/tests/date.t.cpp +++ b/src/tests/date.t.cpp @@ -34,7 +34,7 @@ Context context; //////////////////////////////////////////////////////////////////////////////// int main (int argc, char** argv) { - UnitTest t (149); + UnitTest t (150); try { @@ -330,7 +330,9 @@ int main (int argc, char** argv) Date r19 ("6/7/2010 00:59:59", "m/d/Y H:N:S"); t.notok (r17.sameHour (r19), "two dates not within the same hour"); - // TODO Date::operator- + // Date::operator- + Date r22 (1234567890); + t.is ((r22 - 1).toEpoch (), 1234567889, "1234567890 - 1 = 1234567889"); } catch (std::string& e)