From c5255bfa3ef81f65fd70713770d49613b382986e Mon Sep 17 00:00:00 2001 From: ENGO150 Date: Wed, 25 Jan 2023 20:33:05 +0100 Subject: [PATCH] added few more tests to logger-test --- src/logger/lib/test/main.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/logger/lib/test/main.c b/src/logger/lib/test/main.c index c093f11..d14b25f 100644 --- a/src/logger/lib/test/main.c +++ b/src/logger/lib/test/main.c @@ -50,10 +50,24 @@ int main(void) decrypted = decryptLogger(logger); //DECRYPT //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"); - } else + printf + ( + "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"); exitCode = 1;