diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/testFuncs1.c | 71 | ||||
-rw-r--r-- | test/testFuncs1.h | 12 |
2 files changed, 81 insertions, 2 deletions
diff --git a/test/testFuncs1.c b/test/testFuncs1.c index e90c088..770ae97 100644 --- a/test/testFuncs1.c +++ b/test/testFuncs1.c @@ -7,8 +7,15 @@ /**************************************************MACROS & DEFS*******************************************************/
/**********************************************************************************************************************/
+#define LUPO 1U
+#define LOCO 2U
+
+typedef unsigned int ut_int;
+typedef unsigned char BYTE;
+
+/******************************************************Globals*********************************************************/
+
-/**********************************************************************************************************************/
/**********************************************************************************************************************/
void test (void);
void test2 (void);
@@ -702,5 +709,67 @@ void test5(void) }
}
+void test6 (void)
+{
+ int a[100];
+ int *p = a;
+
+ int i = 0;
+
+ for (i = 0; i < 100; ++i)
+ {
+ a[i] = i;
+ }
+}
+
+void test7(void)
+{
+ double a[100];
+
+ double *pointer;
+
+ pointer = a;
+
+ int i = 0;
+
+ for (i = 0; i < 50; i++)
+ {
+ *(a + i) = i;
+ }
+
+}
+
+void test8 (void)
+{
+ union uni uni2;
+}
+
+void test9 (void)
+{
+ /*im a comment*/
+ //im also a comment
+}
+
+void test10 (void)
+{
+ struct {
+ unsigned int r1 : 1;
+ unsigned int r2 : 2;
+ } reg1;
+
+ struct {
+ signed int r3 : 1;
+ signed int r4 : 15;
+ } reg2;
+
+ struct {
+ char a : 8;
+ signed int r5 : 14;
+ unsigned int r6 : 5;
+ ut_int r7 : 32;
+ BYTE r8 : 8;
+ } reg3;
+}
+
/**********************************************************************************************************************/
/*the last line's been intentionally left blank.*/
diff --git a/test/testFuncs1.h b/test/testFuncs1.h index 8276c18..c047cc2 100644 --- a/test/testFuncs1.h +++ b/test/testFuncs1.h @@ -5,7 +5,12 @@ #define FALSE 0
#define TRUE 1
-
+/***********************************************Global******************************************************/
+extern union uni {
+ int a;
+ double b;
+ char str[20];
+} uni1;
/***********************************************************************************************************/
/*choose the compiler*/
@@ -107,6 +112,11 @@ void babeFunk (int entry); test3();
double test4 (int aa, int bb, double cc);
void test5(void);
+void test6(void);
+void test7(void);
+void test8(void);
+void test9(void);
+void test10(void);
/***********************************************************************************************************/
/*ive been intentionally left blank. dont touch me.*/
|