X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fruntime-invoke.cs;h=2c34478f83d63d1931908c51f24d1384fbc2f1db;hb=ac1d494270ac25b3fd885ef7d8b52cb27109861d;hp=23fec490693ff134df0462fe9125fc60160bbd86;hpb=70828363f1a3cbea832161957d66001421ae77db;p=mono.git diff --git a/mono/tests/runtime-invoke.cs b/mono/tests/runtime-invoke.cs index 23fec490693..2c34478f83d 100644 --- a/mono/tests/runtime-invoke.cs +++ b/mono/tests/runtime-invoke.cs @@ -29,6 +29,11 @@ enum Enum2 D } +struct AStruct { + public int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10; + public int a11, a12, a13, a14, a15, a16, a17, a18, a19, a20; +} + class Tests { public static Enum1 return_enum1 () { @@ -47,6 +52,10 @@ class Tests return UInt64.MaxValue - 5; } + public static object return_t (T t) { + return (object)t; + } + static int Main (string[] args) { return TestDriver.RunTests (typeof (Tests), args); @@ -279,4 +288,19 @@ class Tests else return 1; } + + public static int test_0_large_arg () + { + var arg = new AStruct (); + arg.a1 = 1; + arg.a2 = 2; + arg.a3 = 3; + arg.a20 = 20; + var res = typeof (Tests).GetMethod ("return_t").MakeGenericMethod (new Type [] { typeof (AStruct) }).Invoke (null, new object [] { arg }); + var arg2 = (AStruct)res; + if (arg2.a20 == 20) + return 0; + else + return 1; + } }