From eaafa23cbd83b7bda4b28779138c62446bbdea2a Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Thu, 9 Jan 2014 11:35:38 +0100 Subject: [PATCH] Add test for GetTime() Test for mingw/wine issue #3494, where the upper word of time(NULL) return value gets clobbered. --- src/test/util_tests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index b57945d06..691f02a9d 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -330,4 +330,12 @@ BOOST_AUTO_TEST_CASE(strprintf_numbers) #undef B #undef E +/* Check for mingw/wine issue #3494 + * Remove this test before time.ctime(0xffffffff) == 'Sun Feb 7 07:28:15 2106' + */ +BOOST_AUTO_TEST_CASE(gettime) +{ + BOOST_CHECK((GetTime() & ~0xFFFFFFFFLL) == 0); +} + BOOST_AUTO_TEST_SUITE_END()