From 7d7f8f6ace81d37d5131db8c237fa1b2cf073e37 Mon Sep 17 00:00:00 2001 From: fdai7057 Date: Sat, 4 Feb 2023 14:03:46 +0100 Subject: [PATCH] Implementation of unit tests for isLetterOfAlphabet. --- test/test_CreateCustomer.c | 1 + test/test_LoginCustomer.c | 1 + test/test_StringManipulation.c | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/test/test_CreateCustomer.c b/test/test_CreateCustomer.c index f681375..85122a7 100644 --- a/test/test_CreateCustomer.c +++ b/test/test_CreateCustomer.c @@ -2,6 +2,7 @@ #include #include #include "../src/stringManipulation.c" +#include "../src/error.c" #include "../src/createCustomer.c" void setUp(){} diff --git a/test/test_LoginCustomer.c b/test/test_LoginCustomer.c index 0bff2d2..a293a0d 100644 --- a/test/test_LoginCustomer.c +++ b/test/test_LoginCustomer.c @@ -1,6 +1,7 @@ #include #include "../src/loginCustomer.c" #include "../src/stringManipulation.c" +#include "../src/error.c" void setUp(){}; void tearDown(){}; void test_checkLogin() diff --git a/test/test_StringManipulation.c b/test/test_StringManipulation.c index 3a23b57..efbd1b2 100644 --- a/test/test_StringManipulation.c +++ b/test/test_StringManipulation.c @@ -4,6 +4,36 @@ #include #include "../src/stringManipulation.c" + +void test_isLetterOfAlphabet() +{ + /*test block 1*/ + char *testStringsToTrue[] = {"adhj","kasdlwq","vbeuqor","kalkwyynmakj","kakswxl","akljlxjkcyxyklj","asdjhuwpwe","xbcvddd","klajksdjkl","ghghgtie","kajsd"}; + unsigned int numberOfElements = sizeof(testStringsToTrue) / sizeof(char *); + for(int i=0;i