aboutsummaryrefslogtreecommitdiff
path: root/qt/oracle
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-14 13:06:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-20 15:45:46 +0200
commit36b0ca2e8b8f35b977599122e39001e242969abf (patch)
tree537161ae0197f88eb6a02c85afe2702f0d457f1e /qt/oracle
parent1fde6335608b81d0aff2f57414104c619f15b145 (diff)
Uncomment temporarily disabled test code, remove unneeded section
Diffstat (limited to 'qt/oracle')
-rw-r--r--qt/oracle/date-time/driver.cxx47
1 files changed, 21 insertions, 26 deletions
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<object> ol (db->load<object> (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<object> ol (db->load<object> (o.id));
+ t.commit ();
+
+ assert (*ol == o);
+ }
}
catch (const odb::exception& e)
{