Revert "Merge branch 'master' of https://github.com/mono/mono"
[mono.git] / mcs / class / Mono.Debugger.Soft / Test / dtest-app.cs
index dc4be1371e6eda1e3d9d794365fa95d1ff0671c9..194b436f080076b9f3b8ce01d632fa50445ec0b4 100644 (file)
@@ -284,6 +284,7 @@ public class Tests : TestsBase, ITest2
                type_load ();
                regress ();
                gc_suspend ();
+               set_ip ();
                if (args.Length > 0 && args [0] == "domain-test")
                        /* This takes a lot of time, so execute it conditionally */
                        domains ();
@@ -293,6 +294,7 @@ public class Tests : TestsBase, ITest2
                        frames_in_native ();
                if (args.Length > 0 && args [0] == "invoke-single-threaded")
                        new Tests ().invoke_single_threaded ();
+               new Tests ().evaluate_method ();
                return 3;
        }
 
@@ -361,6 +363,7 @@ public class Tests : TestsBase, ITest2
                ss_regress_654694 ();
                ss_step_through ();
                ss_recursive (1);
+               ss_fp_clobber ();
        }
 
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
@@ -485,6 +488,21 @@ public class Tests : TestsBase, ITest2
                ss_recursive (n + 1);
        }
 
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void ss_fp_clobber () {
+               double v = ss_fp_clobber_1 (5.0);
+               ss_fp_clobber_2 (v);
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static double ss_fp_clobber_1 (double d) {
+               return d + 2.0;
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void ss_fp_clobber_2 (double d) {
+       }
+
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static bool is_even (int i) {
                return i % 2 == 0;
@@ -597,8 +615,9 @@ public class Tests : TestsBase, ITest2
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static void locals () {
                string s = null;
+               var astruct = new AStruct () { i = 42 };
                locals1 (null);
-               locals2<string> (null, 5, "ABC", ref s);
+               locals2<string> (null, 5, "ABC", ref s, ref astruct);
                locals3 ();
                locals6 ();
                locals7<int> (22);
@@ -624,7 +643,7 @@ public class Tests : TestsBase, ITest2
 #if NET_4_5
        [StateMachine (typeof (int))]
 #endif
-       public static void locals2<T> (string[] args, int arg, T t, ref string rs) {
+       public static void locals2<T> (string[] args, int arg, T t, ref string rs, ref AStruct astruct) {
                long i = 42;
                string s = "AB";
 
@@ -633,6 +652,7 @@ public class Tests : TestsBase, ITest2
                                i ++;
                        if (t != null)
                                i ++;
+                       astruct = new AStruct ();
                }
                rs = "A";
        }
@@ -1256,6 +1276,35 @@ public class Tests : TestsBase, ITest2
        [MethodImplAttribute (MethodImplOptions.NoInlining)]
        public static void generic_method<T> () where T : class {
        }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public void evaluate_method_2 () {
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public void evaluate_method () {
+               field_i = 42;
+               evaluate_method_2 ();
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       static void set_ip_1 () {
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       static void set_ip_2 () {
+       }
+
+       [MethodImplAttribute (MethodImplOptions.NoInlining)]
+       public static void set_ip () {
+               int i, j;
+
+               i = 1;
+               set_ip_1 ();
+               i = 5;
+               j = 5;
+               set_ip_2 ();
+       }
 }
 
 class TypeLoadClass {