aboutsummaryrefslogtreecommitdiffstats
path: root/test/auto-refac-tdd
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2017-01-29 02:48:26 +0000
committerbloodstalker <thabogre@gmail.com>2017-01-29 02:48:26 +0000
commit25eaafd93cded893e641e25ecebe7e7166eb2ccb (patch)
tree3073b25f558b99549bf64eefa9096e84e70b19b4 /test/auto-refac-tdd
parentadded tdd tests for switchfixer and switchdfixer (diff)
downloadmutator-25eaafd93cded893e641e25ecebe7e7166eb2ccb.tar.gz
mutator-25eaafd93cded893e641e25ecebe7e7166eb2ccb.zip
added tdd tests for switchfixer and switchdfixer
Diffstat (limited to '')
-rw-r--r--test/auto-refac-tdd/auto-refac-tdd01.c78
-rw-r--r--test/auto-refac-tdd/auto-refac-tdd01.h6
2 files changed, 82 insertions, 2 deletions
diff --git a/test/auto-refac-tdd/auto-refac-tdd01.c b/test/auto-refac-tdd/auto-refac-tdd01.c
index 35e0b16..f4c156a 100644
--- a/test/auto-refac-tdd/auto-refac-tdd01.c
+++ b/test/auto-refac-tdd/auto-refac-tdd01.c
@@ -125,6 +125,84 @@ void tdd_iffixer(void)
}
+void tdd_switchfixer_switchdffixer(void)
+{
+ int level = 10U;
+
+ switch (level) {
+ case 10U: {
+ level++;
+ level--;
+ break;
+ }
+ case 20U: {
+ level = 10000U;
+ break;
+ }
+ case 30U: {
+ level++;
+ break;
+ }
+ case 40U: {
+ level++;
+ break;
+ }
+ case 50U: {
+ level++;
+ break;
+ }
+ case 60U: {
+ level = 1000U;
+ break;
+ }
+ case 70U: {
+ level++;
+ break;
+ }
+ case 80U: {
+ level++;
+ break;
+ }
+ case 90U: {
+ level++;
+ break;
+ }
+ default: {
+ level++;
+ break;
+ }
+ }
+
+ switch (level) {
+ case 1: {
+ level++;
+ break;
+ }
+ case 2:
+ level = 10;
+ level--;
+ {
+ case 3:
+ level = 10U;
+ level++;
+ break;
+ }
+ }
+
+ switch (level) {
+ case 1:
+ level++;
+ case 2:
+ level = 1;
+ case 3:
+ level = 2;
+ default:
+ level++;
+ }
+
+ switch (level) {}
+}
+
void tdd_ifconstswapper(void)
{
int a;
diff --git a/test/auto-refac-tdd/auto-refac-tdd01.h b/test/auto-refac-tdd/auto-refac-tdd01.h
index 372fc3f..7586fe8 100644
--- a/test/auto-refac-tdd/auto-refac-tdd01.h
+++ b/test/auto-refac-tdd/auto-refac-tdd01.h
@@ -14,9 +14,11 @@ void tdd_forfixer(void);
void tdd_whilefixer(void);
-void ifelsefixer(void);
+void tdd_ifelsefixer(void);
-void iffixer(void);
+void tdd_iffixer(void);
+
+void tdd_switchfixer_switchdffixer(void);
void tdd_ifconstswapper(void);