date/time test fix; g++ compilation fix for bulk

This commit is contained in:
Aleksandar Fabijanic
2008-06-01 11:02:21 +00:00
parent ded102a6a4
commit cf01c1ad16
2 changed files with 7 additions and 12 deletions

View File

@@ -40,6 +40,7 @@
#define Data_Bulk_INCLUDED
#include "Poco/Void.h"
#include "Poco/Data/Limit.h"
@@ -98,7 +99,7 @@ inline Bulk bulk(const Limit& limit = Limit(Limit::LIMIT_UNLIMITED, false, false
}
inline void bulk()
inline void bulk(Void)
/// Dummy bulk function. Used for bulk binding creation
/// (see BulkBinding) and bulk extraction signalling to Statement.
{
@@ -108,7 +109,7 @@ inline void bulk()
} // namespace Keywords
typedef void (*BulkFnType)();
typedef void (*BulkFnType)(Void);
} } // namespace Poco::Data

View File

@@ -1067,15 +1067,12 @@ void DataTest::testDateAndTime()
assert (dt.hour() == t.hour());
assert (dt.minute() == t.minute());
assert (dt.second() == t.second());
Date d1(2007, 6, 15);
d1.assign(d.year() - 1, d.month(), d.day());
assert (d1 < d); assert (d1 != d);
if (d.month() > 1)
d1.assign(d.year(), d.month() - 1, d.day());
else
d1.assign(d.year() - 1, 12, d.day());
d1.assign(d.year() - 1, 12, d.day());
assert (d1 < d); assert (d1 != d);
if (d.day() > 1)
@@ -1087,10 +1084,7 @@ void DataTest::testDateAndTime()
d1.assign(d.year() + 1, d.month(), d.day());
assert (d1 > d); assert (d1 != d);
if (d.month() < 12)
d1.assign(d.year(), d.month() + 1, d.day());
else
d1.assign(d.year() + 1, 1, d.day());
d1.assign(d.year() + 1, 1, d.day());
assert (d1 > d); assert (d1 != d);
if (d.day() < dt.daysOfMonth(dt.year(), dt.month()))