Merge pull request #2397 from alexanderkyte/debugger_appdomain
[mono.git] / mcs / class / Mono.Debugger.Soft / Test / dtest-app.cs
index d922e9e0e640b4ab9bc3f8689299c099dce6e444..150738e6633c1a6e9473953105245bb0872e069f 100644 (file)
@@ -342,6 +342,8 @@ public class Tests : TestsBase, ITest2
                        frames_in_native ();
                if (args.Length > 0 && args [0] == "invoke-single-threaded")
                        new Tests ().invoke_single_threaded ();
+               if (args.Length > 0 && args [0] == "invoke-abort")
+                       new Tests ().invoke_abort ();
                new Tests ().evaluate_method ();
                return 3;
        }
@@ -598,7 +600,7 @@ public class Tests : TestsBase, ITest2
        public static void arguments () {
                arg1 (SByte.MaxValue - 5, Byte.MaxValue - 5, true, Int16.MaxValue - 5, UInt16.MaxValue - 5, 'F', Int32.MaxValue - 5, UInt32.MaxValue - 5, Int64.MaxValue - 5, UInt64.MaxValue - 5, 1.2345f, 6.78910, new IntPtr (Int32.MaxValue - 5), new UIntPtr (UInt32.MaxValue - 5));
                int i = 42;
-               arg2 ("FOO", null, "BLA", ref i, new GClass <int> { field = 42 }, new object ());
+               arg2 ("FOO", null, "BLA", ref i, new GClass <int> { field = 42 }, new object (), '\0'.ToString () + "A");
                Tests t = new Tests () { field_i = 42, field_s = "S" };
                t.arg3 ("BLA");
        }
@@ -609,7 +611,7 @@ public class Tests : TestsBase, ITest2
        }
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
-       public static string arg2 (string s, string s3, object o, ref int i, GClass <int> gc, object o2) {
+       public static string arg2 (string s, string s3, object o, ref int i, GClass <int> gc, object o2, string s4) {
                return s + (s3 != null ? "" : "") + o + i + gc.field + o2;
        }
 
@@ -944,6 +946,15 @@ public class Tests : TestsBase, ITest2
        public void invoke_single_threaded_2 () {
        }
 
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public void invoke_abort () {
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public void invoke_abort_2 () {
+               Thread.Sleep (1000000);
+       }
+
        public void invoke_return_void () {
        }
 
@@ -1189,6 +1200,8 @@ public class Tests : TestsBase, ITest2
                CrossDomain o = (CrossDomain)domain.CreateInstanceAndUnwrap (
                                   typeof (CrossDomain).Assembly.FullName, "CrossDomain");
 
+               domains_print_across (o);
+
                domains_2 (o, new CrossDomain ());
 
                o.invoke_2 ();
@@ -1212,6 +1225,10 @@ public class Tests : TestsBase, ITest2
        public static void domains_2 (object o, object o2) {
        }
 
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void domains_print_across (object o) {
+       }
+
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static void domains_3 () {
        }
@@ -1443,8 +1460,13 @@ class TypeLoadClass {
 class TypeLoadClass2 {
 }
 
+public class SentinelClass : MarshalByRefObject {
+}
+
 public class CrossDomain : MarshalByRefObject
 {
+       SentinelClass printMe = new SentinelClass ();
+
        public void invoke () {
                Tests.invoke_in_domain ();
        }