diff options
author | bloodstalker <thabogre@gmail.com> | 2016-11-30 19:56:35 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2016-11-30 19:56:35 +0000 |
commit | a99336dae485436c1bd5c90e48501472a262435c (patch) | |
tree | dd247d1bb2ed4ddf97730436a538bc6728035805 /test | |
parent | fixed a problem where the default input list returned an error (diff) | |
download | mutator-a99336dae485436c1bd5c90e48501472a262435c.tar.gz mutator-a99336dae485436c1bd5c90e48501472a262435c.zip |
the tdd test files look more readible and eligible
Diffstat (limited to '')
-rw-r--r-- | test/main.c | 7 | ||||
-rw-r--r-- | test/testFuncs1.h | 4 | ||||
-rw-r--r-- | test/testFuncs2.c | 40 | ||||
-rw-r--r-- | test/testFuncs2.h | 21 |
4 files changed, 68 insertions, 4 deletions
diff --git a/test/main.c b/test/main.c index d3de2ba..7b7c6d6 100644 --- a/test/main.c +++ b/test/main.c @@ -1,8 +1,14 @@ /*intentionally left blank.*/ +/*********************************************************************************************************************/ +/*inclusion directives*/ #include "testFuncs1.h" //#include <string.h> +/*********************************************************************************************************************/ +/*Globals*/ +/*********************************************************************************************************************/ +/*main*/ main() { int a; @@ -70,4 +76,5 @@ main() test29(a); test31(); } +/*********************************************************************************************************************/ /*intentionally left blank.*/ diff --git a/test/testFuncs1.h b/test/testFuncs1.h index 0f8b2ef..3e32906 100644 --- a/test/testFuncs1.h +++ b/test/testFuncs1.h @@ -2,6 +2,9 @@ /*the first line's been intentionally left blank.*/
/***********************************************************************************************************/
/*defines*/
+#ifndef TESTFUNCS1_H
+#define TESTFUNCS1_H
+
#define FALSE 0
#define TRUE 1
@@ -127,5 +130,6 @@ void test28(void); int test29(int a);
int test31(void);
+#endif
/***********************************************************************************************************/
/*ive been intentionally left blank. dont touch me.*/
diff --git a/test/testFuncs2.c b/test/testFuncs2.c index 7784619..309c280 100644 --- a/test/testFuncs2.c +++ b/test/testFuncs2.c @@ -1,6 +1,16 @@ +/*first line intentionally left blank*/ +/*********************************************************************************************************************/ +/*inclusion directives*/ #include "testFuncs2.h" - +/*********************************************************************************************************************/ +/*macro and definitions*/ +typedef const* INTPTR; +/*********************************************************************************************************************/ +/*Globals*/ + +/*********************************************************************************************************************/ +/*functions go here.*/ static void test33(void) { short int a; @@ -77,4 +87,30 @@ int testfunc8(void) sum2 += *(p - i); //garbage2 = *(p - a); } -}
\ No newline at end of file +} + +void testfunc9(void) +{ + int** p1; + int*** p2; + + struct + { + int* sp1; + int** sp2; + int*** sp3; + }; + + struct s* ps1; + struct s** ps2; + struct s*** ps3; + + INTPTR *const* const fedupp1; + + int ** (*pfunc1)(); + int ** (**pfunc2)(); + int ** (***pfunc3)(); + int *** (**pfunc4)(); +} +/*********************************************************************************************************************/ +/*last line intentionally left blank.*/ diff --git a/test/testFuncs2.h b/test/testFuncs2.h index e376c53..85ddeee 100644 --- a/test/testFuncs2.h +++ b/test/testFuncs2.h @@ -1,4 +1,11 @@ +/*first line intentionally left blank.*/ +/*********************************************************************************************************************/ +/*Defines*/ +#ifndef TESTFUNCS2_H +#define TESTFUNCS2_H +/*********************************************************************************************************************/ +/*Globals*/ extern int a[]; extern int b[] = {1, 2, 3, 4, 5, 6}; @@ -6,7 +13,8 @@ extern int b[] = {1, 2, 3, 4, 5, 6}; int c[2][3] = {1, 2, 3, 4, 5, 6}; int d[2][3] = {{1, 2, 3}, {4, 5, 6}}; - +/*********************************************************************************************************************/ +/*funciton types go here.*/ static void test33(void); void testFunc4() @@ -16,5 +24,14 @@ void testFunc4() testFunc5( void) { - + //different kind of comment + ///another kind + /*this kind*/ + /**that kind*/ } + +void testFunc9(void); + +/*********************************************************************************************************************/ +#endif +/*last line intentionally left blank.*/ |