X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Fbasic-long.cs;h=82eb5befe7dd3b2b3a6b1153bf7cc70d65beee1f;hb=a04f104093e6de8a34aa66c806e36cad188e18e6;hp=19c33016558ce9370177433000f1f37c5ba24f5d;hpb=dd5e72a46ff2fb187db84c1392692b0523008b60;p=mono.git diff --git a/mono/mini/basic-long.cs b/mono/mini/basic-long.cs index 19c33016558..82eb5befe7d 100644 --- a/mono/mini/basic-long.cs +++ b/mono/mini/basic-long.cs @@ -23,11 +23,18 @@ using System.Reflection; * the IL code looks. */ -class Tests { +#if __MOBILE__ +class LongTests +#else +class Tests +#endif +{ - public static int Main () { - return TestDriver.RunTests (typeof (Tests)); +#if !__MOBILE__ + public static int Main (string[] args) { + return TestDriver.RunTests (typeof (Tests), args); } +#endif public static int test_10_simple_cast () { long a = 10; @@ -1196,5 +1203,65 @@ class Tests { ulong c = ((ulong) (-(-a))) >> 32; return c == 1 ? 0 : 1; } + + public static int test_6_lrem_un () { + ulong r2 = 4294967296; + uint d = 10; + ulong res = r2 % d; + + return (int)res; + } + + public static int test_0_lrem_imm_1 () { + long b = 12L; + return (int)(b % 1L); + } + + public static int test_0_lrem_imm_1_neg () { + long b = -2L; + return (int)(b % 1L); + } + + public static int test_0_lrem_imm_2 () + { + long x = 245345634L; + return (int)(x % 2L); + } + + public static int test_1_lrem_imm_2 () + { + long x = 24534553245L; + return (int)(x % 2L); + } + + public static int test_1_lrem_imm_2_neg () + { + long x = -24534553245L; + return -(int)(x % 2L); + } + + public static int test_13_lrem_imm_32 () + { + long x = 17389L; + return (int)(x % 32L); + } + + public static int test_27_lrem_imm_32_neg () + { + long x = -2435323L; + return -(int)(x % 32L); + } + + public static int test_5_lrem_imm_large () + { + long x = 0x1000000005L; + return (int)(x % 0x40000000L); + } + + public static int test_5_lrem_imm_too_large () + { + long x = 0x1000000005L; + return (int)(x % 0x80000000L); + } }