Add a test for setting ref type fields.
authorZoltan Varga <vargaz@gmail.com>
Mon, 1 Mar 2010 16:30:17 +0000 (16:30 -0000)
committerZoltan Varga <vargaz@gmail.com>
Mon, 1 Mar 2010 16:30:17 +0000 (16:30 -0000)
svn path=/trunk/mono/; revision=152705

mono/tests/dtest.cs

index b785abc5da83fbda0bb9472ca443cbd6685b385c..ebd1ebe9ef8039e404e08619132fc49f622a3422 100644 (file)
@@ -885,6 +885,7 @@ public class DebuggerTests
        }
 
        [Test]
+       [Category ("only")]
        public void Type_SetValue () {
                var e = run_until ("o1");
                var frame = e.Thread.GetFrames () [0];
@@ -901,6 +902,10 @@ public class DebuggerTests
                f = o.Type.GetValue (o.Type.GetField ("static_i"));
                AssertValue (55, f);
 
+               o.Type.SetValue (o.Type.GetField ("static_s"), vm.RootDomain.CreateString ("B"));
+               f = o.Type.GetValue (o.Type.GetField ("static_s"));
+               AssertValue ("B", f);
+
                // Argument checking
                AssertThrows<ArgumentNullException> (delegate () {
                                o.Type.SetValue (null, vm.CreateValue (0));
@@ -1749,7 +1754,6 @@ public class DebuggerTests
        }
 
        [Test]
-       [Category ("only")]
        public void InvokeVType () {
                Event e = run_until ("invoke1");