aboutsummaryrefslogtreecommitdiffstats
path: root/test/auto-refac-tdd
diff options
context:
space:
mode:
Diffstat (limited to 'test/auto-refac-tdd')
-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);