From 3ec6667ba3587a8cd699236419920ee9aa6ccc28 Mon Sep 17 00:00:00 2001 From: Karma Riuk Date: Wed, 9 Jul 2025 11:46:47 +0200 Subject: [PATCH] improved logging errors --- test/parser/utils.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/parser/utils.cpp b/test/parser/utils.cpp index a662e8e..600cad2 100644 --- a/test/parser/utils.cpp +++ b/test/parser/utils.cpp @@ -7,11 +7,14 @@ void check_parser_errors(const std::vector& errors) { if (errors.empty()) return; - std::cerr << "parser has " << errors.size() << " errors:\n"; - for (const auto& error : errors) - std::cerr << '\t' << error->what() << "\n"; + INFO("parser has " << errors.size() << " errors:"); + std::ostringstream combined; + for (auto& err : errors) + combined << " > " << err->what() << '\n'; - FAIL_CHECK("Parser had errors. See stderr for details."); + INFO(combined.str()); + + FAIL("Parser had errors."); } void ParserFixture::setup(std::string source) {