aboutsummaryrefslogtreecommitdiff
path: root/qt/mssql/date-time/test.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-18 14:34:06 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-20 15:45:47 +0200
commit092163ffe44f64387508a0770948636f79ae139d (patch)
tree1f4817af1d2462424ff4e4f9d7b76f8f59fb3d7b /qt/mssql/date-time/test.hxx
parent605e4dee303f2a7b3b493e7a73faa09e61d88839 (diff)
Add support for configuring test suite with additional macros
Diffstat (limited to 'qt/mssql/date-time/test.hxx')
-rw-r--r--qt/mssql/date-time/test.hxx61
1 files changed, 38 insertions, 23 deletions
diff --git a/qt/mssql/date-time/test.hxx b/qt/mssql/date-time/test.hxx
index c494efb..218baaa 100644
--- a/qt/mssql/date-time/test.hxx
+++ b/qt/mssql/date-time/test.hxx
@@ -13,35 +13,14 @@
#pragma db object
struct object
{
- bool
- operator== (const object& x) const
- {
- return
- id == x.id &&
- date == x.date &&
- date_time == x.date_time &&
- date_time_dt == x.date_time_dt &&
- date_time_sdt == x.date_time_sdt &&
- time == x.time;
- }
-
- bool
- is_null () const
- {
- return
- date.isNull () &&
- date_time.isNull () &&
- date_time_dt.isNull () &&
- date_time_sdt.isNull () &&
- time.isNull ();
- }
-
#pragma db id auto
unsigned long id;
+#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
QDate date;
QDateTime date_time;
+#endif
#pragma db type ("DATETIME")
QDateTime date_time_dt;
@@ -49,7 +28,43 @@ struct object
#pragma db type ("SMALLDATETIME")
QDateTime date_time_sdt;
+#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
QTime time;
+#endif
+
+ bool
+ operator== (const object& x) const
+ {
+ return
+ id == x.id
+#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
+ && date == x.date
+ && date_time == x.date_time
+#endif
+ && date_time_dt == x.date_time_dt
+ && date_time_sdt == x.date_time_sdt
+#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
+ && time == x.time
+#endif
+ ;
+ }
+
+ bool
+ is_null () const
+ {
+ return
+ true
+#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
+ && date.isNull ()
+ && date_time.isNull ()
+#endif
+ && date_time_dt.isNull ()
+ && date_time_sdt.isNull ()
+#if !defined(MSSQL_SERVER_VERSION) || MSSQL_SERVER_VERSION >= 1000
+ && time.isNull ()
+#endif
+ ;
+ }
};
#endif // TEST_HXX