From 36b0ca2e8b8f35b977599122e39001e242969abf Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 14 Jan 2012 13:06:01 +0200 Subject: Uncomment temporarily disabled test code, remove unneeded section --- qt/oracle/date-time/driver.cxx | 47 +++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'qt/oracle') diff --git a/qt/oracle/date-time/driver.cxx b/qt/oracle/date-time/driver.cxx index 2d9b46d..f6c5400 100644 --- a/qt/oracle/date-time/driver.cxx +++ b/qt/oracle/date-time/driver.cxx @@ -51,32 +51,27 @@ main (int argc, char* argv[]) assert (ol->is_null ()); } - // // Check persistence of valid dates and times. - // // - // QDateTime t (QDateTime::currentDateTime ()); - - // t.setTime (QTime (t.time ().hour (), - // t.time ().minute (), - // t.time ().second (), - // t.time ().msec ())); - - // o.date = t.date (); - // o.date_time = t; - // o.time = t.time (); - - // { - // transaction t (db->begin ()); - // db->persist (o); - // t.commit (); - // } - - // { - // transaction t (db->begin ()); - // auto_ptr ol (db->load (o.id)); - // t.commit (); - - // assert (*ol == o); - // } + // Check persistence of valid dates and times. + // + QDateTime t (QDateTime::currentDateTime ()); + + o.date = t.date (); + o.date_time = t; + o.time = t.time (); + + { + transaction t (db->begin ()); + db->persist (o); + t.commit (); + } + + { + transaction t (db->begin ()); + auto_ptr ol (db->load (o.id)); + t.commit (); + + assert (*ol == o); + } } catch (const odb::exception& e) { -- cgit v1.1