add variable search order test

Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
This commit is contained in:
Wolfgang Bumiller 2018-01-14 09:10:29 +01:00
parent e920766b10
commit f84c8ea629
2 changed files with 26 additions and 0 deletions

18
tests/var-search-order.qc Normal file
View file

@ -0,0 +1,18 @@
float a = 1000;
float b = 1001;
float c = 1002;
void test(float b) {
float c = 3002;
print(ftos(a), "\n");
print(ftos(b), "\n");
print(ftos(c), "\n");
{
float b = 4001;
print(ftos(b), "\n");
}
}
void main() {
test(2001);
}

View file

@ -0,0 +1,8 @@
I: var-search-order.qc
D: test variable search order
T: -execute
C: -std=gmqcc
M: 1000
M: 2001
M: 3002
M: 4001