From: Wolfgang Bumiller Date: Wed, 12 Jun 2013 13:47:59 +0000 (+0200) Subject: array testcase for previous commit X-Git-Tag: v0.3.0~143 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b30368f026e4e1bf27e5beb943d693dbd2268457;p=xonotic%2Fgmqcc.git array testcase for previous commit --- diff --git a/tests/arrays.tmpl b/tests/arrays.tmpl index 6e21f87..747a838 100644 --- a/tests/arrays.tmpl +++ b/tests/arrays.tmpl @@ -4,3 +4,4 @@ T: -execute C: -std=fteqcc M: 10 20 30 40 50 60 70 M: 100 200 300 400 500 600 0 +M: 1 2 3 diff --git a/tests/arrays2.qc b/tests/arrays2.qc index f89739f..fc8bdf5 100644 --- a/tests/arrays2.qc +++ b/tests/arrays2.qc @@ -1,5 +1,6 @@ float glob1[7] = { 10, 20, 30, 40, 50, 60, 70 }; float glob2[7] = { 100, 200, 300, 400, 500, 600 }; +float globs[] = { 1, 2, 3 }; void main() { float i; @@ -12,4 +13,9 @@ void main() { for (i = 1; i != 7; ++i) print(" ", ftos(glob2[i])); print("\n"); + + print(ftos(globs[0])); + for (i = 1; i != 3; ++i) + print(" ", ftos(globs[i])); + print("\n"); }