3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-09 00:35:47 +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

@ -28,12 +28,12 @@ Revision History:
{ \
Z3_solver_push(ctx, s); \
Z3_solver_assert(ctx, s, TEST_NAME); \
SASSERT(Z3_solver_check(ctx, s) == TEST_OUTCOME); \
ENSURE(Z3_solver_check(ctx, s) == TEST_OUTCOME); \
Z3_solver_pop(ctx, s, 1); \
\
Z3_solver_push(ctx, s); \
Z3_solver_assert(ctx, s, Z3_mk_not(ctx, TEST_NAME)); \
SASSERT(Z3_solver_check(ctx, s) == NEG_TEST_OUTCOME); \
ENSURE(Z3_solver_check(ctx, s) == NEG_TEST_OUTCOME); \
Z3_solver_pop(ctx, s, 1); \
} \
} while (0)
@ -630,7 +630,7 @@ void test_equiv(Equivalence_params params, unsigned bvsize, bool is_signed) {
equiv = Z3_mk_implies(ctx, cond, equiv);
}
Z3_solver_assert(ctx, s, Z3_mk_not(ctx, equiv));
SASSERT(Z3_solver_check(ctx, s) == Z3_L_FALSE);
ENSURE(Z3_solver_check(ctx, s) == Z3_L_FALSE);
Z3_solver_pop(ctx, s, 1);
Z3_solver_dec_ref(ctx, s);
@ -662,7 +662,7 @@ void test_equiv(Equivalence_params params, unsigned bvsize, bool is_signed) {
// Z3_solver_assert(ctx, s, Z3_mk_eq(ctx, t2, Z3_mk_numeral(ctx, "1", bv)));
// //TEST_NO_UNDERFLOW;
// Z3_solver_assert(ctx, s, test_udfl);
// SASSERT(Z3_check(ctx) == Z3_TRUE);
// ENSURE(Z3_check(ctx) == Z3_TRUE);
// Z3_solver_pop(ctx, s, 1);
//
// Z3_del_config(cfg);