From be9cbd981e5ef69e0ecc842262e49e5e3ee610ec Mon Sep 17 00:00:00 2001 From: fdlt3817 Date: Fri, 10 Feb 2023 15:34:10 +0100 Subject: [PATCH] Create displayDisclaimer function --- src/displayDisclaimer.c | 20 ++++++++++++++++++++ src/displayDisclaimer.h | 7 +++++++ src/interestCalculator.c | 6 +++--- tests/test_updateCustomerAccountBalance.c | 9 +++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 src/displayDisclaimer.c create mode 100644 src/displayDisclaimer.h diff --git a/src/displayDisclaimer.c b/src/displayDisclaimer.c new file mode 100644 index 0000000..a324e93 --- /dev/null +++ b/src/displayDisclaimer.c @@ -0,0 +1,20 @@ +#include "displayDisclaimer.h" + +void displayDisclaimer(){ + printf(" W E L C O M E T O \n"); + printf(" .______ .___ ___. _______.\n"); + printf(" | _ \\ | \\/ | / |\n"); + printf(" | |_) | | \\ / | | (----`\n"); + printf(" | _ < | |\\/| | \\ \\ \n"); + printf(" | |_) | | | | | .----) | \n"); + printf(" |______/ |__| |__| |_______/ \n"); + printf(" \n"); + printf("B A N K M A N A G E M E N T S Y S T E M\n"); + printf(":.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:\n"); + printf("Created by Atharva, Can, Haytham, Julius, Shivam, and Yahya for AI1001.\n"); +} + +// int main(){ +// displayDisclaimer(); +// return 1; +// } \ No newline at end of file diff --git a/src/displayDisclaimer.h b/src/displayDisclaimer.h new file mode 100644 index 0000000..7043974 --- /dev/null +++ b/src/displayDisclaimer.h @@ -0,0 +1,7 @@ +#ifndef DISPLAYDISCLAIMER_H_ +#define DISPLAYDISCLAIMER_H_ +#include + +void displayDisclaimer(); + +#endif \ No newline at end of file diff --git a/src/interestCalculator.c b/src/interestCalculator.c index 58c1072..b2e5462 100644 --- a/src/interestCalculator.c +++ b/src/interestCalculator.c @@ -150,8 +150,8 @@ void initiateCalculator(){ } } -int main(){ +// int main(){ - initiateCalculator(); +// initiateCalculator(); -} +// } diff --git a/tests/test_updateCustomerAccountBalance.c b/tests/test_updateCustomerAccountBalance.c index 5b5454b..833c9fc 100644 --- a/tests/test_updateCustomerAccountBalance.c +++ b/tests/test_updateCustomerAccountBalance.c @@ -54,5 +54,14 @@ void test_updateAvailableAccountBalanceSuccess(void){ TEST_ASSERT_TRUE(result[i]); } +} +void test_failOpenFile(void) { + + /* Act and assert */ + + FILE *file = fopen("false_file_name", "r"); + + TEST_ASSERT_FALSE(file); + } #endif