created exitCode check for why2-test

if exitCode isn't 0, test now fails
This commit is contained in:
Václav Šmejkal 2022-07-15 19:55:20 +02:00
parent dfbf65cc0f
commit bcb33ad354
No known key found for this signature in database
GPG Key ID: FD749A97DF2D5E19

View File

@ -46,7 +46,7 @@ int main(void)
timeBuffer += encrypted.elapsedTime; //GET TIME 1
//COMPARE DIFFERENCE
if (strcmp(encrypted.outputText, TEST_TEXT) == 0)
if (strcmp(encrypted.outputText, TEST_TEXT) == 0 && encrypted.exitCode == 0)
{
printf
(
@ -64,7 +64,7 @@ int main(void)
}
else
{
fprintf(stderr, "Test failed!\n\n%s // %s\n", encrypted.outputText, TEST_TEXT);
fprintf(stderr, "Test failed! (%u)\n\n%s // %s\n", encrypted.exitCode, encrypted.outputText, TEST_TEXT);
exitCode = 1;
}