summaryrefslogtreecommitdiff
path: root/mcs/class/corlib/Test/System/AggregateExceptionTests.cs
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/corlib/Test/System/AggregateExceptionTests.cs')
-rw-r--r--mcs/class/corlib/Test/System/AggregateExceptionTests.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/mcs/class/corlib/Test/System/AggregateExceptionTests.cs b/mcs/class/corlib/Test/System/AggregateExceptionTests.cs
index bc91e12686..d133a82cd8 100644
--- a/mcs/class/corlib/Test/System/AggregateExceptionTests.cs
+++ b/mcs/class/corlib/Test/System/AggregateExceptionTests.cs
@@ -108,6 +108,17 @@ namespace MonoTests.System
}
}
+ [Test]
+ public void GetBaseWithInner ()
+ {
+ var ae = new AggregateException ("x", new [] { new ArgumentException (), new ArgumentNullException () });
+ Assert.AreEqual (ae, ae.GetBaseException (), "#1");
+
+ var expected = new ArgumentException ();
+ var ae2 = new AggregateException ("x", new AggregateException (expected, new Exception ()));
+ Assert.AreEqual (expected, ae2.GetBaseException ().InnerException, "#2");
+ }
+
static void Throws (Type t, Action action)
{
Exception e = null;