mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
add variable search order test
Signed-off-by: Wolfgang Bumiller <wry.git@bumiller.com>
This commit is contained in:
parent
e920766b10
commit
f84c8ea629
2 changed files with 26 additions and 0 deletions
18
tests/var-search-order.qc
Normal file
18
tests/var-search-order.qc
Normal 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);
|
||||
}
|
8
tests/var-search-order.tmpl
Normal file
8
tests/var-search-order.tmpl
Normal 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
|
Loading…
Reference in a new issue