Loosen test. After sleep(1), elapsed seconds could be more than 1
[metaproxy-moved-to-github.git] / src / test_boost_time.cpp
index d48bbd5..d49c814 100644 (file)
@@ -1,3 +1,8 @@
+/* $Id: test_boost_time.cpp,v 1.10 2007-04-20 08:53:34 adam Exp $
+   Copyright (c) 2005-2007, Index Data.
+
+   See the LICENSE file for details
+ */
 #include <iostream>
 
 #include "config.hpp"
@@ -10,7 +15,7 @@ using namespace boost::unit_test;
 
 
 
-BOOST_AUTO_TEST_CASE( testboosttime1 ) 
+BOOST_AUTO_UNIT_TEST( testboosttime1 ) 
 {
 
     // test session 
@@ -32,7 +37,7 @@ BOOST_AUTO_TEST_CASE( testboosttime1 )
         boost::posix_time::time_duration duration = then - now;
         //std::cout << duration << std::endl;
         
-        BOOST_CHECK (duration.total_seconds() == 1);
+        BOOST_CHECK (duration.total_seconds() >= 1);
         BOOST_CHECK (duration.fractional_seconds() > 0);
         
     }
@@ -49,6 +54,7 @@ BOOST_AUTO_TEST_CASE( testboosttime1 )
  * Local variables:
  * c-basic-offset: 4
  * indent-tabs-mode: nil
+ * c-file-style: "stroustrup"
  * End:
  * vim: shiftwidth=4 tabstop=8 expandtab
  */