mirror of
https://github.com/Z3Prover/z3
synced 2025-04-15 05:18:44 +00:00
add failing test for issue #62 (mk_distinct doesnt type check)
Signed-off-by: Nuno Lopes <nlopes@MSRC-3617536.europe.corp.microsoft.com>
This commit is contained in:
parent
abe73db702
commit
f7d9438e7b
|
@ -447,9 +447,27 @@ void test_bvneg() {
|
|||
Z3_del_context(ctx);
|
||||
}
|
||||
|
||||
static bool cb_called = false;
|
||||
static void my_cb(Z3_context, Z3_error_code) {
|
||||
cb_called = true;
|
||||
}
|
||||
|
||||
static void test_mk_distinct() {
|
||||
Z3_config cfg = Z3_mk_config();
|
||||
Z3_context ctx = Z3_mk_context(cfg);
|
||||
Z3_set_error_handler(ctx, my_cb);
|
||||
|
||||
Z3_sort bv8 = Z3_mk_bv_sort(ctx, 8);
|
||||
Z3_sort bv32 = Z3_mk_bv_sort(ctx, 32);
|
||||
Z3_ast args[] = { Z3_mk_int64(ctx, 0, bv8), Z3_mk_int64(ctx, 0, bv32) };
|
||||
Z3_mk_distinct(ctx, 2, args);
|
||||
SASSERT(cb_called);
|
||||
}
|
||||
|
||||
void tst_api() {
|
||||
test_apps();
|
||||
test_bvneg();
|
||||
test_mk_distinct();
|
||||
// bv_invariant();
|
||||
}
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue