From 997388e61e2bb746c8e40564438fa42b78577a48 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Tue, 13 Dec 2016 16:01:42 +0330 Subject: updated tdd tests, cosmetic changes --- test/main.c | 1 + test/testFuncs1.h | 33 +++++++++++++++++++++++++++++++-- test/testFuncs2.c | 21 +++++++++++++++++++++ test/testFuncs2.h | 17 +++++++++-------- 4 files changed, 62 insertions(+), 10 deletions(-) (limited to 'test') diff --git a/test/main.c b/test/main.c index 89bccc2..dba3c11 100644 --- a/test/main.c +++ b/test/main.c @@ -3,6 +3,7 @@ /*********************************************************************************************************************/ /*inclusion directives*/ #include "testFuncs1.h" +#include "testFuncs2.h" //#include /*********************************************************************************************************************/ /*Globals*/ diff --git a/test/testFuncs1.h b/test/testFuncs1.h index 15d62be..4a8a91a 100644 --- a/test/testFuncs1.h +++ b/test/testFuncs1.h @@ -2,8 +2,8 @@ /*the first line's been intentionally left blank.*/ /***********************************************************************************************************/ /*defines*/ -#ifndef _TEST1_H -#define _TEST1_H +#ifndef TEST1_H +#define TEST1_H #define FALSE 0 #define TRUE 1 @@ -15,6 +15,8 @@ extern union uni { char str[20]; } uni1; +extern int cccc[]; + extern cucu; int yetanotherheadervar; @@ -141,7 +143,34 @@ void headerfund(void) sum = a + b; } +void testfunc9999(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)(); + int ** (**pfunc5)(int**, int**); + int ** (**pfunc6)(int**, int***); +} + void malloc (void); + #endif /***********************************************************************************************************/ /*ive been intentionally left blank. dont touch me.*/ diff --git a/test/testFuncs2.c b/test/testFuncs2.c index c7cbacc..accc3e3 100644 --- a/test/testFuncs2.c +++ b/test/testFuncs2.c @@ -51,6 +51,13 @@ typedef const* INTPTR; #if defined LOCO #endif +#if defined(LOCO) +#endif + +#define DEFINED defined +#if DEFINED(X) +#endif + #if defined LOCOLUPO || LOCO #endif @@ -186,5 +193,19 @@ void testfunc10 (int ** (**p5)(int**, int**), int ** (**p6)(int**, int***)) { } + +void testfunc11(void) +{ + long int a; + double dd; + short unsigned int b; + short int* p1; + long int* p2; + + p2 = (long int*)p1; + p1 = (short int*)p2; + b = a; + dd = b; +} /*********************************************************************************************************************/ /*last line intentionally left blank.*/ diff --git a/test/testFuncs2.h b/test/testFuncs2.h index 55daba8..5b14d7d 100644 --- a/test/testFuncs2.h +++ b/test/testFuncs2.h @@ -2,8 +2,8 @@ /*first line intentionally left blank.*/ /*********************************************************************************************************************/ /*Defines*/ -#ifndef _TEST2_H -#define _TEST2_H +#ifndef TEST2_H +#define TEST2_H /*********************************************************************************************************************/ /*Globals*/ extern int aaaa[]; @@ -24,23 +24,24 @@ void testFunc1(void); void testFunc4() { - /*do shit*/ + /*do shit*/ } testFunc5( void) { - //different kind of comment - ///another kind - /*this kind*/ - /**that kind*/ + //different kind of comment + ///another kind + /*this kind*/ + /**that kind*/ } void anotherheaderfunc (void) { - /*i dont do jack.*/ + /*i dont do jack.*/ } void testFunc9(void); +void testFunc11(void); /*********************************************************************************************************************/ #endif -- cgit v1.2.3