diff options
-rw-r--r-- | test/testFuncs1.c | 35 | ||||
-rw-r--r-- | test/testFuncs2.c | 30 |
2 files changed, 65 insertions, 0 deletions
diff --git a/test/testFuncs1.c b/test/testFuncs1.c index 4312c79..20a40f2 100644 --- a/test/testFuncs1.c +++ b/test/testFuncs1.c @@ -730,10 +730,45 @@ void test7(void) {
double a[100];
+ double b[100];
+
+ char c[100];
+
double *pointer;
+ double* pointerb;
+
+ char* pointerc;
+
+ pointerb = b;
+
pointer = a;
+ pointerc = c;
+
+ if (a - b >= a)
+ {}
+ else if (b - a < a)
+ {}
+
+ if (a < b)
+ {}
+
+ if (pointer < pointerb)
+ {}
+
+ if (pointer > pointerb)
+ {}
+
+ if (pointerb <= pointer)
+ {}
+
+ if (pointer >= pointerb)
+ {}
+
+ if (pointer < pointerc)
+ {}
+
int i = 0;
for (i = 0; i < 50; i++)
diff --git a/test/testFuncs2.c b/test/testFuncs2.c index dac8ef0..7784619 100644 --- a/test/testFuncs2.c +++ b/test/testFuncs2.c @@ -47,4 +47,34 @@ int testfunc7(void) int a; int b; //return; +} + +int testfunc8(void) +{ + int a[10]; + int b[10]; + + int* p; + + p = &a[0]; + + int i; + int sum; + int sum2; + int garbage; + int garbage2; + + for (i = 0; i < 10; ++i) + { + sum += *(a + i); + sum2 += *(p + i); + //garbage = *(a - b); + } + + for (i = 10; i < 1; i++) + { + sum += *(a - i); + sum2 += *(p - i); + //garbage2 = *(p - a); + } }
\ No newline at end of file |