unicode
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user