mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-12-18 00:11:06 +00:00
Collapsing the switch tests into 1
This commit is contained in:
parent
c0d46ba893
commit
c5f8fbb871
10 changed files with 24 additions and 49 deletions
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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
|
|
@ -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);
|
||||
}
|
||||
|
|
12
tests/switch.tmpl
Normal file
12
tests/switch.tmpl
Normal file
|
@ -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
|
Loading…
Reference in a new issue