Merge pull request #1659 from alexanderkyte/stringbuilder-referencesource
[mono.git] / mcs / class / Mono.Debugger.Soft / Test / dtest.cs
index 1f9b87f754c92f3ad0de84704702363ec31bce45..0076f9f340b531355ce8f3f88f657c67a4c9f896 100644 (file)
@@ -1138,6 +1138,10 @@ public class DebuggerTests
                Assert.IsTrue (t.IsEnum);
                Assert.AreEqual ("Int32", t.EnumUnderlyingType.Name);
 
+               // TypedReferences
+               t = frame.Method.GetParameters ()[11].ParameterType;
+               Assert.AreEqual ("TypedReference", t.Name);
+
                // properties
                t = frame.Method.GetParameters ()[7].ParameterType;
 
@@ -1429,6 +1433,10 @@ public class DebuggerTests
                AssertValue (2, s ["i"]);
                AssertValue ("S2", s ["s"]);
 
+               // typedbyref
+               var typedref = frame.GetArgument (2) as StructMirror;
+               Assert.IsTrue (typedref is StructMirror);
+
                // Argument checking
                s = frame.GetArgument (0) as StructMirror;
                AssertThrows<ArgumentException> (delegate () {
@@ -2146,6 +2154,11 @@ public class DebuggerTests
                v = this_obj.InvokeMethod (e.Thread, m, null, InvokeOptions.Virtual);
                AssertValue ("V2", v);
 
+               // virtual call on static method
+               m = t.GetMethod ("invoke_static_pass_ref");
+               v = t.InvokeMethod (e.Thread, m, new Value [] { vm.RootDomain.CreateString ("ABC") }, InvokeOptions.Virtual);
+               AssertValue ("ABC", v);
+
 #if NET_4_5
                // instance
                m = t.GetMethod ("invoke_pass_ref");
@@ -3579,13 +3592,11 @@ public class DebuggerTests
                var prev_loc = locs.First (l => (l.LineNumber == frames [0].Location.LineNumber - 3));
                AssertValue (2, frames [0].GetValue (frames [0].Method.GetLocal ("i")));
 
-               Console.WriteLine ("X: " + frames [0].Location.LineNumber);
                // Set back the ip to the first i ++; line
                e.Thread.SetIP (prev_loc);
 
                e = step_over ();
                var f = e.Thread.GetFrames ()[0];
-               Console.WriteLine (f.GetValue (f.Method.GetLocal ("i")));
                AssertValue (3, f.GetValue (f.Method.GetLocal ("i")));
        }