commit 20706b917d090f28923be1a4759f8720c10d0aa4
Author: Ján Kupec
Date: Thu Jan 22 18:50:29 2009 +0100
Date test added.
---
tests/zypp/CMakeLists.txt | 1 +
tests/zypp/Date_test.cc | 25 +++++++++++++++++++++++++
2 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/tests/zypp/CMakeLists.txt b/tests/zypp/CMakeLists.txt
index 1a41adb..7d75796 100644
--- a/tests/zypp/CMakeLists.txt
+++ b/tests/zypp/CMakeLists.txt
@@ -9,6 +9,7 @@ ADD_TESTS(
Arch
Capabilities
CheckSum
+ Date
Digest
Deltarpm
Edition
diff --git a/tests/zypp/Date_test.cc b/tests/zypp/Date_test.cc
new file mode 100644
index 0000000..b9f7746
--- /dev/null
+++ b/tests/zypp/Date_test.cc
@@ -0,0 +1,25 @@
+//
+// tests for zypp/Date.h
+//
+
+#include <iostream>
+#include <string>
+
+#include "zypp/base/Logger.h"
+#include "zypp/Date.h"
+
+// Boost.Test
+#include
+
+using boost::unit_test::test_suite;
+using boost::unit_test::test_case;
+
+using namespace std;
+using namespace zypp;
+
+BOOST_AUTO_TEST_CASE(date_test)
+{
+ string format = "%Y-%m-%d %H:%M:%S";
+ string date = "2009-02-14 00:31:30";
+ BOOST_CHECK_EQUAL(Date(date,format).form(format), date);
+}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org