From: Wolfgang Bumiller Date: Thu, 22 Jan 2015 10:45:23 +0000 (+0100) Subject: add another test that we just didn't have anywhere else yet X-Git-Tag: xonotic-v0.8.2~17 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=49f4fedecfcdbc15879bcfe1f26562acd47d5ac2;p=xonotic%2Fgmqcc.git add another test that we just didn't have anywhere else yet --- diff --git a/tests/fieldfuncs.qc b/tests/fieldfuncs.qc new file mode 100644 index 0000000..4228f33 --- /dev/null +++ b/tests/fieldfuncs.qc @@ -0,0 +1,13 @@ +.float field; + +.float getfield() { + return field; +} + +void() main = { + entity e = spawn(); + e.field = 42; + print(ftos(e.(getfield())), "\n"); + .float memptr = getfield(); + print(ftos(e.memptr), "\n"); +} diff --git a/tests/fieldfuncs.tmpl b/tests/fieldfuncs.tmpl new file mode 100644 index 0000000..1199b9b --- /dev/null +++ b/tests/fieldfuncs.tmpl @@ -0,0 +1,6 @@ +I: fieldfuncs.qc +D: test fields with functions +T: -compile +C: -std=fte +M: 42 +M: 42