mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-18 22:31:36 +00:00
Testcases for parameter shadowing
This commit is contained in:
parent
7f4047381e
commit
b17fe4db0b
5 changed files with 28 additions and 1 deletions
|
@ -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
|
||||
|
|
1
testsuite/shadow-gmqcc/expected
Normal file
1
testsuite/shadow-gmqcc/expected
Normal file
|
@ -0,0 +1 @@
|
|||
'0 0 0'
|
7
testsuite/shadow-gmqcc/main.qc
Normal file
7
testsuite/shadow-gmqcc/main.qc
Normal 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");
|
||||
};
|
1
testsuite/shadow-qcc/expected
Normal file
1
testsuite/shadow-qcc/expected
Normal file
|
@ -0,0 +1 @@
|
|||
'33 44 55'
|
7
testsuite/shadow-qcc/main.qc
Normal file
7
testsuite/shadow-qcc/main.qc
Normal 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");
|
||||
};
|
Loading…
Reference in a new issue