[xmltooling] 22/24: Update DateTime tests.
Etienne Dysli Metref
edm-guest at moszumanska.debian.org
Fri Jan 12 15:53:58 UTC 2018
This is an automated email from the git hooks/post-receive script.
edm-guest pushed a commit to branch master
in repository xmltooling.
commit 8cd175401c14625fcfc778bcb74ca0522751a60c
Author: Scott Cantor <cantor.2 at osu.edu>
Date: Tue Jan 9 13:54:16 2018 -0500
Update DateTime tests.
---
xmltoolingtest/DateTimeTest.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/xmltoolingtest/DateTimeTest.h b/xmltoolingtest/DateTimeTest.h
index 70196ae..58640fb 100644
--- a/xmltoolingtest/DateTimeTest.h
+++ b/xmltoolingtest/DateTimeTest.h
@@ -20,7 +20,7 @@
#include "XMLObjectBaseTestCase.h"
-#include <xmltooling/util/DateTime.h>
+#include <xercesc/util/XMLDateTime.hpp>
class DateTimeTest : public CxxTest::TestSuite {
public:
@@ -32,31 +32,31 @@ public:
void testDateTime() {
auto_ptr_XMLCh ts1("1970-01-31T00:00:00Z");
- DateTime dt1(ts1.get());
+ XMLDateTime dt1(ts1.get());
dt1.parseDateTime();
TSM_ASSERT_EQUALS("Epoch for Jan 31, 1970 did not match.", dt1.getEpoch(), 2592000);
- DateTime dt2(1227234172);
+ XMLDateTime dt2(1227234172, false);
auto_ptr_char ts2(dt2.getRawData());
TSM_ASSERT("ISO string for Nov 21, 2008 02:22:52 did not match.", !strcmp(ts2.get(), "2008-11-21T02:22:52Z"));
}
void testDuration() {
auto_ptr_XMLCh d1("P1D");
- DateTime dt1(d1.get());
+ XMLDateTime dt1(d1.get());
dt1.parseDuration();
TSM_ASSERT_EQUALS("Epoch for 1 day did not match.", dt1.getEpoch(true), 86400);
auto_ptr_XMLCh d2("PT2H");
- DateTime dt2(d2.get());
+ XMLDateTime dt2(d2.get());
dt2.parseDuration();
TSM_ASSERT_EQUALS("Epoch for 2 hours did not match.", dt2.getEpoch(true), 7200);
- DateTime dt3(28800, true);
+ XMLDateTime dt3(28800, true);
auto_ptr_char d3(dt3.getRawData());
TSM_ASSERT("ISO string for 8 hours did not match.", !strcmp(d3.get(), "P0DT8H0M0S"));
- DateTime dt4(-29000, true);
+ XMLDateTime dt4(-29000, true);
auto_ptr_char d4(dt4.getRawData());
TSM_ASSERT("ISO string for negative 8 hours did not match.", !strcmp(d4.get(), "-P0DT8H3M20S"));
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-shibboleth/xmltooling.git
More information about the Pkg-shibboleth-devel
mailing list