diff --git a/build-script.sh b/build-script.sh index 61629a5..13a9de2 100755 --- a/build-script.sh +++ b/build-script.sh @@ -1,4 +1,5 @@ clear +ceedling test:all cd src/ gcc stringManipulation.c loginCustomer.c createCustomer.c mainMenu.c program.c -lm -o program.out ./program.out diff --git a/test/test_StringManipulation.c b/test/test_StringManipulation.c index cd681bf..af7c1fb 100644 --- a/test/test_StringManipulation.c +++ b/test/test_StringManipulation.c @@ -1,8 +1,23 @@ +#include #include #include #include #include "../src/stringManipulation.c" + +void test_power() +{ + /*initializing test values*/ + int testValues[] = {1,2,3,4,5,6,7,8,9}; + int expectedValues[] = {1,4,9,16,25,36,49,64,81}; + int length = sizeof(testValues)/sizeof(int); + /*assertions*/ + const int exponent = 2; + for(int i=0;i