3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-07-14 19:15:41 +00:00

Tighten fold regression test checks

This commit is contained in:
copilot-swe-agent[bot] 2026-07-13 21:41:47 +00:00 committed by GitHub
parent 8e742d2639
commit b7ff37565f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -54,7 +54,7 @@ static void test_seq_foldl_nth_model_validation() {
Z3_del_context(ctx);
}
static void test_seq_foldl_scalar_model_validation() {
static void test_seq_fold_scalar_model_validation() {
Z3_context ctx = Z3_mk_context(nullptr);
char const* result =
Z3_eval_smtlib2_string(ctx,
@ -88,7 +88,10 @@ static void test_seq_foldl_scalar_model_validation() {
"(check-sat)\n"
"(pop)\n");
ENSURE(std::strstr(result, "unknown") == nullptr);
ENSURE(std::strstr(result, "sat\nsat\nsat\nsat") != nullptr);
unsigned sat_count = 0;
for (char const* p = result; (p = std::strstr(p, "sat\n")) != nullptr; p += 4)
++sat_count;
ENSURE(sat_count == 4);
Z3_del_context(ctx);
}
@ -318,7 +321,7 @@ void tst_seq_rewriter() {
}
test_seq_foldl_nth_model_validation();
test_seq_foldl_scalar_model_validation();
test_seq_fold_scalar_model_validation();
std::cout << "tst_seq_rewriter: all tests passed\n";
}