mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-25 16:45:21 +02:00
[svn r362] Started merging the old 'test' dir as well as the newer 'tangotests' dir into 'tests/mini' and 'tests/minicomplex'.
This commit is contained in:
19
tests/mini/vararg3.d
Normal file
19
tests/mini/vararg3.d
Normal file
@@ -0,0 +1,19 @@
|
||||
module vararg3;
|
||||
|
||||
import tango.core.Vararg;
|
||||
|
||||
void func(...)
|
||||
{
|
||||
assert(_arguments.length == 3);
|
||||
assert(_arguments[0] is typeid(int));
|
||||
assert(_arguments[1] is typeid(float));
|
||||
assert(_arguments[2] is typeid(long));
|
||||
assert(va_arg!(int)(_argptr) == 4);
|
||||
assert(va_arg!(float)(_argptr) == 2.5f);
|
||||
assert(va_arg!(long)(_argptr) == 42L);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
func(4, 2.5f, 42L);
|
||||
}
|
||||
Reference in New Issue
Block a user