aboutsummaryrefslogtreecommitdiffhomepage
path: root/unittest
diff options
context:
space:
mode:
authorGravatar Hoa V. Dinh <dinh.viet.hoa@gmail.com>2015-07-13 15:33:07 -0700
committerGravatar Hoa V. Dinh <dinh.viet.hoa@gmail.com>2015-07-13 15:33:07 -0700
commit89f75cec935430b410e1c3e26ce884548a834afa (patch)
tree713b8a887a2ee7052743c4c80dc5ec7d283aee33 /unittest
parent1eace1dc1c2e181988c77ceb8ec83918572bf9d1 (diff)
Fixed #1164: merged #1169 manually. Fixed zipping on iOS device, running with sandbox.
Diffstat (limited to 'unittest')
-rw-r--r--unittest/unittest.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/unittest/unittest.cpp b/unittest/unittest.cpp
index f2368810..8db7cc04 100644
--- a/unittest/unittest.cpp
+++ b/unittest/unittest.cpp
@@ -167,11 +167,11 @@ static Array * pathsInDirectory(String * directory)
static void prepareHeaderForUnitTest(MessageHeader * header)
{
time_t now = time(NULL);
- if (fabs(now - header->date()) <= 2) {
+ if (fabs((double) (now - header->date())) <= 2) {
// Date might be generated, set to known date.
header->setDate(referenceDate());
}
- if (fabs(header->receivedDate() - now) <= 2) {
+ if (fabs((double) (header->receivedDate() - now)) <= 2) {
// Date might be generated, set to known date.
header->setReceivedDate(referenceDate());
}