diff options
author | bloodstalker <thabogre@gmail.com> | 2016-11-29 17:11:43 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2016-11-29 17:11:43 +0000 |
commit | 9b82c31390060d6bf1d864be176caf445e68bd45 (patch) | |
tree | 28ee6f4d9ee932ee4af245e3472c9a88dd9bc6f4 | |
parent | added 17.1,17.2,17.3 and 17.4 (diff) | |
download | mutator-9b82c31390060d6bf1d864be176caf445e68bd45.tar.gz mutator-9b82c31390060d6bf1d864be176caf445e68bd45.zip |
added tdd tests for 17.1,17.2,17.3 and 17.4
Diffstat (limited to '')
-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 |