From 2b5091dfffeb1b12c6f44f32f6bfd151c3e4e243 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 13 Jul 2026 21:42:29 +0000 Subject: [PATCH] Parse fold regression results by line --- src/test/seq_rewriter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/test/seq_rewriter.cpp b/src/test/seq_rewriter.cpp index 246c422703..bfdb3dc9d0 100644 --- a/src/test/seq_rewriter.cpp +++ b/src/test/seq_rewriter.cpp @@ -26,6 +26,8 @@ Tests: #include "smt/smt_context.h" #include #include +#include +#include // Build a single-char string literal expression. static expr_ref mk_str(ast_manager& m, seq_util& su, unsigned c) { @@ -89,8 +91,10 @@ static void test_seq_fold_scalar_model_validation() { "(pop)\n"); ENSURE(std::strstr(result, "unknown") == nullptr); unsigned sat_count = 0; - for (char const* p = result; (p = std::strstr(p, "sat\n")) != nullptr; p += 4) - ++sat_count; + std::istringstream in{std::string(result)}; + for (std::string line; std::getline(in, line);) + if (line == "sat") + ++sat_count; ENSURE(sat_count == 4); Z3_del_context(ctx); }