+
+ static int test_0_threads() {
+ // Run a bunch of threads, make them JIT some code and
+ // do some casts
+ ThreadRunner runner = new ThreadRunner();
+ Thread[] threads = new Thread[10];
+ for (int i = 0; i < 10; i++) {
+ threads[i] = new Thread(new ThreadStart(runner.Run));
+ threads[i].Start();
+ }
+ for (int i = 0; i < 10; i++) {
+ threads[i].Join();
+ }
+ return 0;
+ }
+
+
+ static int test_0_reflection() {
+ RuntimeServices r = new RuntimeServices();
+ r.Run();
+ return 0;
+ }
+
+ public class BaseClass {
+ }
+
+ public class LongClass : BaseClass {
+ public long Value;
+ public LongClass(long val) { Value = val; }
+ }
+
+ static public long add_two_LongClass(BaseClass l1, BaseClass l2) {
+ long l = checked (((LongClass)l1).Value + ((LongClass)l2).Value);
+ return l;
+ }
+
+ static int test_0_laddcc() {
+ long l = add_two_LongClass(new LongClass(System.Int64.MinValue), new LongClass(1234));
+ if (l == 1234)
+ return 1;
+ return 0;
+ }
+