2 // vararg.il: Tests for varargs and refany instructions
5 .assembly extern mscorlib {
8 .assembly extern TestDriver {
16 .class public auto ansi Tests extends [mscorlib]System.Object {
18 .method public static vararg void varargtest () cil managed {
21 valuetype [mscorlib]System.ArgIterator it
26 call instance void [mscorlib]System.ArgIterator::.ctor (valuetype [mscorlib]System.RuntimeArgumentHandle)
29 call instance int32 [mscorlib]System.ArgIterator::GetRemainingCount ()
34 call instance typedref [mscorlib]System.ArgIterator::GetNextArg ()
35 call object [mscorlib]System.TypedReference::ToObject (typedref)
36 call void [mscorlib]System.Console::WriteLine (object)
43 .method public static int32 test_0_varargs () cil managed {
48 call vararg void Tests::varargtest (..., int32, int32)
53 .method public static vararg int32 varargtest_refany (int32 last) cil managed {
56 valuetype [mscorlib]System.ArgIterator it,
62 call instance void [mscorlib]System.ArgIterator::.ctor (valuetype [mscorlib]System.RuntimeArgumentHandle)
67 call instance int32 [mscorlib]System.ArgIterator::GetRemainingCount ()
72 call instance typedref [mscorlib]System.ArgIterator::GetNextArg ()
74 call void [mscorlib]System.Console::WriteLine (int32)
78 call void [mscorlib]System.Console::WriteLine (int32)
89 .method public static int32 test_99_varargs_refany () cil managed {
99 call vararg int32 Tests::varargtest_refany (int32, ..., int32, int32, int32, int32, int32, int32)
104 .method public static int32 test_0_varargs_refany_noargs () cil managed {
108 call vararg int32 Tests::varargtest_refany (int32)
112 .method public static int32 test_0_refanytest () cil managed {
123 // Test refany with valid type
130 // Test refany with invalid type
137 catch [mscorlib]System.InvalidCastException {
146 call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle (valuetype [mscorlib]System.RuntimeTypeHandle)
148 call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle (valuetype [mscorlib]System.RuntimeTypeHandle)
165 .method public static vararg float64 varargtest_refany_fp (float64 last) cil managed {
168 valuetype [mscorlib]System.ArgIterator it,
174 call instance void [mscorlib]System.ArgIterator::.ctor (valuetype [mscorlib]System.RuntimeArgumentHandle)
177 call instance int32 [mscorlib]System.ArgIterator::GetRemainingCount ()
182 call instance typedref [mscorlib]System.ArgIterator::GetNextArg ()
184 //call void [mscorlib]System.Console::WriteLine (float64)
188 //call void [mscorlib]System.Console::WriteLine (float64)
198 .method public static int32 test_99_varargs_refany_fp () cil managed {
208 call vararg float64 Tests::varargtest_refany_fp (float64, ..., float64, float64, float64, float64, float64, float64)
213 .method public static int32 Main () cil managed {
218 call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
219 call int32 class [TestDriver]TestDriver::RunTests(class [mscorlib]System.Type)