From bd1157ab7ef9326249448e59520037e5636b01ec Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Wed, 10 Jan 2007 19:32:03 +0000 Subject: [PATCH] 2007-01-10 Chris Toshok * ContainerControlTest.cs: add a test for setting ActiveControl to a non-child control. svn path=/trunk/mcs/; revision=70805 --- .../Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog | 5 +++++ .../Test/System.Windows.Forms/ContainerControlTest.cs | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog index 86b0e587add..086f17ccb5f 100644 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog @@ -1,3 +1,8 @@ +2007-01-10 Chris Toshok + + * ContainerControlTest.cs: add a test for setting ActiveControl to + a non-child control. + 2007-01-08 Jonathan Pobst * FormTest.cs: Added tests for ensuring Form.OnFormClosing is called. diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ContainerControlTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ContainerControlTest.cs index 4b26c625483..3741cd30720 100755 --- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ContainerControlTest.cs +++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ContainerControlTest.cs @@ -175,6 +175,14 @@ namespace MonoTests.System.Windows.Forms { } [Test] + [ExpectedException (typeof (ArgumentException))] + public void ActiveControlNotChildTest () + { + ContainerControl c = new ContainerControl (); + c.ActiveControl = new Control (); + } + + [Test] public void Validation() { Queue events = new Queue(); @@ -233,6 +241,5 @@ namespace MonoTests.System.Windows.Forms { form.Dispose(); } - } } -- 2.11.4.GIT