diff options
author | bloodstalker <thabogre@gmail.com> | 2016-11-26 03:48:58 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2016-11-26 03:48:58 +0000 |
commit | d23103dfc9105e0bd3c66bd446f8ecaa116675bd (patch) | |
tree | 7b2211dfd77d7b8f442eedab44b365e6ec8defd8 /test/testFuncs1.c | |
parent | added 14.6,14.7 and 14.8 (diff) | |
download | mutator-d23103dfc9105e0bd3c66bd446f8ecaa116675bd.tar.gz mutator-d23103dfc9105e0bd3c66bd446f8ecaa116675bd.zip |
added tdd tests for 14.6,14.7,14.8
Diffstat (limited to '')
-rw-r--r-- | test/testFuncs1.c | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/test/testFuncs1.c b/test/testFuncs1.c index b70b3cd..4f606a2 100644 --- a/test/testFuncs1.c +++ b/test/testFuncs1.c @@ -1039,5 +1039,87 @@ loco: return a;
}
+void test30(void)
+{
+ int a;
+ int b;
+ int c;
+
+ for (a = 0; a < 10; ++a)
+ {
+ a++;
+
+ if (a == 5)
+ break;
+ if (a == 6)
+ break;
+ }
+
+ for (a = 0; a < 10; a++)
+ {
+ a++;
+ if (a == 6)
+ break;
+ }
+
+ while (a < 10)
+ {
+ if (b == 1)
+ break;
+ if (c == 1)
+ break;
+ }
+
+ do {
+ if (a == 5)
+ break;
+ if (b == 6)
+ break;
+ if (c == 10)
+ break;
+ } while (a < 10);
+
+ for (a = 0; a < 100; a++)
+ {
+ for (b = 0; b < 100; b++)
+ {
+ c++;
+ if (a == 1)
+ break;
+ }
+ for (c = 0; c < 100; c++)
+ {
+ b++;
+ if (a == 10)
+ break;
+ }
+ }
+
+ for (a = 0; a < 100; a++)
+ {
+ if (a == 1)
+ break;
+
+ while (a < 10)
+ {
+ b++;
+ if (c == 10)
+ break;
+ }
+ }
+}
+
+int test31(void)
+{
+ int a;
+
+ if (a == 1)
+ return 2;
+ else if (a == 2)
+ return 3;
+ else
+ return 1;
+}
+
/**********************************************************************************************************************/
/*the last line's been intentionally left blank.*/
|