From fc927da8c0bd04dd4c7111226f09a90a165b1b49 Mon Sep 17 00:00:00 2001 From: fdai7057 Date: Mon, 6 Feb 2023 13:50:22 +0100 Subject: [PATCH] Extend the test for errorMessage() by adding new test values and assertions. --- test/test_Error.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/test/test_Error.c b/test/test_Error.c index d2aef22..036ac24 100644 --- a/test/test_Error.c +++ b/test/test_Error.c @@ -15,10 +15,22 @@ void test_error() int invalidErrorCodes_1[bound]; int invalidErrorCodesLarge_2[bound]; int invalidErrorCodesLargest_3[bound]; - + int validErrorCodeUnsuccessfulLogin[bound]; int validErrorCodeMaximumNumberOfAttempts[bound]; int validErrorCodeNoMenuEntryForNumber[bound]; + /*new test cases*/ + int validErrorCodeNoCustomerDataFile[bound]; + int validErrorCodeTooYoung[bound]; + int validErrorCodeCreatingFile[bound]; + int validErrorCodeForenameTooLong[bound]; + int validErrorCodeSurnameTooLong[bound]; + int validErrorCodePasswordTooLong[bound]; + + int validErrorCodeInvalidCharacterForename[bound]; + int validErrorCodeInvalidCharacterSurname[bound]; + int validErrorCodeTooManyDigits[bound]; + for(int i=0;i