From c5f8fbb871f045f26e1b68b97a8ce197ff772ef8 Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Thu, 22 Nov 2012 19:28:45 +0100 Subject: [PATCH] Collapsing the switch tests into 1 --- tests/switch-1.tmpl | 6 ------ tests/switch-2.tmpl | 6 ------ tests/switch-3.tmpl | 6 ------ tests/switch-4.tmpl | 6 ------ tests/switch-5.tmpl | 6 ------ tests/switch-6.tmpl | 6 ------ tests/switch-7.tmpl | 6 ------ tests/switch-8.tmpl | 6 ------ tests/switch.qc | 13 ++++++++++++- tests/switch.tmpl | 12 ++++++++++++ 10 files changed, 24 insertions(+), 49 deletions(-) delete mode 100644 tests/switch-1.tmpl delete mode 100644 tests/switch-2.tmpl delete mode 100644 tests/switch-3.tmpl delete mode 100644 tests/switch-4.tmpl delete mode 100644 tests/switch-5.tmpl delete mode 100644 tests/switch-6.tmpl delete mode 100644 tests/switch-7.tmpl delete mode 100644 tests/switch-8.tmpl create mode 100644 tests/switch.tmpl diff --git a/tests/switch-1.tmpl b/tests/switch-1.tmpl deleted file mode 100644 index c44c0c9..0000000 --- a/tests/switch-1.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 1 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 1 -float 0 -M: One diff --git a/tests/switch-2.tmpl b/tests/switch-2.tmpl deleted file mode 100644 index 4aa313b..0000000 --- a/tests/switch-2.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 2 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 2 -float 0 -M: Two diff --git a/tests/switch-3.tmpl b/tests/switch-3.tmpl deleted file mode 100644 index a7dc4cc..0000000 --- a/tests/switch-3.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 3 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 3 -float 0 -M: Three, falling through to 2 - Two diff --git a/tests/switch-4.tmpl b/tests/switch-4.tmpl deleted file mode 100644 index 1c9f524..0000000 --- a/tests/switch-4.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 4 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 4 -float 0 -M: Four, falling through to default - Other diff --git a/tests/switch-5.tmpl b/tests/switch-5.tmpl deleted file mode 100644 index 1db84e6..0000000 --- a/tests/switch-5.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 5 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 5 -float 0 -M: Other diff --git a/tests/switch-6.tmpl b/tests/switch-6.tmpl deleted file mode 100644 index ba65426..0000000 --- a/tests/switch-6.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 6 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 80 -float 0 -M: Enhanced 80 diff --git a/tests/switch-7.tmpl b/tests/switch-7.tmpl deleted file mode 100644 index dac29bd..0000000 --- a/tests/switch-7.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 7 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 99 -float 0 -M: 0 1 2 3 4 5 diff --git a/tests/switch-8.tmpl b/tests/switch-8.tmpl deleted file mode 100644 index 343a3a5..0000000 --- a/tests/switch-8.tmpl +++ /dev/null @@ -1,6 +0,0 @@ -I: switch.qc -D: test switches - case 8 -T: -execute -C: -std=fteqcc -frelaxed-switch -E: -float 99 -float 6 -M: early break diff --git a/tests/switch.qc b/tests/switch.qc index c6396c5..1758c8a 100644 --- a/tests/switch.qc +++ b/tests/switch.qc @@ -1,7 +1,7 @@ void print(...) = #1; string ftos(float) = #2; -void main(float param, float p2) { +void test(float param, float p2) { float i; float c80 = 80; switch(param) { @@ -25,3 +25,14 @@ void main(float param, float p2) { print(ftos(i), "\n"); } } + +void main() { + test(1, 0); + test(2, 0); + test(3, 0); + test(4, 0); + test(5, 0); + test(80, 0); + test(99, 0); + test(99, 6); +} diff --git a/tests/switch.tmpl b/tests/switch.tmpl new file mode 100644 index 0000000..88cd2ea --- /dev/null +++ b/tests/switch.tmpl @@ -0,0 +1,12 @@ +I: switch.qc +D: test switches +T: -execute +C: -std=fteqcc -frelaxed-switch +M: One +M: Two +M: Three, falling through to 2 - Two +M: Four, falling through to default - Other +M: Other +M: Enhanced 80 +M: 0 1 2 3 4 5 +M: early break -- 2.39.2