Merge remote branch 'upstream/master'
[mono.git] / mcs / class / Mono.Debugger.Soft / Test / dtest.cs
index fcf774d470577abacd37cff9180a18b1e68bd3df..8734297972fcce815c1ea5d01cfcaa5ffef1e786 100644 (file)
@@ -51,7 +51,8 @@ public class DebuggerTests
                        vm = VirtualMachineManager.Listen (new IPEndPoint (IPAddress.Any, 10000));
                }
 
-               vm.EnableEvents (EventType.AssemblyLoad);
+               var load_req = vm.CreateAssemblyLoadRequest ();
+               load_req.Enable ();
 
                Event vmstart = vm.GetNextEvent ();
                Assert.AreEqual (EventType.VMStart, vmstart.EventType);
@@ -76,6 +77,8 @@ public class DebuggerTests
 
                        vm.Resume ();
                }
+
+               load_req.Disable ();
        }
 
        BreakpointEvent run_until (string name) {
@@ -1086,6 +1089,7 @@ public class DebuggerTests
        }
 
        [Test]
+       [Category ("only5")]
        public void Type_GetValue () {
                Event e = run_until ("o1");
                StackFrame frame = e.Thread.GetFrames () [0];
@@ -1118,6 +1122,10 @@ public class DebuggerTests
                f = t.GetValue (parent.GetField ("base_static_s"));
                AssertValue ("C", f);
 
+               // thread static field
+               f = t.GetValue (t.GetField ("tls_i"), e.Thread);
+               AssertValue (42, f);
+
                // Argument checking
                AssertThrows<ArgumentNullException> (delegate () {
                        t.GetValue (null);
@@ -1624,6 +1632,9 @@ public class DebuggerTests
        public void AssemblyLoad () {
                Event e = run_until ("assembly_load");
 
+               var load_req = vm.CreateAssemblyLoadRequest ();
+               load_req.Enable ();
+
                vm.Resume ();
 
                e = vm.GetNextEvent ();