]> de.git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Collapse the break tests into 1
authorWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 22 Nov 2012 18:25:45 +0000 (19:25 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Thu, 22 Nov 2012 18:25:45 +0000 (19:25 +0100)
tests/break-1.tmpl [deleted file]
tests/break-2.tmpl [deleted file]
tests/break-3.tmpl [deleted file]
tests/break-4.tmpl [deleted file]
tests/break.qc
tests/break.tmpl [new file with mode: 0644]

diff --git a/tests/break-1.tmpl b/tests/break-1.tmpl
deleted file mode 100644 (file)
index f67313e..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-I: break.qc
-D: test break and continue - case 1
-T: -execute
-C: -std=fteqcc
-E: -float -1 -float -1
-M: 0 1 2 3 4 5 6 7 8 9 end
diff --git a/tests/break-2.tmpl b/tests/break-2.tmpl
deleted file mode 100644 (file)
index 5ba7a3a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-I: break.qc
-D: test break and continue - case 2
-T: -execute
-C: -std=fteqcc
-E: -float 3 -float -1
-M: 0 1 2 3 brk end
diff --git a/tests/break-3.tmpl b/tests/break-3.tmpl
deleted file mode 100644 (file)
index bac76d1..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-I: break.qc
-D: test break and continue - case 3
-T: -execute
-C: -std=fteqcc
-E: -float -1 -float 3
-M: 0 1 2 ct 4 5 6 7 8 9 end
diff --git a/tests/break-4.tmpl b/tests/break-4.tmpl
deleted file mode 100644 (file)
index 2d017b0..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-I: break.qc
-D: test break and continue - case 4
-T: -execute
-C: -std=fteqcc
-E: -float 5 -float 2
-M: 0 1 ct 3 4 5 brk end
index 6aa276b2e662e98b534c326f0998de6b19672025..1a0fed1a98997a6fb29b42d3de5e5aa8186dd737 100644 (file)
@@ -1,7 +1,7 @@
 void   print(...)   = #1;
 string ftos (float) = #2;
 
-void main(float brkat, float contat) {
+void test(float brkat, float contat) {
     float i;
 
     for (i = 0; i < 10; i += 1) {
@@ -17,3 +17,10 @@ void main(float brkat, float contat) {
     }
     print("end\n");
 }
+
+void main() {
+    test(-1, -1);
+    test( 3, -1);
+    test(-1,  3);
+    test( 5,  2);
+}
diff --git a/tests/break.tmpl b/tests/break.tmpl
new file mode 100644 (file)
index 0000000..e237cee
--- /dev/null
@@ -0,0 +1,9 @@
+I: break.qc
+D: test break and continue
+T: -execute
+C: -std=fteqcc
+E: -float -1 -float -1
+M: 0 1 2 3 4 5 6 7 8 9 end
+M: 0 1 2 3 brk end
+M: 0 1 2 ct 4 5 6 7 8 9 end
+M: 0 1 ct 3 4 5 brk end