[Pkg-running-devel] [antpm] 42/48: tests: str2time still fails under win, but at least not crashes

Kristof Ralovich ralovich-guest at moszumanska.debian.org
Mon Aug 11 10:10:34 UTC 2014


This is an automated email from the git hooks/post-receive script.

ralovich-guest pushed a commit to branch upstream
in repository antpm.

commit 7d4c603f3cbd234c98a1c101d63a177fd439e665
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date:   Tue Apr 8 15:34:35 2014 +0200

    tests: str2time still fails under win, but at least not crashes
    
    i suspect the problem is that the time conversion doesn't happen in GMT
---
 src/tests/testDeviceSettings.cpp | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/tests/testDeviceSettings.cpp b/src/tests/testDeviceSettings.cpp
index 74a8904..d569e03 100644
--- a/src/tests/testDeviceSettings.cpp
+++ b/src/tests/testDeviceSettings.cpp
@@ -64,6 +64,21 @@ BOOST_AUTO_TEST_CASE( free_test_function )
   LOG(LOG_INF) << getVersionString() << "\n";
 }
 
+BOOST_AUTO_TEST_CASE(convert_0)
+{
+  // $ date -u +%F\ %X\ %s
+  // 2013-07-06 08:40:16 PM 1373143216
+  // 2013-07-06 09:01:28 PM 1373144488
+  {
+    const char* s="2013-07-06T20:40:16Z";
+    std::time_t t=1373143216;
+
+    //LOG(LOG_INF) << DeviceSettings::str2time(s) << "\t" << t << "\n" << std::endl;
+  }
+
+  BOOST_CHECK( true /* test assertion */ );
+}
+
 BOOST_AUTO_TEST_CASE(convert)
 {
   // $ date -u +%F\ %X\ %s
@@ -73,7 +88,7 @@ BOOST_AUTO_TEST_CASE(convert)
     const char* s="2013-07-06T20:40:16Z";
     std::time_t t=1373143216;
 
-    //std::cout << DeviceSettings::str2time(s) << "\n";
+    //LOG(LOG_INF) << DeviceSettings::str2time(s) << "\t" << t << "\n" << std::endl;
 
     BOOST_CHECK(DeviceSettings::str2time(s) == t);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git



More information about the Pkg-running-devel mailing list