From 07cbebd4a476885c578cfce8ee44158ed0b62483 Mon Sep 17 00:00:00 2001 From: Shivam Chaudhary Date: Sat, 4 Feb 2023 14:59:44 +0100 Subject: [PATCH] Implement test for file opening with false name --- tests/test_currentCustomerAccountBalance.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_currentCustomerAccountBalance.c b/tests/test_currentCustomerAccountBalance.c index 21d8cbc..6d1da03 100644 --- a/tests/test_currentCustomerAccountBalance.c +++ b/tests/test_currentCustomerAccountBalance.c @@ -51,6 +51,13 @@ void test_checkFileOpen(void) { fclose(file); } +void test_failOpenFile(void) { + FILE *file = fopen("false_file_name", "r"); + + TEST_ASSERT_FALSE(file); + +} +