mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-23 20:33:05 +00:00
Added counter-stability test to the varargs testcase
This commit is contained in:
parent
1410840ef6
commit
8697fa59f3
2 changed files with 11 additions and 0 deletions
|
@ -9,6 +9,15 @@ void nbva(float a, string...count) {
|
|||
print("Vararg ", ftos(a), " = ", ...(a, string), "\n");
|
||||
}
|
||||
|
||||
var void unstable(...);
|
||||
void stability(float a, float b, ...count)
|
||||
{
|
||||
print("Got: ", ftos(count), "\n");
|
||||
}
|
||||
|
||||
void main() {
|
||||
nbva(1, "Hello", "You", "There");
|
||||
stability(1, 2, 3, 4, 5);
|
||||
unstable = stability;
|
||||
unstable(1, 2, 3, 4, 5);
|
||||
}
|
||||
|
|
|
@ -8,3 +8,5 @@ M: You chose: You
|
|||
M: Vararg 0 = Hello
|
||||
M: Vararg 1 = You
|
||||
M: Vararg 2 = There
|
||||
M: Got: 3
|
||||
M: Got: 3
|
||||
|
|
Loading…
Reference in a new issue