added few more tests to logger-test

This commit is contained in:
Václav Šmejkal 2023-01-25 20:33:05 +01:00
parent 3b7622b846
commit c5255bfa3e
Signed by: ENGO150
GPG Key ID: F6D6DF86242C5A59

View File

@ -50,10 +50,24 @@ int main(void)
decrypted = decryptLogger(logger); //DECRYPT decrypted = decryptLogger(logger); //DECRYPT
//COMPARE OUTPUT //COMPARE OUTPUT
if (strcmp(decrypted.decryptedText[0], WRITE_MESSAGE_1) == 0) //SUCCESS if //SUCCESS //TODO: Make this smart somehow
(
strcmp(decrypted.decryptedText[0], WRITE_MESSAGE_1) == 0 &&
strcmp(decrypted.decryptedText[1], WRITE_MESSAGE_2) == 0 &&
strcmp(decrypted.decryptedText[2], WRITE_MESSAGE_3) == 0
)
{ {
printf("TEST SUCCESSFUL!\n"); printf
} else (
"TEST SUCCESSFUL!\n\n"
"TEXT:\t\"%s\"\n"
"\t\"%s\"\n"
"\t\"%s\"\n",
decrypted.decryptedText[0], decrypted.decryptedText[1], decrypted.decryptedText[2]
);
} else //FAILED
{ {
fprintf(stderr, "TEST FAILED!\n"); fprintf(stderr, "TEST FAILED!\n");
exitCode = 1; exitCode = 1;