This commit is contained in:
2026-09-26 22:21:12 -06:00
parent 8764556e71
commit 6e13571f60
3 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ static bool run_test_case(const Token* token, const std::string& input, bool exp
if (status_ok && match_ok) {
std::cout << "[PASS] Input: \"" << input << "\" -> "
<< (res.success ? "SUCCESS" : "FAILURE")
<< (res.success ? (" (Matched: \"" + utf8::toUTF8(res.flatMatch()) + "\")") : "")
<< (res.success ? (" (Matched: \"" + unicode::toUTF8(res.flatMatch()) + "\")") : "")
<< "\n";
return true;
}
@@ -28,7 +28,7 @@ static bool run_test_case(const Token* token, const std::string& input, bool exp
std::cerr << "[FAIL] Input: \"" << input << "\"\n"
<< " Expected Success: " << (expectedSuccess ? "true" : "false") << ", Got: " << (res.success ? "true" : "false") << "\n";
if (expectedSuccess && !expectedMatch.empty()) {
std::cerr << " Expected Match: \"" << utf8::toUTF8(expectedMatch) << "\", Got: \"" << utf8::toUTF8(res.flatMatch()) << "\"\n";
std::cerr << " Expected Match: \"" << unicode::toUTF8(expectedMatch) << "\", Got: \"" << unicode::toUTF8(res.flatMatch()) << "\"\n";
}
return false;
}