aboutsummaryrefslogtreecommitdiff
path: root/common/query
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-03-28 09:54:19 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-03-28 09:54:19 +0200
commite61fb61f6406db4d1b3b33eb72007ba22efb44bd (patch)
tree0dff61043ebda523eff7451b8f210d395ef4b9f0 /common/query
parent3de8e4843bc85f9fc6e63c1a4fea6b57ff0351b6 (diff)
Recode tests to work with implementations lacking result::size()
Diffstat (limited to 'common/query')
-rw-r--r--common/query/driver.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/common/query/driver.cxx b/common/query/driver.cxx
index 9d948cc..2f97f2e 100644
--- a/common/query/driver.cxx
+++ b/common/query/driver.cxx
@@ -392,10 +392,10 @@ main (int argc, char* argv[])
transaction t (db->begin ());
result r (db->query<person> (query::last_name == "Doe"));
- assert (r.size () == 2);
-
result::iterator i (r.begin ());
- i++;
+ assert (i != r.end ());
+ ++i;
+ assert (i != r.end ());
auto_ptr<person> joe (db->load<person> (3));
assert (i->last_name_ == "Doe");