Adding quotes around strings to explicitly show whitespace
This commit is contained in:
parent
b7f24dba00
commit
e3218de5a5
1 changed files with 4 additions and 4 deletions
|
@ -65,9 +65,9 @@ static void test_grammar(const std::string & grammar_str, const std::vector<std:
|
|||
bool matched = match_string(test_string, grammar);
|
||||
|
||||
if (!matched) {
|
||||
fprintf(stderr, " ❌ Failed to match string: %s\n", test_string.c_str());
|
||||
fprintf(stderr, " ❌ Failed to match string: \"%s\"\n", test_string.c_str());
|
||||
} else {
|
||||
fprintf(stdout, " ✅︎ Matched string: %s\n", test_string.c_str());
|
||||
fprintf(stdout, " ✅︎ Matched string: \"%s\"\n", test_string.c_str());
|
||||
}
|
||||
|
||||
assert(matched);
|
||||
|
@ -81,9 +81,9 @@ static void test_grammar(const std::string & grammar_str, const std::vector<std:
|
|||
bool matched = match_string(test_string, grammar);
|
||||
|
||||
if (matched) {
|
||||
fprintf(stderr, " ❌ Improperly matched string: %s\n", test_string.c_str());
|
||||
fprintf(stderr, " ❌ Improperly matched string: \"%s\"\n", test_string.c_str());
|
||||
} else {
|
||||
fprintf(stdout, " ✅︎ Correctly did not match string: %s\n", test_string.c_str());
|
||||
fprintf(stdout, " ✅︎ Correctly did not match string: \"%s\"\n", test_string.c_str());
|
||||
}
|
||||
assert(!matched);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue