aboutsummaryrefslogtreecommitdiff
path: root/common/const
diff options
context:
space:
mode:
Diffstat (limited to 'common/const')
-rw-r--r--common/const/driver.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/common/const/driver.cxx b/common/const/driver.cxx
index 10e3103..17c2edc 100644
--- a/common/const/driver.cxx
+++ b/common/const/driver.cxx
@@ -122,8 +122,7 @@ main (int argc, char* argv[])
{
transaction t (db->begin ());
result1 r1 (db->query<const obj1> (query1::id < 3));
-
- assert (r1.size () == 2);
+ size_t n1 (0);
for (result1::iterator i (r1.begin ()); i != r1.end (); ++i)
{
@@ -134,11 +133,13 @@ main (int argc, char* argv[])
i.load (o);
assert (p->id == o.id);
delete p;
+ n1++;
}
- result2 r2 (db->query<const obj2> (query2::id < 3));
+ assert (n1 == 2);
- assert (r2.size () == 2);
+ result2 r2 (db->query<const obj2> (query2::id < 3));
+ size_t n2 (0);
for (result2::iterator i (r2.begin ()); i != r2.end (); ++i)
{
@@ -148,8 +149,11 @@ main (int argc, char* argv[])
obj2 o (0);
i.load (o);
assert (p->id == o.id);
+ n2++;
}
+ assert (n2 == 2);
+
t.commit ();
}