Test for entity-field-pointer function parameters

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-01 18:21:53 +01:00
parent edd9ded23c
commit 70f9be0f59
3 changed files with 25 additions and 1 deletions

View file

@ -15,7 +15,8 @@ TESTLIST = \
fields1 \
invalid-types \
ngraphs \
invalid-assign
invalid-assign \
field-parameters
.PHONY: clean test
@ -156,6 +157,11 @@ invalid-assign-ok: obj invalid-assign/main.qc
invalid-assign: invalid-assign-ok
$(eval $(call maketest,field-parameters,qcc))
field-parameters:
@$(VM) $< > $@/output
@diff $@/output $@/expected
#######################################################################
obj:
mkdir obj

View file

@ -0,0 +1 @@
bar

View file

@ -0,0 +1,17 @@
void(string, string) print = #1;
entity() spawn = #3;
.string a;
.string b;
void(entity e, .string s) callout = {
print(e.s, "\n");
};
void() main = {
local entity e;
e = spawn();
e.a = "foo";
e.b = "bar";
callout(e, b);
};