From 2356f0760a1ff9671be89d94a09be706c8322694 Mon Sep 17 00:00:00 2001 From: zoltan Date: Mon, 1 Mar 2010 17:18:22 +0000 Subject: [PATCH] 2010-03-01 Zoltan Varga * dtest.cs: Add a test for CreateBoxedValue. git-svn-id: svn+ssh://mono-cvs.ximian.com/source/trunk/mono@152720 e3ebcda4-bce8-0310-ba0a-eca2169e7518 --- mono/tests/ChangeLog | 4 ++++ mono/tests/dtest.cs | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/mono/tests/ChangeLog b/mono/tests/ChangeLog index 2de5cde31..9acc55a52 100644 --- a/mono/tests/ChangeLog +++ b/mono/tests/ChangeLog @@ -1,3 +1,7 @@ +2010-03-01 Zoltan Varga + + * dtest.cs: Add a test for CreateBoxedValue. + 2010-03-01 Martin Baulig * abort-invoke.cs: Add a test for my latest patch regarding thread diff --git a/mono/tests/dtest.cs b/mono/tests/dtest.cs index ebd1ebe9e..eaaa10712 100644 --- a/mono/tests/dtest.cs +++ b/mono/tests/dtest.cs @@ -1622,6 +1622,24 @@ public class DebuggerTests } [Test] + [Category ("only")] + public void CreateBoxedValue () { + ObjectMirror o = vm.RootDomain.CreateBoxedValue (new PrimitiveValue (vm, 42)); + + Assert.AreEqual ("Int32", o.Type.Name); + //AssertValue (42, m.GetValue (o.Type.GetField ("m_value"))); + + // Argument checking + AssertThrows (delegate () { + vm.RootDomain.CreateBoxedValue (null); + }); + + AssertThrows (delegate () { + vm.RootDomain.CreateBoxedValue (o); + }); + } + + [Test] public void Invoke () { Event e = run_until ("invoke1"); -- 2.11.4.GIT