3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-04 18:30:24 +00:00

ensure that assertions within the unit tests are exercised in all build modes, remove special handling of SASSERT for release mode #1163

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-07-26 20:28:55 -07:00
parent 3f8b63f5a8
commit b1298d7bde
67 changed files with 1277 additions and 1285 deletions

View file

@ -85,7 +85,7 @@ class udoc_tester {
doc_ref result(dm);
t = mk_rand_tbv(dm);
result = dm.allocate(*t);
SASSERT(dm.tbvm().equals(*t, result->pos()));
ENSURE(dm.tbvm().equals(*t, result->pos()));
for (unsigned i = 0; i < num_diff; ++i) {
t = mk_rand_tbv(dm, result->pos());
if (dm.tbvm().equals(*t, result->pos())) {
@ -97,7 +97,7 @@ class udoc_tester {
}
result->neg().push_back(t.detach());
}
SASSERT(dm.well_formed(*result));
ENSURE(dm.well_formed(*result));
return result.detach();
}
@ -121,7 +121,7 @@ public:
}
udoc_relation* mk_empty(relation_signature const& sig) {
SASSERT(p.can_handle_signature(sig));
ENSURE(p.can_handle_signature(sig));
relation_base* empty = p.mk_empty(sig);
return dynamic_cast<udoc_relation*>(empty);
}
@ -210,7 +210,7 @@ public:
jc1.push_back(1);
jc2.push_back(1);
datalog::relation_join_fn* join_fn = p.mk_join_fn(*t1, *t2, jc1.size(), jc1.c_ptr(), jc2.c_ptr());
SASSERT(join_fn);
ENSURE(join_fn);
t = (*join_fn)(*t1, *t2);
cr.verify_join(*t1, *t2, *t, jc1, jc2);
t->display(std::cout); std::cout << "\n";
@ -218,13 +218,13 @@ public:
t = (*join_fn)(*t1, *t3);
cr.verify_join(*t1, *t3, *t, jc1, jc2);
SASSERT(t->empty());
ENSURE(t->empty());
t->display(std::cout); std::cout << "\n";
t->deallocate();
t = (*join_fn)(*t3, *t3);
cr.verify_join(*t3, *t3, *t, jc1, jc2);
SASSERT(t->empty());
ENSURE(t->empty());
t->display(std::cout); std::cout << "\n";
t->deallocate();
@ -843,9 +843,9 @@ public:
rel_union union_fn = p.mk_union_fn(r, r, 0);
(*union_fn)(r, *full);
doc_manager& dm = r.get_dm();
SASSERT(r.get_udoc().size() == 1);
ENSURE(r.get_udoc().size() == 1);
doc& d0 = r.get_udoc()[0];
SASSERT(dm.is_full(d0));
ENSURE(dm.is_full(d0));
for (unsigned i = 0; i < num_vals; ++i) {
unsigned idx = m_rand(num_bits);
unsigned val = m_rand(2);