Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2012-06-15 14:18:55 +0400
committerMarek Safar <marek.safar@gmail.com>2012-06-15 14:18:55 +0400
commitb827712d7615bbbc919dc4e0f6ae0697279d6477 (patch)
treead4655f53292d21fbedfe5b29b48b2aab6eadf96 /mcs/class/Managed.Windows.Forms/Test
parent5dba4d1e7db248d00d8e6e06fe3cb6f14cf0d891 (diff)
Fix TestMenuItemsDispose test
Diffstat (limited to 'mcs/class/Managed.Windows.Forms/Test')
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuTest.cs6
1 files changed, 5 insertions, 1 deletions
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuTest.cs
index d163747cac8..d51f023c363 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuTest.cs
@@ -130,7 +130,11 @@ namespace MonoTests.System.Windows.Forms
Menu menu = new MainMenu ();
menu.MenuItems.Add (new MenuItem ());
menu.Dispose ();
- Assert.Throws (typeof (ArgumentOutOfRangeException), delegate { MenuItem item = menu.MenuItems[0]; });
+ try {
+ MenuItem item = menu.MenuItems[0];
+ Assert.Fail ();
+ } catch (ArgumentOutOfRangeException) {
+ }
}
}
}