Flush stdout in chat template before potential crash
This commit is contained in:
parent
e63520f37a
commit
33322e823e
1 changed files with 2 additions and 0 deletions
|
@ -291,6 +291,7 @@ int main(void) {
|
||||||
printf("Expected:\n%s\n", test_case.expected_output.c_str());
|
printf("Expected:\n%s\n", test_case.expected_output.c_str());
|
||||||
printf("-------------------------\n");
|
printf("-------------------------\n");
|
||||||
printf("Actual:\n%s\n", output.c_str());
|
printf("Actual:\n%s\n", output.c_str());
|
||||||
|
fflush(stdout);
|
||||||
assert(output == test_case.expected_output);
|
assert(output == test_case.expected_output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -315,6 +316,7 @@ int main(void) {
|
||||||
printf("Expected:\n%s\n", expected_output.c_str());
|
printf("Expected:\n%s\n", expected_output.c_str());
|
||||||
printf("-------------------------\n");
|
printf("-------------------------\n");
|
||||||
printf("Actual:\n%s\n", output.c_str());
|
printf("Actual:\n%s\n", output.c_str());
|
||||||
|
fflush(stdout);
|
||||||
assert(output == expected_output);
|
assert(output == expected_output);
|
||||||
}
|
}
|
||||||
} catch (const std::exception & e) {
|
} catch (const std::exception & e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue