aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2015-04-03 20:27:27 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2015-04-03 20:27:27 +0200
commitfe9648fa1cdc8f9cf5216a88fadb8b96604047fd (patch)
tree011b7956b38a08b771d349866f9fabc0d5689fc9 /test
parent0d9371a00c47991e9f62053b649d39e9504680d8 (diff)
downloadusdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.tar.gz
usdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.tar.xz
usdx-fe9648fa1cdc8f9cf5216a88fadb8b96604047fd.zip
base/time: Replaces by std::chrono.
Diffstat (limited to 'test')
-rw-r--r--test/base/timestamp.cpp10
-rw-r--r--test/menu/application.cpp2
2 files changed, 6 insertions, 6 deletions
diff --git a/test/base/timestamp.cpp b/test/base/timestamp.cpp
index 2d8e6caf..23ea3b04 100644
--- a/test/base/timestamp.cpp
+++ b/test/base/timestamp.cpp
@@ -22,11 +22,11 @@
*
*/
+#include <thread>
#include "base/timestamp.hpp"
#include <cppunit/extensions/HelperMacros.h>
#include <log4cpp/Category.hh>
-#include <boost/thread/thread.hpp>
namespace usdx
{
@@ -49,15 +49,15 @@ namespace usdx
void testWaitShorter()
{
Timestamp t;
- boost::this_thread::sleep(boost::posix_time::milliseconds(500));
- CPPUNIT_ASSERT_EQUAL(t.since(0.6), true);
+ std::this_thread::sleep_for(std::chrono::milliseconds{500});
+ CPPUNIT_ASSERT_EQUAL(t.since(std::chrono::milliseconds{600}), true);
}
void testWaitLonger()
{
Timestamp t;
- boost::this_thread::sleep(boost::posix_time::milliseconds(500));
- CPPUNIT_ASSERT_EQUAL(t.since(0.4), false);
+ std::this_thread::sleep_for(std::chrono::milliseconds{500});
+ CPPUNIT_ASSERT_EQUAL(t.since(std::chrono::milliseconds{400}), false);
}
};
diff --git a/test/menu/application.cpp b/test/menu/application.cpp
index 8a14644a..24156998 100644
--- a/test/menu/application.cpp
+++ b/test/menu/application.cpp
@@ -48,7 +48,7 @@ namespace usdx
Application app;
app.quit();
CPPUNIT_ASSERT_EQUAL(false, app.is_running());
- CPPUNIT_ASSERT_EQUAL(true, t.since(0.2));
+ CPPUNIT_ASSERT_EQUAL(true, t.since(std::chrono::milliseconds{200}));
}
void testNewInstance()