Testcases for parameter shadowing

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-09 22:56:34 +01:00
parent 7f4047381e
commit b17fe4db0b
5 changed files with 28 additions and 1 deletions

View file

@ -17,7 +17,8 @@ TESTLIST = \
ngraphs \
invalid-assign \
field-parameters \
functions-as-parameters
functions-as-parameters \
shadow-qcc shadow-gmqcc
.PHONY: clean test
@ -168,6 +169,16 @@ functions-as-parameters:
@$(VM) $< > $@/output
@diff $@/output $@/expected
$(eval $(call maketest,shadow-qcc,qcc))
shadow-qcc:
@$(VM) -vector '33 44 55' $< > $@/output
@diff $@/output $@/expected
$(eval $(call maketest,shadow-gmqcc,gm))
shadow-gmqcc:
@$(VM) -vector '33 44 55' $< > $@/output
@diff $@/output $@/expected
#######################################################################
obj:
mkdir obj

View file

@ -0,0 +1 @@
'0 0 0'

View file

@ -0,0 +1,7 @@
void(string, string) print = #1;
string(vector) vtos = #5;
void(vector org) main = {
local vector org;
print(vtos(org), "\n");
};

View file

@ -0,0 +1 @@
'33 44 55'

View file

@ -0,0 +1,7 @@
void(string, string) print = #1;
string(vector) vtos = #5;
void(vector org) main = {
local vector org;
print(vtos(org), "\n");
};