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:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2014-09-26 16:43:36 +0400
committerAlexander Köplinger <alex.koeplinger@outlook.com>2015-01-17 07:45:39 +0300
commit746650d1b93114b60feb155c2ee778a9e16ccb6d (patch)
treef8e1eb791640ba6fd887da5e64cde3a1139b42b0 /mcs/class/Managed.Windows.Forms
parent7d1cd56c5d97683f6dae35cb9143d8789b71c2de (diff)
[bcl] Remove more NET_2_0 checks from class libs
Diffstat (limited to 'mcs/class/Managed.Windows.Forms')
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/CompatTest.cs8
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeAliasTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeByteArrayTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTypeNameTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerialisedGetValueTypeNameTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerializedGetValueTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTypeNameTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeWriteBehavior.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXFileRefTest.cs55
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXResourceReaderTest.cs179
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Resources/ResourcesTestHelper.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/ArrangedElementCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ApplicationTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/AutoCompleteStringCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingContextTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingNavigatorTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingSourceTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs14
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingsCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonBaseTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CheckedListBoxTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnHeaderTest.cs14
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnStyleTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs54
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CommonDialogsTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ContainerControlTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlBindingsCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlHandleTest.cs64
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger.cs972
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger2.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlPropertyEventsTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs116
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs36
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CurrencyManagerTest.cs22
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CursorTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs68
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewAdvancedBorderStyleTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewBandTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewButtonCellTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellStyleTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCheckBoxCellTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardHeaderTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnHeaderTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewComboBoxCellTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCommon.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewDataBindingTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewElementTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewImageCellTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewLinkCellTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowHeaderTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxCellTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxColumnTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataObjectTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DateTimePickerTest.cs78
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs10
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ErrorProviderTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventArgsTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs28
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormHandleTest.cs102
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs56
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/GroupBoxTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HScrollPropertiesTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HelpProviderTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageKeyConverterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListStreamerTest.cs254
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListTest.cs51
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/InputLanguageTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeyEventArgsTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeysConverterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LabelTest.cs10
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkAreaTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkConverterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkLabelTest.cs30
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBindingHelperTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs24
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListControlTest.cs8
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewCollectionsTest.cs48
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs48
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewTest.cs145
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MaskedTextBoxTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormHandleTest.cs102
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs22
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuItemTest.cs8
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuStripTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MessageTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MonthCalendarTest.cs38
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NotifyIconTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingConverterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaintEventArgsTest.cs14
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PanelTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PictureBoxTest.cs6
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PrintDialogTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs26
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PropertyGridTest.cs69
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RadioButtonTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs42
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RowStyleTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SaveFileDialogTest.cs26
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs18
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollableControlTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SelectionRangeTest.cs6
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs6
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs148
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TestHelper.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs62
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs16
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarButtonTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripButtonTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripComboBoxTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripControlHostTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownItemTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemCollectionTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripLabelTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripProgressBarTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripSeparatorTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTextBoxTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs8
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeCollectionTest.cs26
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeTest.cs12
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewHitTestInfoTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageIndexConverterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageKeyConverterTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewTest.cs13
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UpDownTest.cs56
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs4
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/VScrollPropertiesTest.cs2
-rw-r--r--mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/WebBrowserTest.cs2
164 files changed, 60 insertions, 3408 deletions
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/CompatTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/CompatTest.cs
index d0aabaa9008..7c874f2d506 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/CompatTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/CompatTest.cs
@@ -38,13 +38,7 @@ namespace MonoTests.System.Resources
Assert.AreEqual (16, ((byte []) h ["ByteArray2"]) [1], fileName + "#8");
Assert.AreEqual (1013, ((int []) h ["IntArray"]) [1], fileName + "#9");
Assert.AreEqual ("world", ((string []) h ["StringArray"]) [1], fileName + "#10");
-#if NET_2_0
Assert.IsNull (h ["InvalidMimeType"], "#11");
-#else
- Assert.IsNotNull (h ["InvalidMimeType"], "#11a");
- Assert.AreEqual ("AAEAAAD/////AQAAAAAAAAARAQAAAAIAAAAGAgAAAAVoZWxsbwYDAAAABXdvcmxkCw==",
- h ["InvalidMimeType"], "#11b");
-#endif
Assert.IsNotNull (h ["Image"], fileName + "#12");
Assert.AreEqual (typeof (Bitmap), h ["Image"].GetType (), fileName + "#13");
}
@@ -60,7 +54,6 @@ namespace MonoTests.System.Resources
Helper.TestReader (fileName);
}
-#if NET_2_0
[Test]
public void TestReader_2_0 ()
{
@@ -70,6 +63,5 @@ namespace MonoTests.System.Resources
Helper.TestReader (fileName);
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeAliasTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeAliasTests.cs
index 371e821e119..d79ee5b1a24 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeAliasTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeAliasTests.cs
@@ -27,7 +27,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Reflection;
@@ -172,4 +171,3 @@ namespace MonoTests.System.Resources {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeByteArrayTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeByteArrayTests.cs
index 401ca18b8ad..0d1a52d903a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeByteArrayTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeByteArrayTests.cs
@@ -26,7 +26,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Resources;
@@ -99,4 +98,3 @@ namespace MonoTests.System.Resources {
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTests.cs
index f1f86597ca2..d0e3fc1bd3d 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTests.cs
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Reflection;
@@ -149,4 +148,3 @@ namespace MonoTests.System.Resources {
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTypeNameTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTypeNameTests.cs
index 19b650d1dd0..f69373325c0 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTypeNameTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeFileRefGetValueTypeNameTests.cs
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Reflection;
@@ -153,4 +152,3 @@ namespace MonoTests.System.Resources {
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerialisedGetValueTypeNameTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerialisedGetValueTypeNameTests.cs
index ea5d9fc69c3..8ca5f4eb574 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerialisedGetValueTypeNameTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerialisedGetValueTypeNameTests.cs
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Reflection;
@@ -330,5 +329,4 @@ namespace MonoTests.System.Resources {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerializedGetValueTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerializedGetValueTests.cs
index c1fc9fe71d5..d27d4439bb6 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerializedGetValueTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeSerializedGetValueTests.cs
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Resources;
@@ -353,5 +352,4 @@ namespace MonoTests.System.Resources {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs
index 4c6ba44c18c..3a6cfbda95a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTest.cs
@@ -26,7 +26,6 @@
// Gary Barnett (gary.barnett.mono@gmail.com)
-#if NET_2_0
using System;
using System.IO;
using System.Reflection;
@@ -412,5 +411,4 @@ namespace MonoTests.System.Resources {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTests.cs
index 3b96d3aa2b0..aa3f396c10e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTests.cs
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Resources;
@@ -321,5 +320,4 @@ namespace MonoTests.System.Resources
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTypeNameTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTypeNameTests.cs
index 4c41d011e24..21ced00ee6f 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTypeNameTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeTypeConverterGetValueTypeNameTests.cs
@@ -25,7 +25,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Resources;
@@ -318,5 +317,4 @@ namespace MonoTests.System.Resources
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeWriteBehavior.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeWriteBehavior.cs
index 03171e400c4..6c69a328a08 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeWriteBehavior.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXDataNodeWriteBehavior.cs
@@ -26,7 +26,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.IO;
using System.Reflection;
@@ -398,4 +397,3 @@ namespace MonoTests.System.Resources {
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXFileRefTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXFileRefTest.cs
index 52b1951ca24..b0d1c924b86 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXFileRefTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXFileRefTest.cs
@@ -24,16 +24,13 @@ namespace MonoTests.System.Resources
{
ResXFileRef r = new ResXFileRef ("mono.bmp", "Bitmap");
MonoTests.System.Windows.Forms.TestHelper.RemoveWarning (r);
-#if NET_2_0
Assert.AreEqual ("mono.bmp", r.FileName, "#1");
Assert.AreEqual ("Bitmap", r.TypeName, "#2");
-#endif
}
[Test]
public void Constructor1_FileName_Null ()
{
-#if NET_2_0
try {
new ResXFileRef ((string) null, "Bitmap");
Assert.Fail ("#1");
@@ -44,16 +41,11 @@ namespace MonoTests.System.Resources
Assert.AreEqual ("fileName", ex.ParamName, "#5");
Assert.IsNull (ex.InnerException, "#6");
}
-#else
- ResXFileRef r = new ResXFileRef ((string) null, "Bitmap");
- Assert.AreEqual (";Bitmap", r.ToString ());
-#endif
}
[Test]
public void Constructor1_TypeName_Null ()
{
-#if NET_2_0
try {
new ResXFileRef ("mono.bmp", (string) null);
Assert.Fail ("#1");
@@ -64,13 +56,8 @@ namespace MonoTests.System.Resources
Assert.AreEqual ("typeName", ex.ParamName, "#5");
Assert.IsNull (ex.InnerException, "#6");
}
-#else
- ResXFileRef r = new ResXFileRef ("mono.bmp", (string) null);
- Assert.AreEqual ("mono.bmp;", r.ToString ());
-#endif
}
-#if NET_2_0
[Test]
public void Constructor2 ()
{
@@ -116,7 +103,6 @@ namespace MonoTests.System.Resources
Assert.IsNull (ex.InnerException, "#6");
}
}
-#endif
[Test]
public void ToStringTest ()
@@ -124,13 +110,11 @@ namespace MonoTests.System.Resources
ResXFileRef r = new ResXFileRef ("mono.bmp", "Bitmap");
Assert.AreEqual ("mono.bmp;Bitmap", r.ToString (), "#1");
-#if NET_2_0
r = new ResXFileRef ("mono.bmp", "Bitmap", Encoding.UTF8);
Assert.AreEqual ("mono.bmp;Bitmap;utf-8", r.ToString (), "#2");
r = new ResXFileRef ("mono.bmp", "Bitmap", (Encoding) null);
Assert.AreEqual ("mono.bmp;Bitmap", r.ToString (), "#3");
-#endif
}
}
@@ -198,7 +182,6 @@ namespace MonoTests.System.Resources
try {
_converter.ConvertFrom (fileRef);
Assert.Fail ("#B1");
-#if NET_2_0
} catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
Assert.IsNull (ex.InnerException, "#B3");
@@ -206,13 +189,6 @@ namespace MonoTests.System.Resources
Assert.AreEqual ("value", ex.Message, "#B5");
Assert.IsNull (ex.ParamName, "#B6");
}
-#else
- } catch (IndexOutOfRangeException ex) {
- Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2");
- Assert.IsNull (ex.InnerException, "#B3");
- Assert.IsNotNull (ex.Message, "#B4");
- }
-#endif
}
[Test]
@@ -228,38 +204,21 @@ namespace MonoTests.System.Resources
{
// read UTF-7 content without setting encoding
string fileRef = _tempFileUTF7 + ";" + typeof (string).AssemblyQualifiedName;
-#if NET_2_0
string result = _converter.ConvertFrom (fileRef) as string;
Assert.IsNotNull (result, "#A1");
Assert.IsFalse (result == "\u0021\u0026\u002A\u003B", "#A2");
-#else
- try {
- _converter.ConvertFrom (fileRef);
- Assert.Fail ("#A");
- } catch (MissingMethodException) {
- }
-#endif
// read UTF-7 content using UTF-7 encoding
fileRef = _tempFileUTF7 + ";" + typeof (string).AssemblyQualifiedName + ";utf-7";
-#if NET_2_0
result = _converter.ConvertFrom (fileRef) as string;
Assert.IsNotNull (result, "#B1");
Assert.AreEqual ("\u0021\u0026\u002A\u003B", result, "#B2");
-#else
- try {
- _converter.ConvertFrom (fileRef);
- Assert.Fail ("#C");
- } catch (MissingMethodException) {
- }
-#endif
// invalid encoding
fileRef = _tempFileUTF7 + ";" + typeof (string).AssemblyQualifiedName + ";utf-99";
try {
_converter.ConvertFrom (fileRef);
Assert.Fail ("#D1");
-#if NET_2_0
} catch (ArgumentException ex) {
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#D2");
Assert.IsNull (ex.InnerException, "#D3");
@@ -268,10 +227,6 @@ namespace MonoTests.System.Resources
Assert.IsNotNull (ex.ParamName, "#D6");
Assert.AreEqual ("name", ex.ParamName, "#D7");
}
-#else
- } catch (MissingMethodException) {
- }
-#endif
}
[Test]
@@ -306,17 +261,9 @@ namespace MonoTests.System.Resources
public void ConvertFrom_Type_MemoryStream ()
{
string fileRef = _tempFileUTF7 + ";" + typeof (MemoryStream).AssemblyQualifiedName;
-#if NET_2_0
using (MemoryStream ms = (MemoryStream) _converter.ConvertFrom (fileRef)) {
Assert.IsTrue (ms.Length > 0);
}
-#else
- try {
- _converter.ConvertFrom (fileRef);
- Assert.Fail ("#1");
- } catch (MissingMethodException) {
- }
-#endif
}
[Test]
@@ -326,7 +273,6 @@ namespace MonoTests.System.Resources
Assert.AreEqual ("mono.bmp;Bitmap", (string) _converter.ConvertTo (
r, typeof (string)), "#1");
-#if NET_2_0
r = new ResXFileRef ("mono.bmp", "Bitmap", Encoding.UTF8);
Assert.AreEqual ("mono.bmp;Bitmap;utf-8", (string) _converter.ConvertTo (
r, typeof (string)), "#2");
@@ -334,7 +280,6 @@ namespace MonoTests.System.Resources
r = new ResXFileRef ("mono.bmp", "Bitmap", (Encoding) null);
Assert.AreEqual ("mono.bmp;Bitmap", (string) _converter.ConvertTo (
r, typeof (string)), "#3");
-#endif
}
private TypeConverter _converter;
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXResourceReaderTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXResourceReaderTest.cs
index 79188cd8b3b..adfce11883f 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXResourceReaderTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResXResourceReaderTest.cs
@@ -218,13 +218,8 @@ namespace MonoTests.System.Resources {
Assert.AreEqual ("foo", enumerator.Key, "#A2");
Bitmap bitmap = enumerator.Value as Bitmap;
Assert.IsNotNull (bitmap, "#A3");
-#if NET_2_0
Assert.AreEqual (32, bitmap.Height, "#A4");
Assert.AreEqual (32, bitmap.Width, "#A5");
-#else
- Assert.AreEqual (96, bitmap.Height, "#A4");
- Assert.AreEqual (96, bitmap.Width, "#A5");
-#endif
}
File.Delete (refFile);
@@ -283,7 +278,6 @@ namespace MonoTests.System.Resources {
Assert.IsNotNull (ex.Message, "#A4");
Assert.IsNull (ex.ParamName, "#A5");
-#if NET_2_0
// Could not find a part of the path "<current dir>\in\string.txt".
// Line 1, position 821
XmlException inner = ex.InnerException as XmlException;
@@ -303,19 +297,8 @@ namespace MonoTests.System.Resources {
Assert.IsNotNull (inner2.Message, "#A15");
Assert.IsTrue (inner2.Message.IndexOf (Path.Combine (
Directory.GetCurrentDirectory (), relRefFile)) != -1, "#A16");
-#else
- // Could not find a part of the path "<current dir>\in\string.txt"
- Exception inner = ex.InnerException;
- Assert.AreEqual (typeof (DirectoryNotFoundException), inner.GetType (), "#A6");
- Assert.IsNull (inner.InnerException, "#A7");
- Assert.IsNotNull (inner.Message, "#A8");
- Assert.IsTrue (inner.Message.IndexOf (Path.Combine (
- Directory.GetCurrentDirectory (), relRefFile)) != -1, "#A9");
-#endif
}
-#if NET_2_0
Assert.IsNull (r.BasePath, "#A17");
-#endif
}
string originalCurrentDir = Directory.GetCurrentDirectory ();
@@ -330,16 +313,13 @@ namespace MonoTests.System.Resources {
Assert.IsNotNull (sr, "#B3");
Assert.AreEqual ("hello", sr.ReadToEnd (), "#B4");
}
-#if NET_2_0
Assert.IsNull (r.BasePath, "#B5");
-#endif
}
} finally {
// restore original current directory
Directory.SetCurrentDirectory (originalCurrentDir);
}
-#if NET_2_0
using (ResXResourceReader r = new ResXResourceReader (resxFile)) {
r.BasePath = _tempDirectory;
IDictionaryEnumerator enumerator = r.GetEnumerator ();
@@ -387,7 +367,6 @@ namespace MonoTests.System.Resources {
}
Assert.AreEqual (Path.GetTempPath (), r.BasePath, "#D17");
}
-#endif
}
[Test]
@@ -408,25 +387,11 @@ namespace MonoTests.System.Resources {
}
using (ResXResourceReader r = new ResXResourceReader (resxFile)) {
-#if NET_2_0
IDictionaryEnumerator enumerator = r.GetEnumerator ();
enumerator.MoveNext ();
Assert.IsNotNull (enumerator.Current, "#A1");
Assert.AreEqual ("foo", enumerator.Key, "#A2");
Assert.IsFalse ("\u0021\u0026\u002A\u003B" == (string) enumerator.Value, "#A3");
-#else
- try {
- r.GetEnumerator ();
- Assert.Fail ("#A1");
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNotNull (ex.InnerException, "#A3");
- Assert.IsNotNull (ex.Message, "#A4");
- Assert.IsNull (ex.ParamName, "#A5");
-
- Assert.AreEqual (typeof (MissingMethodException), ex.InnerException.GetType (), "#A6");
- }
-#endif
}
resxFile = Path.Combine (_tempDirectory, "resources.resx");
@@ -439,25 +404,11 @@ namespace MonoTests.System.Resources {
}
using (ResXResourceReader r = new ResXResourceReader (resxFile)) {
-#if NET_2_0
IDictionaryEnumerator enumerator = r.GetEnumerator ();
enumerator.MoveNext ();
Assert.IsNotNull (enumerator.Current, "#B1");
Assert.AreEqual ("foo", enumerator.Key, "#B2");
Assert.AreEqual ("\u0021\u0026\u002A\u003B", (string) enumerator.Value, "#B3");
-#else
- try {
- r.GetEnumerator ();
- Assert.Fail ("#B1");
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.InnerException, "#B3");
- Assert.IsNotNull (ex.Message, "#B4");
- Assert.IsNull (ex.ParamName, "#B5");
-
- Assert.AreEqual (typeof (MissingMethodException), ex.InnerException.GetType (), "#B6");
- }
-#endif
}
}
@@ -479,25 +430,11 @@ namespace MonoTests.System.Resources {
}
using (ResXResourceReader r = new ResXResourceReader (resxFile)) {
-#if NET_2_0
IDictionaryEnumerator enumerator = r.GetEnumerator ();
enumerator.MoveNext ();
Assert.IsNotNull (enumerator.Current, "#A1");
Assert.AreEqual ("foo", enumerator.Key, "#A2");
Assert.AreEqual ("\u0041\u2262\u0391\u002E", (string) enumerator.Value, "#A3");
-#else
- try {
- r.GetEnumerator ();
- Assert.Fail ("#A1");
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNotNull (ex.InnerException, "#A3");
- Assert.IsNotNull (ex.Message, "#A4");
- Assert.IsNull (ex.ParamName, "#A5");
-
- Assert.AreEqual (typeof (MissingMethodException), ex.InnerException.GetType (), "#A6");
- }
-#endif
}
resxFile = Path.Combine (_tempDirectory, "resources.resx");
@@ -510,25 +447,11 @@ namespace MonoTests.System.Resources {
}
using (ResXResourceReader r = new ResXResourceReader (resxFile)) {
-#if NET_2_0
IDictionaryEnumerator enumerator = r.GetEnumerator ();
enumerator.MoveNext ();
Assert.IsNotNull (enumerator.Current, "#B1");
Assert.AreEqual ("foo", enumerator.Key, "#B2");
Assert.AreEqual ("\u0041\u2262\u0391\u002E", (string) enumerator.Value, "#B3");
-#else
- try {
- r.GetEnumerator ();
- Assert.Fail ("#B1");
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.InnerException, "#B3");
- Assert.IsNotNull (ex.Message, "#B4");
- Assert.IsNull (ex.ParamName, "#B5");
-
- Assert.AreEqual (typeof (MissingMethodException), ex.InnerException.GetType (), "#B6");
- }
-#endif
}
}
@@ -601,27 +524,14 @@ namespace MonoTests.System.Resources {
break;
case "Address":
Assert.IsNotNull (enumerator.Value, "#B1");
-#if NET_2_0
Assert.AreEqual (string.Empty, enumerator.Value, "#B2");
-#else
- Assert.AreEqual ("Boston ", enumerator.Value, "#B2");
-#endif
break;
case "country":
Assert.IsNotNull (enumerator.Value, "#C1");
-#if NET_2_0
Assert.AreEqual (string.Empty, enumerator.Value, "#C2");
-#else
- Assert.AreEqual ("Belgium", enumerator.Value, "#C2");
-#endif
break;
case "firstName":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#D");
-#else
- Assert.IsNotNull (enumerator.Value, "#D1");
- Assert.AreEqual (string.Empty, enumerator.Value, "#D2");
-#endif
break;
case "zip":
Assert.IsNotNull (enumerator.Value, "#E1");
@@ -1262,7 +1172,6 @@ namespace MonoTests.System.Resources {
Assert.IsNotNull (ex.Message, "#4");
Assert.IsNull (ex.ParamName, "#5");
-#if NET_2_0
// Could not find a name for a resource. The resource
// value was 'whatever'. Line 1, position 200
XmlException inner = ex.InnerException as XmlException;
@@ -1285,17 +1194,6 @@ namespace MonoTests.System.Resources {
Assert.IsNotNull (inner2.Message, "#18");
Assert.IsTrue (inner2.Message.IndexOf ("'whatever'") != -1, "#19");
Assert.IsNull (inner2.ParamName, "#20");
-#else
- // Could not find a name for a resource. The resource
- // value was 'whatever'
- ArgumentException inner = ex.InnerException as ArgumentException;
- Assert.IsNotNull (inner, "#6");
- Assert.AreEqual (typeof (ArgumentException), inner.GetType (), "#7");
- Assert.IsNull (inner.InnerException, "#8");
- Assert.IsNotNull (inner.Message, "#9");
- Assert.IsTrue (inner.Message.IndexOf ("'whatever'") != -1, "#10");
- Assert.IsNull (inner.ParamName, "#11");
-#endif
}
}
}
@@ -1462,59 +1360,31 @@ namespace MonoTests.System.Resources {
break;
case "name5":
Assert.IsNotNull (enumerator.Value, "#E1");
-#if NET_2_0
Assert.AreEqual ("value5", enumerator.Value, "#E2");
-#else
- Assert.AreEqual ("test", enumerator.Value, "#E2");
-#endif
break;
case "name6":
Assert.IsNotNull (enumerator.Value, "#F1");
-#if NET_2_0
Assert.AreEqual ("test2", enumerator.Value, "#F2");
-#else
- Assert.AreEqual ("test1", enumerator.Value, "#F2");
-#endif
break;
case "name7":
Assert.IsNotNull (enumerator.Value, "#G1");
-#if NET_2_0
Assert.AreEqual (string.Empty, enumerator.Value, "#G2");
-#else
- Assert.AreEqual ("value7a", enumerator.Value, "#G2");
-#endif
break;
case "name8":
Assert.IsNotNull (enumerator.Value, "#H1");
-#if NET_2_0
Assert.AreEqual (string.Empty, enumerator.Value, "#H2");
-#else
- Assert.AreEqual ("value8", enumerator.Value, "#H2");
-#endif
break;
case "name9":
Assert.IsNotNull (enumerator.Value, "#I1");
-#if NET_2_0
Assert.AreEqual (string.Empty, enumerator.Value, "#I2");
-#else
- Assert.AreEqual ("value9a", enumerator.Value, "#I2");
-#endif
break;
case "name10":
Assert.IsNotNull (enumerator.Value, "#J1");
-#if NET_2_0
Assert.AreEqual (string.Empty, enumerator.Value, "#J2");
-#else
- Assert.AreEqual ("test", enumerator.Value, "#J2");
-#endif
break;
case "name11":
Assert.IsNotNull (enumerator.Value, "#K1");
-#if NET_2_0
Assert.AreEqual ("test2", enumerator.Value, "#K2");
-#else
- Assert.AreEqual ("test1", enumerator.Value, "#K2");
-#endif
break;
case "name12":
Assert.IsNotNull (enumerator.Value, "#L1");
@@ -1522,26 +1392,15 @@ namespace MonoTests.System.Resources {
break;
case "name13":
Assert.IsNotNull (enumerator.Value, "#M1");
-#if NET_2_0
Assert.AreEqual ("<value13>", enumerator.Value, "#M2");
-#else
- Assert.AreEqual ("test", enumerator.Value, "#M2");
-#endif
break;
case "name14":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#N1");
-#else
- Assert.IsNotNull (enumerator.Value, "#N1");
- Assert.AreEqual (string.Empty, enumerator.Value, "#N2");
-#endif
break;
-#if NET_2_0
case "name16":
Assert.IsNotNull (enumerator.Value, "#O1");
Assert.AreEqual ("value16", enumerator.Value, "#O2");
break;
-#endif
case "name17":
Assert.IsNotNull (enumerator.Value, "#P1");
Assert.AreEqual ("value17", enumerator.Value, "#P2");
@@ -1555,16 +1414,11 @@ namespace MonoTests.System.Resources {
break;
}
}
-#if NET_2_0
Assert.AreEqual (17, entries, "#Q");
-#else
- Assert.AreEqual (16, entries, "#Q");
-#endif
}
}
}
-#if NET_2_0
[Test]
public void UseResXDataNodes ()
{
@@ -1668,7 +1522,6 @@ namespace MonoTests.System.Resources {
Assert.IsFalse (enumerator.MoveNext (), "#B1");
}
}
-#endif
[Test]
public void TypeConversion ()
@@ -1764,56 +1617,26 @@ namespace MonoTests.System.Resources {
Assert.AreEqual (new byte [] { 5, 2, 7 }, enumerator.Value, "#C2");
break;
case "Data":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#D1");
-#else
- Assert.IsNotNull (enumerator.Value, "#D1");
- Assert.AreEqual ("Random Thoughts", enumerator.Value, "#D2");
-#endif
break;
case "Foo":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#E1");
-#else
- Assert.IsNotNull (enumerator.Value, "#E1");
- Assert.AreEqual ("A B C", enumerator.Value, "#E2");
-#endif
break;
case "Image":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#F1");
-#else
- Assert.IsNotNull (enumerator.Value, "#F1");
- Assert.AreEqual ("Summer.jpg", enumerator.Value, "#F2");
-#endif
break;
case "Text":
Assert.IsNotNull (enumerator.Value, "#G1");
Assert.AreEqual ("OK", enumerator.Value, "#G2");
break;
case "Unknown":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#H1");
-#else
- Assert.IsNotNull (enumerator.Value, "#H1");
- Assert.AreEqual ("MIA", enumerator.Value, "#H2");
-#endif
break;
case "Wrong":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#I1");
-#else
- Assert.IsNotNull (enumerator.Value, "#I1");
- Assert.AreEqual ("SuperUnknown", enumerator.Value, "#I2");
-#endif
break;
case "Xtra":
-#if NET_2_0
Assert.IsNull (enumerator.Value, "#J1");
-#else
- Assert.IsNotNull (enumerator.Value, "#J1");
- Assert.AreEqual ("LeftRight", enumerator.Value, "#J2");
-#endif
break;
default:
Assert.Fail ("#J:" + enumerator.Key);
@@ -2030,11 +1853,9 @@ namespace MonoTests.System.Resources {
" <resheader name=\"writer\">" +
" <value>System.Resources.ResXResourceWriter, {2}</value>" +
" </resheader>" +
-#if NET_2_0
" <metadata name=\"panel_label.Locked\" type=\"System.Boolean, {6}\">" +
" <value>True</value>" +
" </metadata>" +
-#endif
" <data name=\"foo\" type=\"System.Resources.ResXFileRef, {2}\">" +
" <value>{3};{4}{5}</value>" +
" </data>" +
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResourcesTestHelper.cs b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResourcesTestHelper.cs
index 138d2742566..aba3763c0a5 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResourcesTestHelper.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Resources/ResourcesTestHelper.cs
@@ -26,7 +26,6 @@
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#if NET_2_0
using System;
using System.Collections.Generic;
@@ -179,5 +178,4 @@ namespace MonoTests.System.Resources {
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/ArrangedElementCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/ArrangedElementCollectionTest.cs
index c7df70bcdc3..24bebc35c2c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/ArrangedElementCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/ArrangedElementCollectionTest.cs
@@ -23,7 +23,6 @@
// Rolf Bjarne Kvinge (RKvinge@novell.com)
//
-#if NET_2_0
using System;
using System.Collections;
@@ -53,4 +52,3 @@ namespace MonoTests.System.Windows.Forms.Layout
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverterTest.cs
index 853fe56e445..04e3c8fe11c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms.Layout/TableLayoutSettingsTypeConverterTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2006 Novell, Inc.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -716,4 +715,3 @@ namespace MonoTests.System.Windows.Forms.Layout {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ApplicationTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ApplicationTest.cs
index 78a082ded28..02f4db20f28 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ApplicationTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ApplicationTest.cs
@@ -90,7 +90,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test]
[ExpectedException (typeof (NotSupportedException))]
public void RestartNotSupportedExceptionTest ()
@@ -318,6 +317,5 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (false, IsInOpenForms (), "#Dispose-B");
}
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/AutoCompleteStringCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/AutoCompleteStringCollectionTest.cs
index ac38f5e6666..766aefc77db 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/AutoCompleteStringCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/AutoCompleteStringCollectionTest.cs
@@ -25,7 +25,6 @@
// Author:
// Daniel Nauck (dna(at)mono-project(dot)de)
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -204,4 +203,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingContextTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingContextTest.cs
index 7b59d71da5e..2d509fbeccc 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingContextTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingContextTest.cs
@@ -171,7 +171,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
Assert.AreEqual (0, d.Position, "INWM10");
}
-#if NET_2_0
[Test]
public void TestIndexerICurrencyManagerProvider ()
{
@@ -185,7 +184,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
Assert.AreEqual (false, bc.Contains (source), "A2");
Assert.AreEqual (0, ((ICollection)bc).Count, "A3");
}
-#endif
[Test]
[ExpectedException (typeof (ArgumentException))]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs
index 258bf9b6556..d299a90a857 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingManagerBaseTest.cs
@@ -56,10 +56,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
bm = c2.BindingContext[c1, "Text"];
bm2 = c2.BindingContext[c1];
-#if NET_2_0
bm.BindingComplete += delegate (object sender, BindingCompleteEventArgs e) { Console.WriteLine (Environment.StackTrace); };
bm2.BindingComplete += delegate (object sender, BindingCompleteEventArgs e) { Console.WriteLine (Environment.StackTrace); };
-#endif
binding = c2.DataBindings.Add ("Text", c1, "Text");
@@ -69,7 +67,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Assert.AreEqual (bm2.Bindings[0], binding, "3");
}
-#if NET_2_0
[Test]
public void IsBindingSuspendedTest ()
{
@@ -94,6 +91,5 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Assert.IsFalse (manager.IsBindingSuspended, "#C1");
Assert.IsFalse (manager2.IsBindingSuspended, "#C2");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingNavigatorTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingNavigatorTest.cs
index f9dbe56e02a..bdff5c67be2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingNavigatorTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingNavigatorTest.cs
@@ -23,7 +23,6 @@
// Olivier Dufour olivier.duff@free.fr
// Alan McGovern alan.mcgovern@gmail.com
//
-#if NET_2_0
using System;
using System.Collections.Generic;
@@ -264,4 +263,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingSourceTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingSourceTest.cs
index cb7d6cdb056..9b8612eb709 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingSourceTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingSourceTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.Data;
@@ -1996,4 +1995,3 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs
index 17e6cce2a2a..67510b7df5b 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingTest.cs
@@ -53,13 +53,11 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
Assert.AreSame (b.PropertyName, prop, "ctor5");
Assert.AreSame (b.DataSource, data_source, "ctor6");
-#if NET_2_0
Assert.AreEqual (false, b.FormattingEnabled, "ctor7");
Assert.AreEqual (String.Empty, b.FormatString, "ctor8");
Assert.IsNull (b.FormatInfo, "ctor9");
Assert.IsNull (b.NullValue, "ctor10");
Assert.AreEqual (Convert.DBNull, b.DataSourceNullValue, "ctor11");
-#endif
}
[Test]
@@ -137,11 +135,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
c.BindingContextChanged += new EventHandler (Event_Handler1);
eventcount = 0;
f.Show ();
-#if NET_2_0
Assert.AreEqual (1, eventcount, "A1");
-#else
- Assert.AreEqual (2, eventcount, "A1");
-#endif
f.Dispose();
}
@@ -181,11 +175,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
eventcount = 0;
f.Show ();
-#if NET_2_0
Assert.AreEqual (5, eventcount, "A1");
-#else
- Assert.AreEqual (8, eventcount, "A1");
-#endif
f.Dispose ();
}
@@ -446,7 +436,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
form.Dispose ();
}
-#if NET_2_0
[Test]
public void ReadValueTest ()
{
@@ -658,7 +647,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
Assert.AreEqual (String.Empty, binding.FormatString, "#A1");
}
-#endif
}
@@ -684,7 +672,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
}
}
-#if NET_2_0
class BindableToolStripItem : ToolStripItem, IBindableComponent
{
ControlBindingsCollection data_bindings;
@@ -709,7 +696,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
}
}
}
-#endif
class One
{
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingsCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingsCollectionTest.cs
index 4923ae03187..861ef1ef888 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingsCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/BindingsCollectionTest.cs
@@ -35,7 +35,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
[TestFixture]
public class BindingsCollectionTest : TestHelper
{
-#if NET_2_0
//
// CollectionChanging event test section
//
@@ -93,7 +92,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
binding_coll.Clear ();
Assert.IsTrue (collection_changing_called, "#C1");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonBaseTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonBaseTest.cs
index 4cac930776c..890363ed23c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonBaseTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonBaseTest.cs
@@ -30,7 +30,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (string.Empty, b.Text, "A13");
Assert.AreEqual (ContentAlignment.MiddleCenter, b.TextAlign, "A14");
-#if NET_2_0
Assert.IsFalse (b.AutoEllipsis, "A1");
Assert.IsFalse (b.AutoSize, "A2");
Assert.AreEqual (string.Empty, b.ImageKey, "A10");
@@ -39,7 +38,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (b.UseMnemonic, "A17");
Assert.IsTrue (b.UseVisualStyleBackColor, "A18");
Assert.AreEqual (AccessibleStates.None, b.AccessibilityObject.State, "A19");
-#endif
}
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonTest.cs
index daf156dea1e..2b6ba1eb5d1 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ButtonTest.cs
@@ -31,7 +31,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (string.Empty, b.Text, "A13");
Assert.AreEqual (ContentAlignment.MiddleCenter, b.TextAlign, "A14");
-#if NET_2_0
Assert.AreEqual (false, b.AutoEllipsis, "A1");
Assert.AreEqual (false, b.AutoSize, "A2");
Assert.AreEqual (string.Empty, b.ImageKey, "A10");
@@ -39,10 +38,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (true, b.UseCompatibleTextRendering, "A16");
Assert.AreEqual (true, b.UseMnemonic, "A17");
Assert.AreEqual (true, b.UseVisualStyleBackColor, "A18");
-#endif
}
-#if NET_2_0
[Test]
public void FlatButtonAppearanceTest ()
{
@@ -218,7 +215,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, b.ImageIndex, "D14");
Assert.AreEqual (string.Empty, b.ImageKey, "D15");
}
-#endif
[Test]
public void ImageTest ()
{
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CheckedListBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CheckedListBoxTest.cs
index f3bdbb13eba..4108cb33f10 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CheckedListBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CheckedListBoxTest.cs
@@ -290,7 +290,6 @@ namespace MonoTests.System.Windows.Forms
myform.Dispose ();
}
-#if NET_2_0
// Fails on 1.1 (both MS and Mono) because SelectedIndex is set
[Test]
public void Text_SelectionMode_None ()
@@ -355,7 +354,6 @@ namespace MonoTests.System.Windows.Forms
clb.SelectionMode = SelectionMode.One;
Assert.IsTrue (clb.allow_selection, "#2");
}
-#endif
[Test]
public void Text_SelectionMode_One ()
@@ -553,11 +551,9 @@ namespace MonoTests.System.Windows.Forms
public class MockCheckedListBox : CheckedListBox
{
-#if NET_2_0
public bool allow_selection {
get { return base.AllowSelection; }
}
-#endif
}
//--------------------------------------------------------------
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs
index 198dcda4270..4c2a4f191cf 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ClipboardTest.cs
@@ -36,7 +36,6 @@ namespace MonoTests.System.Windows.Forms
[TestFixture]
public class ClipboardTest
{
-#if NET_2_0
[Test]
public void UnicodeTextTest ()
{
@@ -179,7 +178,6 @@ public static class MainClass
File.Delete (exeName);
}
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnHeaderTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnHeaderTest.cs
index a3bc967890e..38f3eca265b 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnHeaderTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnHeaderTest.cs
@@ -33,14 +33,12 @@ namespace MonoTests.System.Windows.Forms
[TestFixture]
public class ColumnHeaderTest : TestHelper
{
-#if NET_2_0
[SetUp]
protected override void SetUp ()
{
columnReordered = 0;
base.SetUp ();
}
-#endif
[Test]
public void DefaultValuesTest ()
@@ -51,17 +49,14 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, col.Index, "2");
Assert.AreEqual ("ColumnHeader", col.Text, "3");
Assert.AreEqual (HorizontalAlignment.Left, col.TextAlign, "4");
-#if NET_2_0
Assert.AreEqual (-1, col.DisplayIndex, "5");
Assert.AreEqual (-1, col.ImageIndex, "6");
Assert.AreEqual (String.Empty, col.ImageKey, "7");
Assert.IsNull (col.ImageList, "8");
Assert.AreEqual (String.Empty, col.Name, "9");
Assert.IsNull (col.Tag, "10");
-#endif
}
-#if NET_2_0
[Test]
public void DisplayIndex_ListView_Created ()
{
@@ -280,7 +275,6 @@ namespace MonoTests.System.Windows.Forms
lv.Dispose ();
Assert.IsNull (col.ImageList);
}
-#endif
[Test]
public void Index_ListView_Disposed ()
@@ -296,7 +290,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, colB.Index, "#2");
}
-#if NET_2_0
[Test]
public void Name ()
{
@@ -318,7 +311,6 @@ namespace MonoTests.System.Windows.Forms
col.Tag = null;
Assert.IsNull (col.Tag, "#3");
}
-#endif
[Test]
public void Text_ListView_Disposed ()
@@ -350,12 +342,10 @@ namespace MonoTests.System.Windows.Forms
ListView lv = new ListView ();
lv.SmallImageList = new ImageList ();
ColumnHeader col = new ColumnHeader ();
-#if NET_2_0
col.DisplayIndex = 3;
col.ImageIndex = 2;
col.Name = "address_col";
col.Tag = DateTime.Now;
-#endif
col.Text = "Address";
col.TextAlign = HorizontalAlignment.Right;
col.Width = 30;
@@ -389,7 +379,6 @@ namespace MonoTests.System.Windows.Forms
col.Width = -2;
Assert.IsTrue (col.Width > 0, "#2");
-#if NET_2_0
bool eventRaised = false;
lv.ColumnWidthChanged += delegate (object sender, ColumnWidthChangedEventArgs e) {
Assert.AreEqual (e.ColumnIndex, 0, "#3");
@@ -397,7 +386,6 @@ namespace MonoTests.System.Windows.Forms
};
col.Width = 100;
Assert.IsTrue (eventRaised, "#4");
-#endif
}
[Test]
@@ -436,13 +424,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (true, col2.Width == lv.ClientRectangle.Width - col1.Width, "#B1");
}
-#if NET_2_0
public void ColumnReordered (object sender, ColumnReorderedEventArgs e)
{
columnReordered++;
}
private int columnReordered;
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnStyleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnStyleTest.cs
index dfbc9e9a724..b522b9147d7 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnStyleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ColumnStyleTest.cs
@@ -21,7 +21,6 @@
// (C) 2006 Novell, Inc.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -86,4 +85,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
index f7ccad8c399..86cb1ad38c9 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ComboBoxTest.cs
@@ -408,7 +408,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (0, mycmbbox.SelectionStart, "#15");
Assert.AreEqual (false, mycmbbox.Sorted, "#16");
Assert.AreEqual ("", mycmbbox.Text, "#17");
-#if NET_2_0
Assert.AreEqual (true, mycmbbox.AutoCompleteCustomSource != null, "#18");
Assert.AreEqual (AutoCompleteMode.None, mycmbbox.AutoCompleteMode, "#19");
Assert.AreEqual (AutoCompleteSource.None, mycmbbox.AutoCompleteSource, "#20");
@@ -424,7 +423,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("{Width=0, Height=0}", mycmbbox.MinimumSize.ToString (), "#27");
Assert.AreEqual ("{Left=0,Top=0,Right=0,Bottom=0}", mycmbbox.Padding.ToString (), "#28");
-#endif
}
[Test]
@@ -442,7 +440,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (h, cb.PreferredHeight, "A3");
}
-#if NET_2_0
[Test]
public void ResetTextTest ()
{
@@ -531,7 +528,6 @@ namespace MonoTests.System.Windows.Forms
cmbbox.Padding = new Padding (21);
Assert.AreEqual ("{Left=21,Top=21,Right=21,Bottom=21}", cmbbox.Padding.ToString (), "#01");
}
-#endif
[Test]
public void BeginEndUpdateTest ()
@@ -598,20 +594,7 @@ namespace MonoTests.System.Windows.Forms
ComboBox cmbbox = new ComboBox ();
cmbbox.Items.AddRange (new object [] { "BA", "BB" });
-#if NET_2_0
Assert.AreEqual (0, cmbbox.FindString ("b", 1));
-#else
- try {
- cmbbox.FindString ("b", 1);
- Assert.Fail ("#1");
- } catch (ArgumentOutOfRangeException ex) {
- Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- Assert.IsNotNull (ex.ParamName, "#5");
- Assert.AreEqual ("startIndex", ex.ParamName, "#6");
- }
-#endif
}
[Test]
@@ -698,20 +681,7 @@ namespace MonoTests.System.Windows.Forms
ComboBox cmbbox = new ComboBox ();
cmbbox.Items.AddRange (new object [] { "AB", "BA", "AB", "BA" });
-#if NET_2_0
Assert.AreEqual (1, cmbbox.FindStringExact ("BA", 3));
-#else
- try {
- cmbbox.FindString ("BA", 3);
- Assert.Fail ("#1");
- } catch (ArgumentOutOfRangeException ex) {
- Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- Assert.IsNotNull (ex.ParamName, "#5");
- Assert.AreEqual ("startIndex", ex.ParamName, "#6");
- }
-#endif
}
[Test]
@@ -792,7 +762,6 @@ namespace MonoTests.System.Windows.Forms
cmbbox.DropDownWidth = 0;
Assert.Fail ("#B1");
}
-#if NET_2_0
catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNotNull (ex.Message, "#B3");
@@ -800,14 +769,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("DropDownWidth", ex.ParamName, "#B5");
Assert.IsNull (ex.InnerException, "#B6");
}
-#else
- catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.Message, "#B3");
- Assert.IsNull (ex.ParamName, "#B4");
- Assert.IsNull (ex.InnerException, "#B5");
- }
-#endif
}
[Test]
@@ -822,7 +783,6 @@ namespace MonoTests.System.Windows.Forms
cmbbox.ItemHeight = 0;
Assert.Fail ("#B1");
}
-#if NET_2_0
catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNotNull (ex.Message, "#B3");
@@ -830,14 +790,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("ItemHeight", ex.ParamName, "#B5");
Assert.IsNull (ex.InnerException, "#B6");
}
-#else
- catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.Message, "#B3");
- Assert.IsNull (ex.ParamName, "#B4");
- Assert.IsNull (ex.InnerException, "#B5");
- }
-#endif
}
[Test]
@@ -1377,7 +1329,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (null, cb.SelectedItem, "A4");
}
-#if NET_2_0
[Test]
public void BehaviorAutoSize ()
{
@@ -1520,7 +1471,6 @@ namespace MonoTests.System.Windows.Forms
base.ScaleControl (factor, specified);
}
}
-#endif
private struct ComboVal
{
@@ -1636,9 +1586,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
Assert.IsNotNull (ex.ParamName, "#5");
-#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#6");
-#endif
}
}
@@ -1663,9 +1611,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
Assert.IsNotNull (ex.ParamName, "#5");
-#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#6");
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CommonDialogsTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CommonDialogsTest.cs
index 72d9ff3a035..082efdae1db 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CommonDialogsTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CommonDialogsTest.cs
@@ -286,7 +286,6 @@ Failures:
fbd.RootFolder = (Environment.SpecialFolder)12;
}
-#if NET_2_0
[Test]
public void CommonDialogPropertyTag ()
{
@@ -311,7 +310,6 @@ Failures:
throw new Exception ("The method or operation is not implemented.");
}
}
-#endif
}
}
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 688d51a8aad..51cf66cfba2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ContainerControlTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ContainerControlTest.cs
@@ -320,7 +320,6 @@ namespace MonoTests.System.Windows.Forms {
}
}
-#if NET_2_0
[Test]
[NUnit.Framework.Category ("NotWorking")] // Depends on fonts *AND* DPI, how useless is that? (Values are Vista/96DPI)
public void AutoScaling ()
@@ -448,6 +447,5 @@ namespace MonoTests.System.Windows.Forms {
Assert.AreEqual ("t;t1;t4;", validated, "A11b");
validating = string.Empty; validated = string.Empty;
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlBindingsCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlBindingsCollectionTest.cs
index 53e2078aaba..3e9f3fadd4e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlBindingsCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlBindingsCollectionTest.cs
@@ -45,7 +45,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
c2.DataBindings.Add ("Text", c1, "Text");
}
-#if NET_2_0
[Test]
public void CtorTest ()
{
@@ -77,7 +76,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding {
Assert.AreEqual (b3.DataSourceUpdateMode, DataSourceUpdateMode.Never, "#B3");
Assert.AreEqual (b4.DataSourceUpdateMode, DataSourceUpdateMode.Never, "#B4");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlCollectionTest.cs
index 81ad3e11c0b..5a52c72d5e2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlCollectionTest.cs
@@ -1,4 +1,3 @@
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -76,4 +75,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlHandleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlHandleTest.cs
index 8da096caa31..ad35b7eb22c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlHandleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlHandleTest.cs
@@ -65,16 +65,14 @@ namespace MonoTests.System.Windows.Forms
o = c.Anchor;
c.Anchor = AnchorStyles.Right;
Assert.IsFalse (c.IsHandleCreated, "A6");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.AutoScrollOffset;
c.AutoScrollOffset = new Point (40, 40);
Assert.IsFalse (c.IsHandleCreated, "A7");
#endif
-#if NET_2_0
o = c.AutoSize;
c.AutoSize = true;
Assert.IsFalse (c.IsHandleCreated, "A8");
-#endif
// B
o = c.BackColor;
@@ -83,11 +81,9 @@ namespace MonoTests.System.Windows.Forms
o = c.BackgroundImage;
c.BackgroundImage = new Bitmap (1, 1);
Assert.IsFalse (c.IsHandleCreated, "A10");
-#if NET_2_0
o = c.BackgroundImageLayout;
c.BackgroundImageLayout = ImageLayout.Stretch;
Assert.IsFalse (c.IsHandleCreated, "A11");
-#endif
o = c.BindingContext;
c.BindingContext = new BindingContext ();
Assert.IsFalse (c.IsHandleCreated, "A12");
@@ -124,11 +120,9 @@ namespace MonoTests.System.Windows.Forms
o = c.ContextMenu;
c.ContextMenu = new ContextMenu ();
Assert.IsFalse (c.IsHandleCreated, "A24");
-#if NET_2_0
o = c.ContextMenuStrip;
c.ContextMenuStrip = new ContextMenuStrip ();
Assert.IsFalse (c.IsHandleCreated, "A25");
-#endif
o = c.Controls;
Assert.IsFalse (c.IsHandleCreated, "A26");
o = c.Created;
@@ -180,14 +174,12 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A42");
o = c.IsDisposed;
Assert.IsFalse (c.IsHandleCreated, "A43");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.IsMirrored;
Assert.IsFalse (c.IsHandleCreated, "A44");
#endif
-#if NET_2_0
o = c.LayoutEngine;
Assert.IsFalse (c.IsHandleCreated, "A45");
-#endif
o = c.Left;
c.Left = 15;
Assert.IsFalse (c.IsHandleCreated, "A46");
@@ -196,7 +188,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A47");
// M - N
-#if NET_2_0
o = c.Margin;
c.Margin = new Padding (6);
Assert.IsFalse (c.IsHandleCreated, "A48");
@@ -206,24 +197,19 @@ namespace MonoTests.System.Windows.Forms
o = c.MinimumSize;
c.MinimumSize = new Size (100, 100);
Assert.IsFalse (c.IsHandleCreated, "A50");
-#endif
o = c.Name;
c.Name = "web";
Assert.IsFalse (c.IsHandleCreated, "A51");
// P - R
-#if NET_2_0
o = c.Padding;
c.Padding = new Padding (4);
Assert.IsFalse (c.IsHandleCreated, "A52");
-#endif
o = c.Parent;
c.Parent = new Control ();
Assert.IsFalse (c.IsHandleCreated, "A53");
-#if NET_2_0
o = c.PreferredSize;
Assert.IsFalse (c.IsHandleCreated, "A54");
-#endif
o = c.ProductName;
Assert.IsFalse (c.IsHandleCreated, "A55");
o = c.ProductVersion;
@@ -259,7 +245,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A66");
o = c.TopLevelControl;
Assert.IsFalse (c.IsHandleCreated, "A67");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.UseWaitCursor;
c.UseWaitCursor = true;
Assert.IsFalse (c.IsHandleCreated, "A68");
@@ -284,19 +270,16 @@ namespace MonoTests.System.Windows.Forms
ProtectedPropertyControl c = new ProtectedPropertyControl ();
object o;
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.PublicCanRaiseEvents;
Assert.IsFalse (c.IsHandleCreated, "A1");
#endif
o = c.PublicCreateParams;
Assert.IsFalse (c.IsHandleCreated, "A2");
-#if NET_2_0
o = c.PublicDefaultCursor;
Assert.IsFalse (c.IsHandleCreated, "A3");
-#endif
o = c.PublicDefaultImeMode;
Assert.IsFalse (c.IsHandleCreated, "A4");
-#if NET_2_0
o = c.PublicDefaultMargin;
Assert.IsFalse (c.IsHandleCreated, "A5");
o = c.PublicDefaultMaximumSize;
@@ -310,7 +293,6 @@ namespace MonoTests.System.Windows.Forms
o = c.PublicDoubleBuffered;
c.PublicDoubleBuffered = !c.PublicDoubleBuffered;
Assert.IsFalse (c.IsHandleCreated, "A10");
-#endif
o = c.PublicFontHeight;
c.PublicFontHeight = c.PublicFontHeight + 1;
Assert.IsFalse (c.IsHandleCreated, "A11");
@@ -319,7 +301,7 @@ namespace MonoTests.System.Windows.Forms
o = c.PublicResizeRedraw;
c.PublicResizeRedraw = !c.PublicResizeRedraw;
Assert.IsFalse (c.IsHandleCreated, "A13");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.PublicScaleChildren;
Assert.IsFalse (c.IsHandleCreated, "A14");
#endif
@@ -380,10 +362,8 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A11");
c.GetNextControl (new Control (), true);
Assert.IsFalse (c.IsHandleCreated, "A12");
-#if NET_2_0
c.GetPreferredSize (Size.Empty);
Assert.IsFalse (c.IsHandleCreated, "A13");
-#endif
c.Hide ();
Assert.IsFalse (c.IsHandleCreated, "A14");
c.Invalidate ();
@@ -428,10 +408,8 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A31");
c.ResumeLayout ();
Assert.IsFalse (c.IsHandleCreated, "A32");
-#if NET_2_0
c.Scale (new SizeF (1.5f, 1.5f));
Assert.IsFalse (c.IsHandleCreated, "A33");
-#endif
c.Select ();
Assert.IsFalse (c.IsHandleCreated, "A34");
c.SelectNextControl (new Control (), true, true, true, true);
@@ -470,26 +448,22 @@ namespace MonoTests.System.Windows.Forms
private class ProtectedPropertyControl : Control
{
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public bool PublicCanRaiseEvents { get { return base.CanRaiseEvents; } }
#endif
public CreateParams PublicCreateParams { get { return base.CreateParams; } }
-#if NET_2_0
public Cursor PublicDefaultCursor { get { return base.DefaultCursor; } }
-#endif
public ImeMode PublicDefaultImeMode { get { return base.DefaultImeMode; } }
-#if NET_2_0
public Padding PublicDefaultMargin { get { return base.DefaultMargin; } }
public Size PublicDefaultMaximumSize { get { return base.DefaultMaximumSize; } }
public Size PublicDefaultMinimumSize { get { return base.DefaultMinimumSize; } }
public Padding PublicDefaultPadding { get { return base.DefaultPadding; } }
public Size PublicDefaultSize { get { return base.DefaultSize; } }
public bool PublicDoubleBuffered { get { return base.DoubleBuffered; } set { base.DoubleBuffered = value; } }
-#endif
public int PublicFontHeight { get { return base.FontHeight; } set { base.FontHeight = value; } }
public bool PublicRenderRightToLeft { get { return base.RenderRightToLeft; } }
public bool PublicResizeRedraw { get { return base.ResizeRedraw; } set { base.ResizeRedraw = value; } }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public bool PublicScaleChildren { get { return base.ScaleChildren; } }
#endif
public bool PublicShowFocusCues { get { return base.ShowFocusCues; } }
@@ -507,11 +481,7 @@ namespace MonoTests.System.Windows.Forms
ProtectedMethodsControl c = new ProtectedMethodsControl ();
c.PublicAccessibilityNotifyClients (AccessibleEvents.Focus, 0);
-#if NET_2_0
Assert.IsFalse (c.IsHandleCreated, "A1");
-#else
- Assert.IsTrue (c.IsHandleCreated, "A1");
-#endif
c.PublicCreateAccessibilityInstance ();
Assert.IsTrue (c.IsHandleCreated, "A2");
c = new ProtectedMethodsControl ();
@@ -523,11 +493,9 @@ namespace MonoTests.System.Windows.Forms
c.PublicDestroyHandle ();
Assert.IsFalse (c.IsHandleCreated, "A5");
c = new ProtectedMethodsControl ();
-#if NET_2_0
c.PublicGetAccessibilityObjectById (0);
Assert.IsFalse (c.IsHandleCreated, "A6");
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
c.PublicGetAutoSizeMode ();
Assert.IsFalse (c.IsHandleCreated, "A7");
c.PublicGetScaledBounds (new Rectangle (0, 0, 100, 100), new SizeF (1.5f, 1.5f), BoundsSpecified.All);
@@ -581,7 +549,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A29");
c.PublicRtlTranslateLeftRight (LeftRightAlignment.Left);
Assert.IsFalse (c.IsHandleCreated, "A30");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
c.PublicScaleControl (new SizeF (1.5f, 1.5f), BoundsSpecified.All);
Assert.IsFalse (c.IsHandleCreated, "A31");
#endif
@@ -589,7 +557,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A32");
c.PublicSelect ();
Assert.IsFalse (c.IsHandleCreated, "A33");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
c.PublicSetAutoSizeMode (AutoSizeMode.GrowAndShrink);
Assert.IsFalse (c.IsHandleCreated, "A34");
#endif
@@ -604,10 +572,8 @@ namespace MonoTests.System.Windows.Forms
c = new ProtectedMethodsControl ();
c.PublicSetVisibleCore (true);
Assert.IsFalse (c.IsHandleCreated, "A39");
-#if NET_2_0
c.PublicSizeFromClientSize (new Size (160, 160));
Assert.IsFalse (c.IsHandleCreated, "A40");
-#endif
c.PublicUpdateBounds ();
Assert.IsFalse (c.IsHandleCreated, "A41");
c.PublicUpdateBounds (1, 2, 3, 4);
@@ -627,10 +593,8 @@ namespace MonoTests.System.Windows.Forms
public void PublicCreateControlsInstance () { base.CreateControlsInstance (); }
public void PublicCreateHandle () { base.CreateHandle (); }
public void PublicDestroyHandle () { base.DestroyHandle (); }
-#if NET_2_0
public AccessibleObject PublicGetAccessibilityObjectById (int objectId) { return base.GetAccessibilityObjectById (objectId); }
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public AutoSizeMode PublicGetAutoSizeMode () { return base.GetAutoSizeMode (); }
public Rectangle PublicGetScaledBounds (Rectangle bounds, SizeF factor, BoundsSpecified specified) { return base.GetScaledBounds (bounds, factor, specified); }
#endif
@@ -656,12 +620,12 @@ namespace MonoTests.System.Windows.Forms
public ContentAlignment PublicRtlTranslateContent (ContentAlignment align) { return base.RtlTranslateContent (align); }
public HorizontalAlignment PublicRtlTranslateHorizontal (HorizontalAlignment align) { return base.RtlTranslateHorizontal (align); }
public LeftRightAlignment PublicRtlTranslateLeftRight (LeftRightAlignment align) { return base.RtlTranslateLeftRight (align); }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public void PublicScaleControl (SizeF factor, BoundsSpecified specified) { base.ScaleControl (factor, specified); }
#endif
public void PublicScaleCore (float dx, float dy) { base.ScaleCore (dx, dy); }
public void PublicSelect () { base.Select (); }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public void PublicSetAutoSizeMode (AutoSizeMode mode) { base.SetAutoSizeMode (mode); }
#endif
public void PublicSetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified) { base.SetBoundsCore (x, y, width, height, specified); }
@@ -669,9 +633,7 @@ namespace MonoTests.System.Windows.Forms
public void PublicSetStyle (ControlStyles flag, bool value) { base.SetStyle (flag, value); }
public void PublicSetTopLevel (bool value) { base.SetTopLevel (value); }
public void PublicSetVisibleCore (bool value) { base.SetVisibleCore (value); }
-#if NET_2_0
public Size PublicSizeFromClientSize (Size clientSize) { return base.SizeFromClientSize (clientSize); }
-#endif
public void PublicUpdateBounds () { base.UpdateBounds (); }
public void PublicUpdateBounds (int x, int y, int width, int height) { base.UpdateBounds (x, y, width, height); }
public void PublicUpdateBounds (int x, int y, int width, int height, int clientWidth, int clientHeight) { base.UpdateBounds (x, y, width, height, clientWidth, clientHeight); }
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger.cs
index a139845d464..3d2a70df9ef 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger.cs
@@ -1,975 +1,3 @@
// Automatically generated for assembly: System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// To regenerate:
// mcs -r:System.Windows.Forms.dll LogGenerator.cs && mono LogGenerator.exe System.Windows.Forms.Control overrides ControlLogger.cs
-#if !NET_2_0
-
-#region ControlOverrideLogger
-using System;
-using System.Collections;
-using System.Drawing;
-using System.Windows.Forms;
-using System.ComponentModel;
-using System.Runtime.Remoting;
-#if NET_2_0
-using System.Windows.Forms.Layout;
-#endif
-using System.Text;
-
-namespace MonoTests.System.Windows.Forms
-{
- public class ControlOverrideLogger : Control
- {
- public StringBuilder Log = new StringBuilder ();
- void ShowLocation(string message)
- {
- Log.Append (message + Environment.NewLine);
- //Console.WriteLine(DateTime.Now.ToLongTimeString() + " Control." + message);
- }
-
- protected override void Dispose(Boolean disposing )
- {
- ShowLocation (string.Format("Dispose (disposing=<{0}>) ", disposing));
- base.Dispose(disposing);;
- }
-
-
- public override Boolean PreProcessMessage(ref Message msg )
- {
- ShowLocation (string.Format("PreProcessMessage (msg=<{0}>) ", msg));
- return base.PreProcessMessage(ref msg);;
- }
-
-
- public override void Refresh()
- {
- ShowLocation (string.Format("Refresh () "));
- base.Refresh();;
- }
-
-
- public override void ResetBackColor()
- {
- ShowLocation (string.Format("ResetBackColor () "));
- base.ResetBackColor();;
- }
-
-
- public override void ResetCursor()
- {
- ShowLocation (string.Format("ResetCursor () "));
- base.ResetCursor();;
- }
-
-
- public override void ResetFont()
- {
- ShowLocation (string.Format("ResetFont () "));
- base.ResetFont();;
- }
-
-
- public override void ResetForeColor()
- {
- ShowLocation (string.Format("ResetForeColor () "));
- base.ResetForeColor();;
- }
-
-
- public override void ResetRightToLeft()
- {
- ShowLocation (string.Format("ResetRightToLeft () "));
- base.ResetRightToLeft();;
- }
-
-
- public override void ResetText()
- {
- ShowLocation (string.Format("ResetText () "));
- base.ResetText();;
- }
-
-
- protected override AccessibleObject CreateAccessibilityInstance()
- {
- ShowLocation (string.Format("CreateAccessibilityInstance () "));
- return base.CreateAccessibilityInstance();;
- }
-
-
- protected override ControlCollection CreateControlsInstance()
- {
- ShowLocation (string.Format("CreateControlsInstance () "));
- return base.CreateControlsInstance();;
- }
-
-
- protected override void CreateHandle()
- {
- ShowLocation (string.Format("CreateHandle () "));
- base.CreateHandle();;
- }
-
-
- protected override void DefWndProc(ref Message m )
- {
- ShowLocation (string.Format("DefWndProc (m=<{0}>) ", m));
- base.DefWndProc(ref m);;
- }
-
-
- protected override void DestroyHandle()
- {
- ShowLocation (string.Format("DestroyHandle () "));
- base.DestroyHandle();;
- }
-
-
- protected override void InitLayout()
- {
- ShowLocation (string.Format("InitLayout () "));
- base.InitLayout();;
- }
-
-
- protected override Boolean IsInputChar(Char charCode )
- {
- ShowLocation (string.Format("IsInputChar (charCode=<{0}>) ", charCode));
- return base.IsInputChar(charCode);;
- }
-
-
- protected override Boolean IsInputKey(Keys keyData )
- {
- ShowLocation (string.Format("IsInputKey (keyData=<{0}>) ", keyData));
- return base.IsInputKey(keyData);;
- }
-
-
- protected override void NotifyInvalidate(Rectangle invalidatedArea )
- {
- ShowLocation (string.Format("NotifyInvalidate (invalidatedArea=<{0}>) ", invalidatedArea));
- base.NotifyInvalidate(invalidatedArea);;
- }
-
-
- protected override Boolean ProcessCmdKey(ref Message msg , Keys keyData )
- {
- ShowLocation (string.Format("ProcessCmdKey (msg=<{0}>, keyData=<{1}>) ", msg, keyData));
- return base.ProcessCmdKey(ref msg, keyData);;
- }
-
-
- protected override Boolean ProcessDialogChar(Char charCode )
- {
- ShowLocation (string.Format("ProcessDialogChar (charCode=<{0}>) ", charCode));
- return base.ProcessDialogChar(charCode);;
- }
-
-
- protected override Boolean ProcessDialogKey(Keys keyData )
- {
- ShowLocation (string.Format("ProcessDialogKey (keyData=<{0}>) ", keyData));
- return base.ProcessDialogKey(keyData);;
- }
-
-
- protected override Boolean ProcessKeyEventArgs(ref Message msg )
- {
- ShowLocation (string.Format("ProcessKeyEventArgs (msg=<{0}>) ", msg));
- return base.ProcessKeyEventArgs(ref msg);;
- }
-
-
- protected override Boolean ProcessKeyMessage(ref Message msg )
- {
- ShowLocation (string.Format("ProcessKeyMessage (msg=<{0}>) ", msg));
- return base.ProcessKeyMessage(ref msg);;
- }
-
-
- protected override Boolean ProcessKeyPreview(ref Message msg )
- {
- ShowLocation (string.Format("ProcessKeyPreview (msg=<{0}>) ", msg));
- return base.ProcessKeyPreview(ref msg);;
- }
-
-
- protected override Boolean ProcessMnemonic(Char charCode )
- {
- ShowLocation (string.Format("ProcessMnemonic (charCode=<{0}>) ", charCode));
- return base.ProcessMnemonic(charCode);;
- }
-
-
- protected override void ScaleCore(Single dx , Single dy )
- {
- ShowLocation (string.Format("ScaleCore (dx=<{0}>, dy=<{1}>) ", dx, dy));
- base.ScaleCore(dx, dy);;
- }
-
-
- protected override void Select(Boolean directed , Boolean forward )
- {
- ShowLocation (string.Format("Select (directed=<{0}>, forward=<{1}>) ", directed, forward));
- base.Select(directed, forward);;
- }
-
-
- protected override void SetBoundsCore(Int32 x , Int32 y , Int32 width , Int32 height , BoundsSpecified specified )
- {
- ShowLocation (string.Format("SetBoundsCore (x=<{0}>, y=<{1}>, width=<{2}>, height=<{3}>, specified=<{4}>) ", x, y, width, height, specified));
- base.SetBoundsCore(x, y, width, height, specified);;
- }
-
-
- protected override void SetClientSizeCore(Int32 x , Int32 y )
- {
- ShowLocation (string.Format("SetClientSizeCore (x=<{0}>, y=<{1}>) ", x, y));
- base.SetClientSizeCore(x, y);;
- }
-
-
- protected override void SetVisibleCore(Boolean value )
- {
- ShowLocation (string.Format("SetVisibleCore (value=<{0}>) ", value));
- base.SetVisibleCore(value);;
- }
-
-
- protected override void WndProc(ref Message m )
- {
- ShowLocation (string.Format("WndProc (m=<{0}>) ", m));
- base.WndProc(ref m);;
- }
-
-
- protected override void OnBackColorChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnBackColorChanged (e=<{0}>) ", e));
- base.OnBackColorChanged(e);;
- }
-
-
- protected override void OnBackgroundImageChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnBackgroundImageChanged (e=<{0}>) ", e));
- base.OnBackgroundImageChanged(e);;
- }
-
-
- protected override void OnBindingContextChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnBindingContextChanged (e=<{0}>) ", e));
- base.OnBindingContextChanged(e);;
- }
-
-
- protected override void OnCausesValidationChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnCausesValidationChanged (e=<{0}>) ", e));
- base.OnCausesValidationChanged(e);;
- }
-
-
- protected override void OnChangeUICues(UICuesEventArgs e )
- {
- ShowLocation (string.Format("OnChangeUICues (e=<{0}>) ", e));
- base.OnChangeUICues(e);;
- }
-
-
- protected override void OnClick(EventArgs e )
- {
- ShowLocation (string.Format("OnClick (e=<{0}>) ", e));
- base.OnClick(e);;
- }
-
-
- protected override void OnContextMenuChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnContextMenuChanged (e=<{0}>) ", e));
- base.OnContextMenuChanged(e);;
- }
-
-
- protected override void OnControlAdded(ControlEventArgs e )
- {
- ShowLocation (string.Format("OnControlAdded (e=<{0}>) ", e));
- base.OnControlAdded(e);;
- }
-
-
- protected override void OnControlRemoved(ControlEventArgs e )
- {
- ShowLocation (string.Format("OnControlRemoved (e=<{0}>) ", e));
- base.OnControlRemoved(e);;
- }
-
-
- protected override void OnCreateControl()
- {
- ShowLocation (string.Format("OnCreateControl () "));
- base.OnCreateControl();;
- }
-
-
- protected override void OnCursorChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnCursorChanged (e=<{0}>) ", e));
- base.OnCursorChanged(e);;
- }
-
-
- protected override void OnDockChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnDockChanged (e=<{0}>) ", e));
- base.OnDockChanged(e);;
- }
-
-
- protected override void OnDoubleClick(EventArgs e )
- {
- ShowLocation (string.Format("OnDoubleClick (e=<{0}>) ", e));
- base.OnDoubleClick(e);;
- }
-
-
- protected override void OnDragDrop(DragEventArgs drgevent )
- {
- ShowLocation (string.Format("OnDragDrop (drgevent=<{0}>) ", drgevent));
- base.OnDragDrop(drgevent);;
- }
-
-
- protected override void OnDragEnter(DragEventArgs drgevent )
- {
- ShowLocation (string.Format("OnDragEnter (drgevent=<{0}>) ", drgevent));
- base.OnDragEnter(drgevent);;
- }
-
-
- protected override void OnDragLeave(EventArgs e )
- {
- ShowLocation (string.Format("OnDragLeave (e=<{0}>) ", e));
- base.OnDragLeave(e);;
- }
-
-
- protected override void OnDragOver(DragEventArgs drgevent )
- {
- ShowLocation (string.Format("OnDragOver (drgevent=<{0}>) ", drgevent));
- base.OnDragOver(drgevent);;
- }
-
-
- protected override void OnEnabledChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnEnabledChanged (e=<{0}>) ", e));
- base.OnEnabledChanged(e);;
- }
-
-
- protected override void OnEnter(EventArgs e )
- {
- ShowLocation (string.Format("OnEnter (e=<{0}>) ", e));
- base.OnEnter(e);;
- }
-
-
- protected override void OnFontChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnFontChanged (e=<{0}>) ", e));
- base.OnFontChanged(e);;
- }
-
-
- protected override void OnForeColorChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnForeColorChanged (e=<{0}>) ", e));
- base.OnForeColorChanged(e);;
- }
-
-
- protected override void OnGiveFeedback(GiveFeedbackEventArgs gfbevent )
- {
- ShowLocation (string.Format("OnGiveFeedback (gfbevent=<{0}>) ", gfbevent));
- base.OnGiveFeedback(gfbevent);;
- }
-
-
- protected override void OnGotFocus(EventArgs e )
- {
- ShowLocation (string.Format("OnGotFocus (e=<{0}>) ", e));
- base.OnGotFocus(e);;
- }
-
-
- protected override void OnHandleCreated(EventArgs e )
- {
- ShowLocation (string.Format("OnHandleCreated (e=<{0}>) ", e));
- base.OnHandleCreated(e);;
- }
-
-
- protected override void OnHandleDestroyed(EventArgs e )
- {
- ShowLocation (string.Format("OnHandleDestroyed (e=<{0}>) ", e));
- base.OnHandleDestroyed(e);;
- }
-
-
- protected override void OnHelpRequested(HelpEventArgs hevent )
- {
- ShowLocation (string.Format("OnHelpRequested (hevent=<{0}>) ", hevent));
- base.OnHelpRequested(hevent);;
- }
-
-
- protected override void OnImeModeChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnImeModeChanged (e=<{0}>) ", e));
- base.OnImeModeChanged(e);;
- }
-
-
- protected override void OnInvalidated(InvalidateEventArgs e )
- {
- ShowLocation (string.Format("OnInvalidated (e=<{0}>) ", e));
- base.OnInvalidated(e);;
- }
-
-
- protected override void OnKeyDown(KeyEventArgs e )
- {
- ShowLocation (string.Format("OnKeyDown (e=<{0}>) ", e));
- base.OnKeyDown(e);;
- }
-
-
- protected override void OnKeyPress(KeyPressEventArgs e )
- {
- ShowLocation (string.Format("OnKeyPress (e=<{0}>) ", e));
- base.OnKeyPress(e);;
- }
-
-
- protected override void OnKeyUp(KeyEventArgs e )
- {
- ShowLocation (string.Format("OnKeyUp (e=<{0}>) ", e));
- base.OnKeyUp(e);;
- }
-
-
- protected override void OnLayout(LayoutEventArgs levent )
- {
- ShowLocation (string.Format("OnLayout (levent=<{0}>) ", levent));
- base.OnLayout(levent);;
- }
-
-
- protected override void OnLeave(EventArgs e )
- {
- ShowLocation (string.Format("OnLeave (e=<{0}>) ", e));
- base.OnLeave(e);;
- }
-
-
- protected override void OnLocationChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnLocationChanged (e=<{0}>) ", e));
- base.OnLocationChanged(e);;
- }
-
-
- protected override void OnLostFocus(EventArgs e )
- {
- ShowLocation (string.Format("OnLostFocus (e=<{0}>) ", e));
- base.OnLostFocus(e);;
- }
-
-
- protected override void OnMouseDown(MouseEventArgs e )
- {
- ShowLocation (string.Format("OnMouseDown (e=<{0}>) ", e));
- base.OnMouseDown(e);;
- }
-
-
- protected override void OnMouseEnter(EventArgs e )
- {
- ShowLocation (string.Format("OnMouseEnter (e=<{0}>) ", e));
- base.OnMouseEnter(e);;
- }
-
-
- protected override void OnMouseHover(EventArgs e )
- {
- ShowLocation (string.Format("OnMouseHover (e=<{0}>) ", e));
- base.OnMouseHover(e);;
- }
-
-
- protected override void OnMouseLeave(EventArgs e )
- {
- ShowLocation (string.Format("OnMouseLeave (e=<{0}>) ", e));
- base.OnMouseLeave(e);;
- }
-
-
- protected override void OnMouseMove(MouseEventArgs e )
- {
- ShowLocation (string.Format("OnMouseMove (e=<{0}>) ", e));
- base.OnMouseMove(e);;
- }
-
-
- protected override void OnMouseUp(MouseEventArgs e )
- {
- ShowLocation (string.Format("OnMouseUp (e=<{0}>) ", e));
- base.OnMouseUp(e);;
- }
-
-
- protected override void OnMouseWheel(MouseEventArgs e )
- {
- ShowLocation (string.Format("OnMouseWheel (e=<{0}>) ", e));
- base.OnMouseWheel(e);;
- }
-
-
- protected override void OnMove(EventArgs e )
- {
- ShowLocation (string.Format("OnMove (e=<{0}>) ", e));
- base.OnMove(e);;
- }
-
-
- protected override void OnNotifyMessage(Message m )
- {
- ShowLocation (string.Format("OnNotifyMessage (m=<{0}>) ", m));
- base.OnNotifyMessage(m);;
- }
-
-
- protected override void OnPaint(PaintEventArgs e )
- {
- ShowLocation (string.Format("OnPaint (e=<{0}>) ", e));
- base.OnPaint(e);;
- }
-
-
- protected override void OnPaintBackground(PaintEventArgs pevent )
- {
- ShowLocation (string.Format("OnPaintBackground (pevent=<{0}>) ", pevent));
- base.OnPaintBackground(pevent);;
- }
-
-
- protected override void OnParentBackColorChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentBackColorChanged (e=<{0}>) ", e));
- base.OnParentBackColorChanged(e);;
- }
-
-
- protected override void OnParentBackgroundImageChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentBackgroundImageChanged (e=<{0}>) ", e));
- base.OnParentBackgroundImageChanged(e);;
- }
-
-
- protected override void OnParentBindingContextChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentBindingContextChanged (e=<{0}>) ", e));
- base.OnParentBindingContextChanged(e);;
- }
-
-
- protected override void OnParentChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentChanged (e=<{0}>) ", e));
- base.OnParentChanged(e);;
- }
-
-
- protected override void OnParentEnabledChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentEnabledChanged (e=<{0}>) ", e));
- base.OnParentEnabledChanged(e);;
- }
-
-
- protected override void OnParentFontChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentFontChanged (e=<{0}>) ", e));
- base.OnParentFontChanged(e);;
- }
-
-
- protected override void OnParentForeColorChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentForeColorChanged (e=<{0}>) ", e));
- base.OnParentForeColorChanged(e);;
- }
-
-
- protected override void OnParentRightToLeftChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentRightToLeftChanged (e=<{0}>) ", e));
- base.OnParentRightToLeftChanged(e);;
- }
-
-
- protected override void OnParentVisibleChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnParentVisibleChanged (e=<{0}>) ", e));
- base.OnParentVisibleChanged(e);;
- }
-
-
- protected override void OnQueryContinueDrag(QueryContinueDragEventArgs e )
- {
- ShowLocation (string.Format("OnQueryContinueDrag (e=<{0}>) ", e));
- base.OnQueryContinueDrag(e);;
- }
-
-
- protected override void OnResize(EventArgs e )
- {
- ShowLocation (string.Format("OnResize (e=<{0}>) ", e));
- base.OnResize(e);;
- }
-
-
- protected override void OnRightToLeftChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnRightToLeftChanged (e=<{0}>) ", e));
- base.OnRightToLeftChanged(e);;
- }
-
-
- protected override void OnSizeChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnSizeChanged (e=<{0}>) ", e));
- base.OnSizeChanged(e);;
- }
-
-
- protected override void OnStyleChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnStyleChanged (e=<{0}>) ", e));
- base.OnStyleChanged(e);;
- }
-
-
- protected override void OnSystemColorsChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnSystemColorsChanged (e=<{0}>) ", e));
- base.OnSystemColorsChanged(e);;
- }
-
-
- protected override void OnTabIndexChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnTabIndexChanged (e=<{0}>) ", e));
- base.OnTabIndexChanged(e);;
- }
-
-
- protected override void OnTabStopChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnTabStopChanged (e=<{0}>) ", e));
- base.OnTabStopChanged(e);;
- }
-
-
- protected override void OnTextChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnTextChanged (e=<{0}>) ", e));
- base.OnTextChanged(e);;
- }
-
-
- protected override void OnValidated(EventArgs e )
- {
- ShowLocation (string.Format("OnValidated (e=<{0}>) ", e));
- base.OnValidated(e);;
- }
-
-
- protected override void OnValidating(CancelEventArgs e )
- {
- ShowLocation (string.Format("OnValidating (e=<{0}>) ", e));
- base.OnValidating(e);;
- }
-
-
- protected override void OnVisibleChanged(EventArgs e )
- {
- ShowLocation (string.Format("OnVisibleChanged (e=<{0}>) ", e));
- base.OnVisibleChanged(e);;
- }
-
-
- protected override Object GetService(Type service )
- {
- ShowLocation (string.Format("GetService (service=<{0}>) ", service));
- return base.GetService(service);;
- }
-
-
- public override String ToString()
- {
- ShowLocation (string.Format("ToString () "));
- return base.ToString();;
- }
-
-
- public override ObjRef CreateObjRef(Type type )
- {
- ShowLocation (string.Format("CreateObjRef (type=<{0}>) ", type));
- return base.CreateObjRef(type);;
- }
-
-
- public override Object InitializeLifetimeService()
- {
- ShowLocation (string.Format("InitializeLifetimeService () "));
- return base.InitializeLifetimeService();;
- }
-
-
- public override Boolean Equals(Object o )
- {
- ShowLocation (string.Format("Equals (o=<{0}>) ", o));
- return base.Equals(o);;
- }
-
-
- public override Int32 GetHashCode()
- {
- ShowLocation (string.Format("GetHashCode () "));
- return base.GetHashCode();;
- }
-
-
- public override Boolean AllowDrop
- {
- get {
- ShowLocation (string.Format("get_AllowDrop () "));
- return base.AllowDrop;
- }
-
- set {
- ShowLocation (string.Format("get_AllowDrop () "));
- base.AllowDrop = value;
- }
-}
-
-
-
- public override AnchorStyles Anchor
- {
- get {
- ShowLocation (string.Format("get_Anchor () "));
- return base.Anchor;
- }
-
- set {
- ShowLocation (string.Format("get_Anchor () "));
- base.Anchor = value;
- }
-}
-
-
-
- public override Color BackColor
- {
- get {
- ShowLocation (string.Format("get_BackColor () "));
- return base.BackColor;
- }
-
- set {
- ShowLocation (string.Format("get_BackColor () "));
- base.BackColor = value;
- }
-}
-
-
-
- public override Image BackgroundImage
- {
- get {
- ShowLocation (string.Format("get_BackgroundImage () "));
- return base.BackgroundImage;
- }
-
- set {
- ShowLocation (string.Format("get_BackgroundImage () "));
- base.BackgroundImage = value;
- }
-}
-
-
-
- public override BindingContext BindingContext
- {
- get {
- ShowLocation (string.Format("get_BindingContext () "));
- return base.BindingContext;
- }
-
- set {
- ShowLocation (string.Format("get_BindingContext () "));
- base.BindingContext = value;
- }
-}
-
-
-
- public override ContextMenu ContextMenu
- {
- get {
- ShowLocation (string.Format("get_ContextMenu () "));
- return base.ContextMenu;
- }
-
- set {
- ShowLocation (string.Format("get_ContextMenu () "));
- base.ContextMenu = value;
- }
-}
-
-
-
- public override Cursor Cursor
- {
- get {
- ShowLocation (string.Format("get_Cursor () "));
- return base.Cursor;
- }
-
- set {
- ShowLocation (string.Format("get_Cursor () "));
- base.Cursor = value;
- }
-}
-
-
-
- public override Rectangle DisplayRectangle
- {
- get {
- ShowLocation (string.Format("get_DisplayRectangle () "));
- return base.DisplayRectangle;
- }
-}
-
-
-
- public override DockStyle Dock
- {
- get {
- ShowLocation (string.Format("get_Dock () "));
- return base.Dock;
- }
-
- set {
- ShowLocation (string.Format("get_Dock () "));
- base.Dock = value;
- }
-}
-
-
-
- public override Boolean Focused
- {
- get {
- ShowLocation (string.Format("get_Focused () "));
- return base.Focused;
- }
-}
-
-
-
- public override Font Font
- {
- get {
- ShowLocation (string.Format("get_Font () "));
- return base.Font;
- }
-
- set {
- ShowLocation (string.Format("get_Font () "));
- base.Font = value;
- }
-}
-
-
-
- public override Color ForeColor
- {
- get {
- ShowLocation (string.Format("get_ForeColor () "));
- return base.ForeColor;
- }
-
- set {
- ShowLocation (string.Format("get_ForeColor () "));
- base.ForeColor = value;
- }
-}
-
-
-
- public override RightToLeft RightToLeft
- {
- get {
- ShowLocation (string.Format("get_RightToLeft () "));
- return base.RightToLeft;
- }
-
- set {
- ShowLocation (string.Format("get_RightToLeft () "));
- base.RightToLeft = value;
- }
-}
-
-
-
- public override ISite Site
- {
- get {
- ShowLocation (string.Format("get_Site () "));
- return base.Site;
- }
-
- set {
- ShowLocation (string.Format("get_Site () "));
- base.Site = value;
- }
-}
-
-
-
- public override String Text
- {
- get {
- ShowLocation (string.Format("get_Text () "));
- return base.Text;
- }
-
- set {
- ShowLocation (string.Format("get_Text () "));
- base.Text = value;
- }
-}
-
-
-
- }
-#endregion
-}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger2.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger2.cs
index 6ad67888ee6..d4bdf37b0c1 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger2.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlLogger2.cs
@@ -1,7 +1,6 @@
// Automatically generated for assembly: System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// To regenerate:
// gmcs -r:System.Windows.Forms.dll LogGenerator.cs && mono LogGenerator.exe System.Windows.Forms.Control overrides ControlLogger2.cs
-#if NET_2_0
#region ControlOverrideLogger
using System;
@@ -1146,4 +1145,3 @@ namespace MonoTests.System.Windows.Forms
}
#endregion
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlPropertyEventsTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlPropertyEventsTest.cs
index 7b85dda9708..57a174b6f5e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlPropertyEventsTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlPropertyEventsTest.cs
@@ -1,4 +1,3 @@
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -669,4 +668,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs
index 8d7cb8e142c..65627561516 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlStyleTest.cs
@@ -85,10 +85,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(Control_want, GetStyles(new Control()), "ControlStyles");
@@ -113,13 +111,9 @@ namespace MonoTests.System.Windows.Forms {
"AllPaintingInWmPaint=True",
"CacheText=True",
"EnableNotifyMessage=False",
-#if NET_2_0
"DoubleBuffer=False",
"OptimizedDoubleBuffer=True",
"UseTextForAccessibility=True"
-#else
- "DoubleBuffer=True"
-#endif
};
Assert.AreEqual(Button_want, GetStyles(new Button()), "ButtonStyles");
@@ -143,13 +137,9 @@ namespace MonoTests.System.Windows.Forms {
"AllPaintingInWmPaint=True",
"CacheText=True",
"EnableNotifyMessage=False",
-#if NET_2_0
"DoubleBuffer=False",
"OptimizedDoubleBuffer=True",
"UseTextForAccessibility=True"
-#else
- "DoubleBuffer=True"
-#endif
};
Assert.AreEqual(CheckBox_want, GetStyles(new CheckBox()), "CheckBoxStyles");
@@ -173,13 +163,9 @@ namespace MonoTests.System.Windows.Forms {
"AllPaintingInWmPaint=True",
"CacheText=True",
"EnableNotifyMessage=False",
-#if NET_2_0
"DoubleBuffer=False",
"OptimizedDoubleBuffer=True",
"UseTextForAccessibility=True"
-#else
- "DoubleBuffer=True"
-#endif
};
Assert.AreEqual(RadioButton_want, GetStyles(new RadioButton()), "RadioButtonStyles");
@@ -204,10 +190,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(DataGrid_want, GetStyles(new DataGrid()), "DataGridStyles");
@@ -232,10 +216,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(DateTimePicker_want, GetStyles(new DateTimePicker()), "DateTimePickerStyles");
@@ -260,10 +242,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(GroupBox_want, GetStyles(new GroupBox()), "GroupBoxStyles");
@@ -287,13 +267,9 @@ namespace MonoTests.System.Windows.Forms {
"AllPaintingInWmPaint=True",
"CacheText=False",
"EnableNotifyMessage=False",
-#if NET_2_0
"DoubleBuffer=False",
"OptimizedDoubleBuffer=True",
"UseTextForAccessibility=True"
-#else
- "DoubleBuffer=True"
-#endif
};
Assert.AreEqual(Label_want, GetStyles(new Label()), "LabelStyles");
@@ -317,13 +293,9 @@ namespace MonoTests.System.Windows.Forms {
"AllPaintingInWmPaint=True",
"CacheText=False",
"EnableNotifyMessage=False",
-#if NET_2_0
"DoubleBuffer=False",
"OptimizedDoubleBuffer=True",
"UseTextForAccessibility=True"
-#else
- "DoubleBuffer=True"
-#endif
};
string[] LinkLabel_link_want = {
@@ -341,13 +313,9 @@ namespace MonoTests.System.Windows.Forms {
"AllPaintingInWmPaint=True",
"CacheText=False",
"EnableNotifyMessage=False",
-#if NET_2_0
"DoubleBuffer=False",
"OptimizedDoubleBuffer=True",
"UseTextForAccessibility=True"
-#else
- "DoubleBuffer=True"
-#endif
};
LinkLabel link = new LinkLabel ();
@@ -384,10 +352,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(ComboBox_want, GetStyles(new ComboBox()), "ComboBoxStyles");
@@ -412,10 +378,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(ListBox_want, GetStyles(new ListBox()), "ListBoxStyles");
@@ -440,10 +404,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(CheckedListBox_want, GetStyles(new CheckedListBox()), "CheckedListBoxStyles");
@@ -468,10 +430,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(ListView_want, GetStyles(new ListView()), "ListViewStyles");
@@ -496,10 +456,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(MdiClient_want, GetStyles(new MdiClient()), "MdiClientStyles");
@@ -524,10 +482,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(MonthCalendar_want, GetStyles(new MonthCalendar()), "MonthCalendarStyles");
@@ -551,13 +507,9 @@ namespace MonoTests.System.Windows.Forms {
"AllPaintingInWmPaint=True",
"CacheText=False",
"EnableNotifyMessage=False",
-#if NET_2_0
"DoubleBuffer=False",
"OptimizedDoubleBuffer=True",
"UseTextForAccessibility=True"
-#else
- "DoubleBuffer=True"
-#endif
};
Assert.AreEqual(PictureBox_want, GetStyles(new PictureBox()), "PictureBoxStyles");
@@ -582,10 +534,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(ProgressBar_want, GetStyles(new ProgressBar()), "ProgressBarStyles");
@@ -610,10 +560,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(ScrollableControl_want, GetStyles(new ScrollableControl()), "ScrollableControlStyles");
@@ -638,10 +586,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(ContainerControl_want, GetStyles(new ContainerControl()), "ContainerControlStyles");
@@ -666,10 +612,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Form f = new Form ();
@@ -697,10 +641,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(PropertyGrid_want, GetStyles(new PropertyGrid()), "PropertyGridStyles");
@@ -712,20 +654,11 @@ namespace MonoTests.System.Windows.Forms {
string[] DomainUpDown_want = {
"ContainerControl=True",
"UserPaint=True",
-#if NET_2_0
"Opaque=True",
"ResizeRedraw=True",
-#else
- "Opaque=False",
- "ResizeRedraw=False",
-#endif
"FixedWidth=False",
"FixedHeight=True",
-#if NET_2_0
"StandardClick=False",
-#else
- "StandardClick=True",
-#endif
"Selectable=True",
"UserMouse=False",
"SupportsTransparentBackColor=False",
@@ -734,10 +667,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(DomainUpDown_want, GetStyles(new DomainUpDown()), "DomainUpDownStyles");
@@ -749,20 +680,11 @@ namespace MonoTests.System.Windows.Forms {
string[] NumericUpDown_want = {
"ContainerControl=True",
"UserPaint=True",
-#if NET_2_0
"Opaque=True",
"ResizeRedraw=True",
-#else
- "Opaque=False",
- "ResizeRedraw=False",
-#endif
"FixedWidth=False",
"FixedHeight=True",
-#if NET_2_0
"StandardClick=False",
-#else
- "StandardClick=True",
-#endif
"Selectable=True",
"UserMouse=False",
"SupportsTransparentBackColor=False",
@@ -771,10 +693,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(NumericUpDown_want, GetStyles(new NumericUpDown()), "NumericUpDownStyles");
@@ -793,20 +713,14 @@ namespace MonoTests.System.Windows.Forms {
"StandardClick=True",
"Selectable=True",
"UserMouse=False",
-#if NET_2_0
"SupportsTransparentBackColor=True",
-#else
- "SupportsTransparentBackColor=False",
-#endif
"StandardDoubleClick=True",
"AllPaintingInWmPaint=False",
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(UserControl_want, GetStyles(new UserControl()), "UserControlStyles");
@@ -831,10 +745,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(Panel_want, GetStyles(new Panel()), "PanelStyles");
@@ -859,10 +771,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=True",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(TabPage_want, GetStyles(new TabPage()), "TabPageStyles");
@@ -887,10 +797,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(HScrollBar_want, GetStyles(new HScrollBar()), "HScrollBarStyles");
@@ -915,10 +823,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(VScrollBar_want, GetStyles(new VScrollBar()), "VScrollBarStyles");
@@ -943,10 +849,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(Splitter_want, GetStyles(new Splitter()), "SplitterStyles");
@@ -971,10 +875,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(StatusBar_want, GetStyles(new StatusBar()), "StatusBarStyles");
@@ -999,10 +901,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(TabControl_want, GetStyles(new TabControl()), "TabControlStyles");
@@ -1022,19 +922,13 @@ namespace MonoTests.System.Windows.Forms {
"Selectable=True",
"UserMouse=False",
"SupportsTransparentBackColor=False",
-#if NET_2_0
"StandardDoubleClick=False",
-#else
- "StandardDoubleClick=True",
-#endif
"AllPaintingInWmPaint=True",
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(RichTextBox_want, GetStyles(new RichTextBox()), "RichTextBoxStyles");
@@ -1059,10 +953,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(TextBox_want, GetStyles(new TextBox()), "TextBoxStyles");
@@ -1087,10 +979,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(DataGridTextBox_want, GetStyles(new DataGridTextBox()), "DataGridTextBoxStyles");
@@ -1115,10 +1005,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=True"
-#endif
};
Assert.AreEqual(ToolBar_want, GetStyles(new ToolBar()), "ToolBarStyles");
@@ -1143,10 +1031,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(TrackBar_want, GetStyles(new TrackBar()), "TrackBarStyles");
@@ -1171,10 +1057,8 @@ namespace MonoTests.System.Windows.Forms {
"CacheText=False",
"EnableNotifyMessage=False",
"DoubleBuffer=False",
-#if NET_2_0
"OptimizedDoubleBuffer=False",
"UseTextForAccessibility=False"
-#endif
};
Assert.AreEqual(TreeView_want, GetStyles(new TreeView()), "TreeViewStyles");
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
index 96a7c02ef97..db3c7a08820 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ControlTest.cs
@@ -14,9 +14,7 @@ using System.Reflection;
using System.Runtime.Remoting;
using System.Threading;
using System.Windows.Forms;
-#if NET_2_0
using System.Windows.Forms.Layout;
-#endif
using NUnit.Framework;
using CategoryAttribute = NUnit.Framework.CategoryAttribute;
@@ -355,7 +353,6 @@ namespace MonoTests.System.Windows.Forms
CreateHandle ();
}
}
-#if NET_2_0
[Test]
public void AutoSizeTest ()
{
@@ -483,7 +480,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
[Test]
public void Bug82748 ()
@@ -562,7 +558,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("{Width=0, Height=0}", c.Size.ToString (), "#S1");
}
-#if NET_2_0
[Test]
public void CaptureTest ()
{
@@ -596,7 +591,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (log.IsHandleCreated, "#05");
Assert.IsTrue (log.Log.ToString ().IndexOf ("OnMouseCaptureChanged") == -1, "#06");
}
-#endif
public class OnPaintTester : Form
{
@@ -607,7 +601,6 @@ namespace MonoTests.System.Windows.Forms
public bool TestRefresh;
public bool TestInvalidate;
public bool TestUpdate;
-#if NET_2_0
public new bool DoubleBuffered {
get {
return base.DoubleBuffered;
@@ -616,7 +609,6 @@ namespace MonoTests.System.Windows.Forms
base.DoubleBuffered = value;
}
}
-#endif
protected override void OnPaint (PaintEventArgs pevent)
{
Assert.IsFalse (list.Contains (pevent.Graphics), "OnPaintTester.OnPaint: Got the same Graphics twice");
@@ -697,7 +689,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (t.Recursive, "#3");
}
}
-#if NET_2_0
[Test]
[Category ("Interactive")]
public void OnPaintDoubleBufferedTest ()
@@ -723,7 +714,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (t.Recursive, "#3");
}
}
-#endif
public class PaintEventForm : Form
{
public ArrayList overrides = new ArrayList ();
@@ -765,7 +755,6 @@ namespace MonoTests.System.Windows.Forms
[Ignore ("Can't find a reliable way to generate a paint message on Windows.")]
public void EventStyleTest ()
{
-#if NET_2_0
using (PaintEventForm f = new PaintEventForm ()) {
f.Show ();
f.SetControlStyle (ControlStyles.OptimizedDoubleBuffer, true);
@@ -774,7 +763,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (f.overrides.Contains ("OnPaint"), "#A2");
Assert.IsTrue (f.events.Contains ("Paint"), "#A3");
}
-#endif
using (PaintEventForm f = new PaintEventForm ()) {
f.Show ();
f.SetControlStyle (ControlStyles.DoubleBuffer, true);
@@ -838,7 +826,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (f.events.Contains ("Paint"), "#H3");
}
}
-#if NET_2_0
public class DoubleBufferedForm : Form
{
public bool painted;
@@ -987,7 +974,6 @@ namespace MonoTests.System.Windows.Forms
TestControlStyle.CheckStyles (c, "#B3", ControlStyles.AllPaintingInWmPaint);
}
-#endif
class Helper {
public static void TestAccessibility(Control c, string Default, string Description, string Name, AccessibleRole Role)
@@ -1126,9 +1112,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.Font.Strikeout, "#A7");
Assert.IsFalse (c.Font.Underline, "#A8");
Assert.AreEqual (GraphicsUnit.Point, c.Font.Unit, "#A9");
-#if NET_2_0
Assert.IsTrue (c.Font.IsSystemFont, "#A10");
-#endif
c.Font = new Font (c.Font.FontFamily, 3, FontStyle.Italic);
Assert.IsFalse (c.Font.Bold, "#B1");
@@ -1140,9 +1124,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.Font.Strikeout, "#B7");
Assert.IsFalse (c.Font.Underline, "#B8");
Assert.AreEqual (GraphicsUnit.Point, c.Font.Unit, "#B9");
-#if NET_2_0
Assert.AreEqual (false, c.Font.IsSystemFont, "#B10");
-#endif
}
[Test]
@@ -1165,9 +1147,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("Control", c.BackColor.Name , "B1");
Assert.IsNull (c.BackgroundImage, "B2");
Assert.IsNull (c.BindingContext, "B3");
-#if NET_2_0
Assert.AreEqual (ImageLayout.Tile, c.BackgroundImageLayout, "B4");
-#endif
Assert.IsFalse (c.CanFocus, "C1");
Assert.IsTrue (c.CanSelect, "C2");
@@ -1206,10 +1186,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual(Point.Empty, c.Location, "L2");
-#if NET_2_0
Assert.IsTrue(c.MaximumSize.IsEmpty);
Assert.IsTrue(c.MinimumSize.IsEmpty);
-#endif
Assert.AreEqual (Keys.None, Control.ModifierKeys, "M1");
Assert.IsTrue (Control.MousePosition.X >= 0 && Control.MousePosition.Y >= 0, "M2");
Assert.AreEqual (MouseButtons.None, Control.MouseButtons, "M3");
@@ -1564,7 +1542,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual(40, r1.Height, "Scale2");
}
-#if NET_2_0
[Test]
public void ScaleChildrenTest ()
{
@@ -1700,7 +1677,6 @@ namespace MonoTests.System.Windows.Forms
get { return scale_children; }
}
}
-#endif
[Test] // Bug #347282
public void ScaleHierarchy ()
@@ -2041,7 +2017,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (d.Name, l.Name, "Child4");
// GetChildAtPointSkip is not implemented and the following test is breaking for Net_2_0 profile
-#if NET_2_0
c.Controls.Add (e);
e.Visible = false;
l = c.GetChildAtPoint (new Point (57, 57), GetChildAtPointSkip.Invisible);
@@ -2068,7 +2043,6 @@ namespace MonoTests.System.Windows.Forms
l = c.GetChildAtPoint (new Point (57, 57), GetChildAtPointSkip.Transparent);
Assert.AreSame (e.Name, l.Name, "Child10");
-#endif // NET_2_0
} finally {
if (c != null)
c.Dispose ();
@@ -2111,9 +2085,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.Font.Strikeout, "#7");
Assert.IsFalse (c.Font.Underline, "#8");
Assert.AreEqual (GraphicsUnit.Point, c.Font.Unit, "#9");
-#if NET_2_0
Assert.AreEqual (true, c.Font.IsSystemFont, "#10");
-#endif
}
public class LayoutTestControl : Control {
@@ -2388,7 +2360,6 @@ namespace MonoTests.System.Windows.Forms
form.Dispose ();
}
-#if NET_2_0
[Test]
public void UseWaitCursorTest ()
{
@@ -2452,7 +2423,6 @@ namespace MonoTests.System.Windows.Forms
return base.SizeFromClientSize (clientSize);
}
}
-#endif
public class MockControl : Control
{
@@ -2520,7 +2490,6 @@ namespace MonoTests.System.Windows.Forms
const int WM_SYSCHAR = 0x0106;
const int WM_KEYUP = 0x0101;
-#if NET_2_0
[Test]
public void MethodPreProcessControlMessage ()
{
@@ -2617,7 +2586,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (PreProcessControlState.MessageNotNeeded, c.PreProcessControlMessage (ref m), "A16");
if (testing_callstack) Console.WriteLine ("End {0}\n", m.WParam.ToString ());
}
-#endif
[Test]
public void MethodPreProcessMessage ()
@@ -2751,7 +2719,6 @@ namespace MonoTests.System.Windows.Forms
return retval;
}
-#if NET_2_0
protected override void OnPreviewKeyDown (PreviewKeyDownEventArgs e)
{
if (testing_callstack) Console.Write ("OnPreviewKeyDown[");
@@ -2764,7 +2731,6 @@ namespace MonoTests.System.Windows.Forms
base.OnPreviewKeyDown (e);
if (testing_callstack) Console.WriteLine ("]");
}
-#endif
protected override bool IsInputChar (char charCode)
{
@@ -3280,7 +3246,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[TestFixture]
public class ControlLayoutTest : TestHelper
{
@@ -3369,5 +3334,4 @@ namespace MonoTests.System.Windows.Forms
private bool _layoutInvoked;
}
}
-#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CurrencyManagerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CurrencyManagerTest.cs
index da7835dec98..9a534ebfea0 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CurrencyManagerTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CurrencyManagerTest.cs
@@ -31,9 +31,7 @@ using System.Windows.Forms;
using NUnit.Framework;
-#if NET_2_0
using System.Collections.ObjectModel;
-#endif
namespace MonoTests.System.Windows.Forms.DataBinding
{
@@ -137,7 +135,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Assert.AreEqual (0, cm.Position, "#B2");
}
-#if NET_2_0
[Test]
public void IsBindingEmptyDataSource ()
{
@@ -159,7 +156,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
list.Clear ();
Assert.AreEqual (true, cm.IsBindingSuspended, "E1");
}
-#endif
[Test]
public void MoveArrayListForward ()
@@ -671,10 +667,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
int metadata_changed;
string event_log = "";
ItemChangedEventArgs item_changed_args;
-#if NET_2_0
bool list_changed_called;
ListChangedEventArgs list_changed_args;
-#endif
void CurrentChanged (object sender, EventArgs args)
{
@@ -711,7 +705,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
//Console.WriteLine (Environment.StackTrace);
event_log += String.Format ("{0}: MetaDataChanged\n", metadata_changed);
}
-#if NET_2_0
// CurrencyManager.ListChanged handler, not IBindingList.ListChanged
void ListChangedEvent (object sender, ListChangedEventArgs args)
{
@@ -720,7 +713,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine ("CurrencyManager.ListChanged ({0},{1},{2})", args.ListChangedType, args.OldIndex, args.NewIndex);
}
-#endif
[Test]
public void AddNew ()
@@ -733,10 +725,8 @@ namespace MonoTests.System.Windows.Forms.DataBinding
cm.CurrentChanged += new EventHandler (CurrentChanged);
cm.PositionChanged += new EventHandler (PositionChanged);
cm.ItemChanged += new ItemChangedEventHandler (ItemChanged);
-#if NET_2_0
list_changed_called = false;
cm.ListChanged += new ListChangedEventHandler (ListChangedEvent);
-#endif
Assert.AreEqual (0, cm.Position, "AddNew1");
Assert.AreEqual (10, cm.Count, "AddNew2");
@@ -752,17 +742,13 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Assert.AreEqual (-1, item_changed_args.Index, "AddNew6");
Assert.AreEqual (1, current_changed, "AddNew7");
Assert.AreEqual (2, position_changed, "AddNew8");
-#if NET_2_0
Assert.AreEqual (true, list_changed_called, "AddNew9");
Assert.AreEqual (-1, list_changed_args.OldIndex, "AddNew10");
Assert.AreEqual (10, list_changed_args.NewIndex, "AddNew11");
-#endif
cm.CurrentChanged -= new EventHandler (CurrentChanged);
cm.PositionChanged -= new EventHandler (PositionChanged);
-#if NET_2_0
cm.ListChanged -= new ListChangedEventHandler (ListChangedEvent);
-#endif
}
[Test]
@@ -810,7 +796,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
cm.PositionChanged -= new EventHandler (PositionChanged);
}
-#if NET_2_0
class CancelAddNewList<T> : Collection<T>, ICancelAddNew
{
public bool EndNewCalled;
@@ -864,16 +849,13 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Assert.AreEqual (true, list.CancelNewCalled, "C2");
Assert.AreEqual (1, list.LastIndex, "C3");
}
-#endif
[Test]
public void EndAddNew ()
{
-#if NET_2_0
if (TestHelper.RunningOnUnix) {
Assert.Ignore ("Fails with 2.0 profile");
}
-#endif
DataSet data_source = CreateRelatedDataSet ();
BindingContext bc = new BindingContext ();
CurrencyManager cm = bc [data_source.Tables["Table1"], ""] as CurrencyManager;
@@ -917,7 +899,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine ("{0} {1} {2}", e.ListChangedType, e.OldIndex, e.NewIndex);
}
-#if NET_2_0
// Support for ICancelNew interface
[Test]
public void EndAddNew2 ()
@@ -946,7 +927,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Assert.AreEqual (false, list.CancelNewCalled, "C2");
Assert.AreEqual (1, list.LastIndex, "C3");
}
-#endif
[Test]
public void AddNew2 ()
@@ -1186,7 +1166,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Assert.IsTrue (typeof (DataView).IsAssignableFrom (GetFinalType (cm)), "A6");
}
-#if NET_2_0
[Test]
public void ListChangedEventTest ()
{
@@ -1260,7 +1239,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
ResetBindings ();
}
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CursorTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CursorTest.cs
index a8fe9818137..fd11142b004 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CursorTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/CursorTest.cs
@@ -26,7 +26,6 @@ namespace MonoTests.System.Windows.Forms
new Cursor (typeof (CursorTest).Assembly.GetManifestResourceStream ("a.cur"));
}
-#if NET_2_0
[Test]
public void CursorPropertyTag ()
{
@@ -38,6 +37,5 @@ namespace MonoTests.System.Windows.Forms
md.Tag = s;
Assert.AreSame (s, md.Tag, "A2");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs
index aef76e0777a..50cd31ad6dc 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataBindingTests.cs
@@ -66,7 +66,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
//Console.WriteLine (Environment.StackTrace);
event_log += String.Format ("{0}: MetaDataChanged\n", event_num++);
}
-#if NET_2_0
protected void BindingComplete (object sender, BindingCompleteEventArgs args)
{
//Console.WriteLine (Environment.StackTrace);
@@ -82,7 +81,6 @@ namespace MonoTests.System.Windows.Forms.DataBinding
//Console.WriteLine (Environment.StackTrace);
event_log += String.Format ("{0}: DataError\n", event_num++);
}
-#endif
protected void Format (object sender, ConvertEventArgs args)
{
//Console.WriteLine (Environment.StackTrace);
@@ -106,22 +104,18 @@ namespace MonoTests.System.Windows.Forms.DataBinding
cm.PositionChanged += new EventHandler (PositionChanged);
cm.ItemChanged += new ItemChangedEventHandler (ItemChanged);
cm.MetaDataChanged += new EventHandler (MetaDataChanged);
-#if NET_2_0
cm.BindingComplete += new BindingCompleteEventHandler (BindingComplete);
cm.CurrentItemChanged += new EventHandler (CurrentItemChanged);
cm.DataError += new BindingManagerDataErrorEventHandler (DataError);
-#endif
}
protected void HookupPropertyManager (PropertyManager pm)
{
pm.CurrentChanged += new EventHandler (CurrentChanged);
pm.PositionChanged += new EventHandler (PositionChanged);
-#if NET_2_0
pm.BindingComplete += new BindingCompleteEventHandler (BindingComplete);
pm.CurrentItemChanged += new EventHandler (CurrentItemChanged);
pm.DataError += new BindingManagerDataErrorEventHandler (DataError);
-#endif
}
protected void HookupBinding (Binding b)
@@ -334,19 +328,11 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
Assert.AreEqual (
-#if NET_2_0
#if WITH_BINDINGS
"0: CurrentChanged\n1: CurrentItemChanged\n2: ItemChanged (index = -1)\n3: Binding.Format\n"
#else
"0: CurrentChanged\n1: CurrentItemChanged\n2: ItemChanged (index = -1)\n"
#endif
-#else
-#if WITH_BINDINGS
- "0: CurrentChanged\n1: ItemChanged (index = -1)\n2: Binding.Format\n"
-#else
- "0: CurrentChanged\n1: ItemChanged (index = -1)\n"
-#endif
-#endif
, event_log, "2");
Assert.AreEqual (1, cm.Count, "3");
@@ -392,19 +378,11 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
Assert.AreEqual (
-#if NET_2_0
#if WITH_BINDINGS
"0: PositionChanged (to 0)\n1: CurrentChanged\n2: CurrentItemChanged\n3: ItemChanged (index = -1)\n4: ItemChanged (index = -1)\n5: Binding.Format\n6: Binding.Format\n7: Binding.Format\n"
#else
"0: PositionChanged (to 0)\n1: CurrentChanged\n2: CurrentItemChanged\n3: ItemChanged (index = -1)\n4: ItemChanged (index = -1)\n"
#endif
-#else
-#if WITH_BINDINGS
- "0: PositionChanged (to 0)\n1: CurrentChanged\n2: ItemChanged (index = -1)\n3: ItemChanged (index = -1)\n4: Binding.Format\n5: Binding.Format\n6: Binding.Format\n"
-#else
- "0: PositionChanged (to 0)\n1: CurrentChanged\n2: ItemChanged (index = -1)\n3: ItemChanged (index = -1)\n"
-#endif
-#endif
, event_log, "2");
Assert.AreEqual (1, cm.Count, "3");
@@ -460,13 +438,11 @@ namespace MonoTests.System.Windows.Forms.DataBinding
[Test]
public void TestInsertRowBeforeCurrent ()
{
-#if NET_2_0
#if WITH_BINDINGS
if (TestHelper.RunningOnUnix) {
Assert.Ignore ("Too many Binding.Format events here");
}
#endif
-#endif
Control c = new Control ();
c.CreateControl ();
Binding binding;
@@ -506,19 +482,11 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
Assert.AreEqual (
-#if NET_2_0
#if WITH_BINDINGS
"0: CurrentChanged\n1: CurrentItemChanged\n2: ItemChanged (index = -1)\n3: PositionChanged (to 2)\n4: Binding.Format\n"
#else
"0: CurrentChanged\n1: CurrentItemChanged\n2: ItemChanged (index = -1)\n3: PositionChanged (to 2)\n"
#endif
-#else
-#if WITH_BINDINGS
- "0: ItemChanged (index = -1)\n1: Binding.Format\n"
-#else
- "0: ItemChanged (index = -1)\n"
-#endif
-#endif
, event_log, "2");
Assert.AreEqual (3, cm.Count, "3");
@@ -566,19 +534,11 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
Assert.AreEqual (
-#if NET_2_0
#if WITH_BINDINGS
"0: CurrentChanged\n1: CurrentItemChanged\n2: ItemChanged (index = -1)\n3: PositionChanged (to 2)\n4: Binding.Format\n"
#else
"0: CurrentChanged\n1: CurrentItemChanged\n2: ItemChanged (index = -1)\n3: PositionChanged (to 2)\n"
#endif
-#else
-#if WITH_BINDINGS
- "0: ItemChanged (index = -1)\n1: Binding.Format\n"
-#else
- "0: ItemChanged (index = -1)\n"
-#endif
-#endif
, event_log, "2");
Assert.AreEqual (3, cm.Count, "3");
@@ -616,11 +576,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
-#if NET_2_0
Assert.AreEqual ("0: MetaDataChanged\n", event_log, "2");
-#else
- Assert.AreEqual ("0: MetaDataChanged\n1: MetaDataChanged\n", event_log, "2");
-#endif
Assert.AreEqual (0, cm.Count, "3");
}
@@ -804,19 +760,11 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
Assert.AreEqual (
-#if NET_2_0
#if WITH_BINDINGS
"0: CurrentItemChanged\n1: ItemChanged (index = 0)\n2: Binding.Format\n"
#else
"0: CurrentItemChanged\n1: ItemChanged (index = 0)\n"
#endif
-#else
-#if WITH_BINDINGS
- "0: ItemChanged (index = 0)\n1: Binding.Format\n"
-#else
- "0: ItemChanged (index = 0)\n"
-#endif
-#endif
, event_log, "2");
Assert.AreEqual (1, cm.Count, "3");
@@ -908,11 +856,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
Assert.AreEqual (
-#if NET_2_0
"0: PositionChanged (to -1)\n1: ItemChanged (index = -1)\n2: PositionChanged (to -1)\n3: CurrentChanged\n4: CurrentItemChanged\n5: ItemChanged (index = -1)\n"
-#else
- "0: PositionChanged (to -1)\n1: ItemChanged (index = -1)\n2: ItemChanged (index = -1)\n"
-#endif
, event_log, "1");
Assert.AreEqual (0, cm.Count, "2");
@@ -959,11 +903,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding
dt.Rows.Add(new object[]{"A1", "B1"});
Console.WriteLine ("<3");
-#if NET_2_0
Assert.AreEqual ("0: PositionChanged (to 0)\n1: CurrentChanged\n2: CurrentItemChanged\n3: ItemChanged (index = -1)\n4: ItemChanged (index = -1)\n", event_log, "3");
-#else
- Assert.AreEqual ("0: PositionChanged (to 0)\n1: CurrentChanged\n2: ItemChanged (index = -1)\n3: ItemChanged (index = -1)\n", event_log, "3");
-#endif
event_log = ""; event_num = 0;
Console.WriteLine (">4");
@@ -1011,11 +951,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
Assert.AreEqual (
-#if NET_2_0
"0: PositionChanged (to 0)\n1: CurrentChanged\n2: CurrentItemChanged\n3: ItemChanged (index = -1)\n4: ItemChanged (index = -1)\n5: PositionChanged (to -1)\n6: ItemChanged (index = -1)\n7: PositionChanged (to -1)\n8: CurrentChanged\n9: CurrentItemChanged\n10: ItemChanged (index = -1)\n11: ItemChanged (index = -1)\n",
-#else
- "0: PositionChanged (to 0)\n1: CurrentChanged\n2: ItemChanged (index = -1)\n3: ItemChanged (index = -1)\n4: CurrentChanged\n5: PositionChanged (to -1)\n6: ItemChanged (index = -1)\n7: ItemChanged (index = -1)\n8: ItemChanged (index = -1)\n",
-#endif
event_log, "1");
}
@@ -1061,11 +997,7 @@ namespace MonoTests.System.Windows.Forms.DataBinding
Console.WriteLine (event_log);
-#if NET_2_0
Assert.AreEqual ("0: CurrentChanged\n1: CurrentItemChanged\n2: Binding.Format\n3: CurrentChanged\n4: CurrentItemChanged\n", event_log, "1");
-#else
- Assert.AreEqual ("0: CurrentChanged\n1: Binding.Format\n2: CurrentChanged\n", event_log, "1");
-#endif
}
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridTest.cs
index 8141409ca18..b7ae30e7d0a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridTest.cs
@@ -89,9 +89,7 @@ namespace MonoTests.System.Windows.Forms
// Font
Assert.IsFalse (dg.Font.Bold, "Font Bold");
-#if NET_2_0
Assert.IsTrue (dg.Font.IsSystemFont, "Font IsSystemFont");
-#endif
Assert.IsFalse (dg.Font.Italic, "Font Italic");
Assert.IsFalse (dg.Font.Strikeout, "Font Strikeout");
Assert.IsFalse (dg.Font.Underline, "Font Underline");
@@ -156,9 +154,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (dg.CaptionFont.Bold, "#A1");
Assert.AreEqual (dg.CaptionFont.FontFamily, dg.Font.FontFamily, "#A2");
Assert.AreEqual (dg.CaptionFont.Height, dg.Font.Height, "#A3");
-#if NET_2_0
Assert.IsFalse(dg.CaptionFont.IsSystemFont, "#A4");
-#endif
Assert.AreEqual (dg.CaptionFont.Italic, dg.Font.Italic, "#A5");
Assert.AreEqual (dg.CaptionFont.Name, dg.Font.Name, "#A6");
Assert.AreEqual (dg.CaptionFont.Size, dg.Font.Size, "#A7");
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewAdvancedBorderStyleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewAdvancedBorderStyleTest.cs
index bede0d7780d..305759cd877 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewAdvancedBorderStyleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewAdvancedBorderStyleTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -142,4 +141,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewBandTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewBandTest.cs
index e949fc2b862..dcbfa0695dc 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewBandTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewBandTest.cs
@@ -23,7 +23,6 @@
// Rolf Bjarne Kvinge (RKvinge@novell.com)
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -41,4 +40,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewButtonCellTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewButtonCellTest.cs
index 8861b6642b7..c92c574eb5f 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewButtonCellTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewButtonCellTest.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -871,4 +870,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellCollectionTest.cs
index af97696ad5e..b70382eb938 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellCollectionTest.cs
@@ -22,7 +22,6 @@
//
// Copyright (c) 2007 Gert Driesen
-#if NET_2_0
using System;
using System.Data;
@@ -302,4 +301,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellStyleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellStyleTest.cs
index 9ae6de0225b..6c5826f91ab 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellStyleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellStyleTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -142,4 +141,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellTest.cs
index cba998fa794..4fd0578f994 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCellTest.cs
@@ -23,7 +23,6 @@
// Pedro Martínez Juliá <pedromj@gmail.com>
//
-#if NET_2_0
using System;
using System.Collections;
@@ -1558,4 +1557,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCheckBoxCellTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCheckBoxCellTest.cs
index 3043b19ea42..7b2f090038c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCheckBoxCellTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCheckBoxCellTest.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -904,4 +903,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardHeaderTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardHeaderTest.cs
index 333cf95f909..823b5a39ac6 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardHeaderTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardHeaderTest.cs
@@ -4,7 +4,6 @@
// Author:
// DataGridViewTest.GenerateClipboardTest (true);
//
-#if NET_2_0
using NUnit.Framework;
using System;
using System.Drawing;
@@ -1193,4 +1192,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardTest.cs
index 8ac451eb208..459def6b023 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewClipboardTest.cs
@@ -4,7 +4,6 @@
// Author:
// DataGridViewTest.GenerateClipboardTest (false);
//
-#if NET_2_0
using NUnit.Framework;
using System;
using System.Drawing;
@@ -1770,4 +1769,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnCollectionTest.cs
index ede6bba1435..cdea110d8cf 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnCollectionTest.cs
@@ -23,7 +23,6 @@
// Rolf Bjarne Kvinge (RKvinge@novell.com)
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -138,4 +137,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnHeaderTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnHeaderTest.cs
index 7b92b9c5c3a..f8138d698c5 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnHeaderTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnHeaderTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -83,4 +82,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnTest.cs
index 5ea9648b112..c9abe453775 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewColumnTest.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -265,4 +264,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewComboBoxCellTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewComboBoxCellTest.cs
index 5d4c4bb816b..0a2ce7f967a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewComboBoxCellTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewComboBoxCellTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -62,4 +61,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCommon.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCommon.cs
index f0a863cb28c..4b9be352a24 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCommon.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewCommon.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -132,4 +131,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewDataBindingTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewDataBindingTest.cs
index ddc16f0773a..5a005152e11 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewDataBindingTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewDataBindingTest.cs
@@ -23,7 +23,6 @@
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -588,4 +587,3 @@ namespace MonoTests.System.Windows.Forms.DataGridViewBindingTest
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewElementTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewElementTest.cs
index 686f4870283..babe69365b3 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewElementTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewElementTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -46,4 +45,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewImageCellTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewImageCellTest.cs
index f5d18dd0f6f..7c4a546f8a2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewImageCellTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewImageCellTest.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -874,4 +873,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewLinkCellTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewLinkCellTest.cs
index 1ed35f45a69..3298860dbf9 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewLinkCellTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewLinkCellTest.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -886,4 +885,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowCollectionTest.cs
index ad5df152bbf..5e10505fd78 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowCollectionTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -172,4 +171,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowHeaderTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowHeaderTest.cs
index 03640ac5d7d..03e805d80c5 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowHeaderTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowHeaderTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -222,4 +221,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs
index 475aa85a23f..a6f0ad48b01 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewRowTest.cs
@@ -24,7 +24,6 @@
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -411,4 +410,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTest.cs
index e973b2b9232..5094291f3f9 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTest.cs
@@ -23,7 +23,6 @@
// Pedro Martínez Juliá <pedromj@gmail.com>
// Daniel Nauck (dna(at)mono-project(dot)de)
// Ivan N. Zlatev <contact@i-nz.net>
-#if NET_2_0
using System;
using System.Data;
@@ -2714,4 +2713,3 @@ namespace MonoTests.System.Windows.Forms
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxCellTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxCellTest.cs
index b530c00549a..384143394c1 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxCellTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxCellTest.cs
@@ -27,7 +27,6 @@
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -871,4 +870,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxColumnTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxColumnTest.cs
index 495cc3c17ea..9f0faa5bea3 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxColumnTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataGridViewTextBoxColumnTest.cs
@@ -23,7 +23,6 @@
// Rolf Bjarne Kvinge (RKvinge@novell.com)
//
-#if NET_2_0
using NUnit.Framework;
using System;
@@ -83,4 +82,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataObjectTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataObjectTest.cs
index 718be533351..46a28152fc3 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataObjectTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DataObjectTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.Drawing;
@@ -171,4 +170,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DateTimePickerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DateTimePickerTest.cs
index 04df90f72e9..17156b8b708 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DateTimePickerTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DateTimePickerTest.cs
@@ -59,7 +59,6 @@ namespace MonoTests.System.Windows.Forms {
}
}
-#if NET_2_0
// Only use on Windows!
public static string GenerateCustomFormatTests ()
{
@@ -125,7 +124,6 @@ namespace MonoTests.System.Windows.Forms {
return builder.ToString ();
}
-#endif
// On Windows this test must be called with en-US locale specified in the regional settings.
// There is no way to change this programmatically for the test to run correctly on other locales
@@ -3116,9 +3114,7 @@ namespace MonoTests.System.Windows.Forms {
Assert.AreEqual ("Window", dt.BackColor.Name, "B1");
Assert.AreSame (null, dt.BackgroundImage, "B2");
-#if NET_2_0
Assert.AreEqual (ImageLayout.Tile, dt.BackgroundImageLayout, "B3");
-#endif
//Assert.AreSame (null, dt.CalendarFont, "C1");
Assert.AreEqual ("ControlText", dt.CalendarForeColor.Name, "C2");
@@ -3136,19 +3132,13 @@ namespace MonoTests.System.Windows.Forms {
Assert.AreEqual (new DateTime (9998, 12, 31, 0, 0, 0), DateTimePicker.MaxDateTime, "M2");
Assert.AreEqual (new DateTime (1753, 1, 1), DateTimePicker.MinDateTime, "M4");
-#if NET_2_0
Assert.AreEqual (new DateTime (9998, 12, 31, 0, 0, 0), DateTimePicker.MaximumDateTime, "M5");
Assert.AreEqual (new DateTime (1753, 1, 1), DateTimePicker.MinimumDateTime, "M6");
-#endif
-#if NET_2_0
Assert.AreEqual (new Padding (0, 0, 0, 0), dt.Padding, "P1");
-#endif
// PreferredHeight is Font dependent.
-#if NET_2_0
Assert.AreEqual (false, dt.RightToLeftLayout, "R1");
-#endif
Assert.AreEqual (false, dt.ShowCheckBox, "S1");
Assert.AreEqual (false, dt.ShowUpDown, "S2");
@@ -3192,7 +3182,6 @@ namespace MonoTests.System.Windows.Forms {
try {
dt.MaxDate = new DateTime (9999, 1, 1);
Assert.Fail ("#A1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// DateTimePicker does not support dates after 12/31/9998 12:00:00 AM
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
@@ -3201,16 +3190,6 @@ namespace MonoTests.System.Windows.Forms {
Assert.IsNotNull (ex.ParamName, "#A5");
Assert.AreEqual ("MaxDate", ex.ParamName, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- // DateTimePicker does not support dates after 12/31/9998 12:00:00 AM
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNull (ex.InnerException, "#A3");
- Assert.IsNotNull (ex.Message, "#A4");
- Assert.IsNotNull (ex.ParamName, "#A5");
- Assert.AreEqual ("value", ex.ParamName, "#A6");
- }
-#endif
dt.MinDate = new DateTime (2007, 8, 13);
@@ -3218,7 +3197,6 @@ namespace MonoTests.System.Windows.Forms {
try {
dt.MaxDate = new DateTime (2007, 8, 12);
Assert.Fail ("#B1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// '8/12/2007 12:00:00 AM' is not a valid value for 'MaxDate'.
// 'MaxDate' must be greater than or equal to MinDate.
@@ -3228,16 +3206,6 @@ namespace MonoTests.System.Windows.Forms {
Assert.IsNotNull (ex.ParamName, "#B5");
Assert.AreEqual ("MaxDate", ex.ParamName, "#B6");
}
-#else
- } catch (ArgumentException ex) {
- // '8/12/2007 12:00:00 AM' is not a valid value for 'MaxDate'.
- // 'MaxDate' must be greater than or equal to MinDate.
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNull (ex.InnerException, "#B3");
- Assert.IsNotNull (ex.Message, "#B4");
- Assert.IsNull (ex.ParamName, "#B5");
- }
-#endif
}
[Test]
@@ -3262,7 +3230,6 @@ namespace MonoTests.System.Windows.Forms {
Assert.AreEqual (new DateTime (2008, 2, 5), dt.Value, "#11");
}
-#if NET_2_0
[Test]
public void DateTimeMinDate ()
{
@@ -3273,7 +3240,6 @@ namespace MonoTests.System.Windows.Forms {
dt.MinDate = DateTime.MinValue;
Assert.AreEqual (DateTimePicker.MinimumDateTime, dt.MinDate, "A1");
}
-#endif
[Test]
public void MinDate_Invalid ()
@@ -3284,7 +3250,6 @@ namespace MonoTests.System.Windows.Forms {
try {
dt.MinDate = new DateTime (1752, 12, 31);
Assert.Fail ("#A1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// DateTimePicker does not support dates before 1/1/1753 12:00:00 AM
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
@@ -3293,42 +3258,17 @@ namespace MonoTests.System.Windows.Forms {
Assert.IsNotNull (ex.ParamName, "#A5");
Assert.AreEqual ("MinDate", ex.ParamName, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- // DateTimePicker does not support dates before 1/1/1753 12:00:00 AM
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNull (ex.InnerException, "#A3");
- Assert.IsNotNull (ex.Message, "#A4");
- Assert.IsNotNull (ex.ParamName, "#A5");
- Assert.AreEqual ("value", ex.ParamName, "#A6");
- }
-#endif
dt.MaxDate = new DateTime (2007, 8, 13);
// equal to MaxDate
-#if NET_2_0
dt.MinDate = new DateTime (2007, 8, 13);
Assert.AreEqual (new DateTime (2007, 8, 13), dt.MinDate, "#B1");
-#else
- try {
- dt.MinDate = new DateTime (2007, 8, 13);
- Assert.Fail ("#B1");
- } catch (ArgumentException ex) {
- // '8/13/2007 12:00:00 AM' is not a valid value for 'MinDate'.
- // 'MinDate' must be less than MaxDate
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNull (ex.InnerException, "#B3");
- Assert.IsNotNull (ex.Message, "#B4");
- Assert.IsNull (ex.ParamName, "#B5");
- }
-#endif
// not less than MaxDate
try {
dt.MinDate = new DateTime (2007, 8, 14);
Assert.Fail ("#C1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// '8/14/2007 12:00:00 AM' is not a valid value for 'MinDate'.
// 'MinDate' must be less than MaxDate
@@ -3338,16 +3278,6 @@ namespace MonoTests.System.Windows.Forms {
Assert.IsNotNull (ex.ParamName, "#C5");
Assert.AreEqual ("MinDate", ex.ParamName, "#C6");
}
-#else
- } catch (ArgumentException ex) {
- // '8/14/2007 12:00:00 AM' is not a valid value for 'MinDate'.
- // 'MinDate' must be less than MaxDate
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#C2");
- Assert.IsNull (ex.InnerException, "#C3");
- Assert.IsNotNull (ex.Message, "#C4");
- Assert.IsNull (ex.ParamName, "#C5");
- }
-#endif
}
[Test]
@@ -3420,11 +3350,7 @@ namespace MonoTests.System.Windows.Forms {
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void ValueTooBig ()
{
DateTimePicker dt = new DateTimePicker ();
@@ -3434,11 +3360,7 @@ namespace MonoTests.System.Windows.Forms {
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void ValueTooSmall ()
{
DateTimePicker dt = new DateTimePicker ();
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
index 8387ff3812d..1e667bc4cdd 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/DefaultLayoutTest.cs
@@ -3,9 +3,7 @@ using System.Drawing;
using System.Windows.Forms;
using NUnit.Framework;
-#if NET_2_0
using System.Collections.Generic;
-#endif
namespace MonoTests.System.Windows.Forms
{
[TestFixture]
@@ -507,7 +505,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test]
public void TestDockFillWithPadding ()
{
@@ -524,7 +521,6 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#endif
[Test]
public void Bug82762 ()
@@ -569,7 +565,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (200, c1.Width, "A1");
}
-#if NET_2_0
[Test]
public void DockedAutoSizeControls ()
{
@@ -592,7 +587,6 @@ namespace MonoTests.System.Windows.Forms
f.Close ();
f.Dispose ();
}
-#endif
[Test] // bug #81199
public void NestedControls ()
@@ -751,7 +745,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test]
public void DockingPreferredSize ()
{
@@ -795,7 +788,6 @@ namespace MonoTests.System.Windows.Forms
return Size.Empty;
}
}
-#endif
[Test]
public void ResettingDockToNone ()
@@ -1085,7 +1077,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (37, panel.Width, "Width");
}
-#if NET_2_0
[Test]
public void AutoSizeGrowOnlyControls_ShrinkWhenDocked ()
{
@@ -1203,6 +1194,5 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ErrorProviderTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ErrorProviderTest.cs
index 5f963c8aa1e..e0ac5a48270 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ErrorProviderTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ErrorProviderTest.cs
@@ -126,7 +126,6 @@ namespace MonoTests.System.Windows.Forms
ep.SetError (tb, "arggggh");
}
-#if NET_2_0
[Test]
public void ErrorProviderPropertyTag ()
{
@@ -161,6 +160,5 @@ namespace MonoTests.System.Windows.Forms
myForm.Dispose ();
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventArgsTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventArgsTest.cs
index ee24a43a6f3..b23b140f75a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventArgsTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/EventArgsTest.cs
@@ -1,4 +1,3 @@
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -699,4 +698,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs
index 9712812c294..ff030574287 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormEventTest.cs
@@ -209,13 +209,9 @@ namespace MonoTests.System.Windows.Forms
string [] expectedEvents_Close = {
"Closing",
-#if NET_2_0
"FormClosing",
-#endif
"Closed",
-#if NET_2_0
"FormClosed",
-#endif
"Deactivate",
"LostFocus",
"HandleDestroyed",
@@ -233,13 +229,9 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, logger.CountEvents ("GotFocus"), "#A4");
Assert.AreEqual (1, logger.CountEvents ("Activated"), "#A5");
Assert.AreEqual (0, logger.CountEvents ("Closing"), "#A6");
-#if NET_2_0
Assert.AreEqual (0, logger.CountEvents ("FormClosing"), "#A7");
-#endif
Assert.AreEqual (0, logger.CountEvents ("Closed"), "#A8");
-#if NET_2_0
Assert.AreEqual (0, logger.CountEvents ("FormClosed"), "#A9");
-#endif
Assert.AreEqual (0, logger.CountEvents ("Deactivate"), "#A10");
Assert.AreEqual (0, logger.CountEvents ("LostFocus"), "#A11");
Assert.AreEqual (0, logger.CountEvents ("HandleDestroyed"), "#A12");
@@ -255,13 +247,9 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (0, logger.CountEvents ("GotFocus"), "#B4");
Assert.AreEqual (0, logger.CountEvents ("Activated"), "#B5");
Assert.AreEqual (1, logger.CountEvents ("Closing"), "#B6");
-#if NET_2_0
Assert.AreEqual (1, logger.CountEvents ("FormClosing"), "#B7");
-#endif
Assert.AreEqual (1, logger.CountEvents ("Closed"), "#B8");
-#if NET_2_0
Assert.AreEqual (1, logger.CountEvents ("FormClosed"), "#B9");
-#endif
Assert.AreEqual (1, logger.CountEvents ("Deactivate"), "#B10");
Assert.AreEqual (1, logger.CountEvents ("LostFocus"), "#B11");
Assert.AreEqual (1, logger.CountEvents ("HandleDestroyed"), "#B12");
@@ -280,13 +268,9 @@ namespace MonoTests.System.Windows.Forms
"GotFocus",
"Activated",
"Closing",
-#if NET_2_0
"FormClosing",
-#endif
"Closed",
-#if NET_2_0
"FormClosed",
-#endif
"VisibleChanged",
"Deactivate",
"LostFocus",
@@ -302,13 +286,9 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, logger.CountEvents ("GotFocus"), "#A4");
Assert.AreEqual (1, logger.CountEvents ("Activated"), "#A5");
Assert.AreEqual (1, logger.CountEvents ("Closing"), "#A6");
-#if NET_2_0
Assert.AreEqual (1, logger.CountEvents ("FormClosing"), "#A7");
-#endif
Assert.AreEqual (1, logger.CountEvents ("Closed"), "#A8");
-#if NET_2_0
Assert.AreEqual (1, logger.CountEvents ("FormClosed"), "#A9");
-#endif
Assert.AreEqual (1, logger.CountEvents ("Deactivate"), "#A10");
Assert.AreEqual (1, logger.CountEvents ("LostFocus"), "#A11");
Assert.AreEqual (1, logger.CountEvents ("HandleDestroyed"), "#A12");
@@ -323,20 +303,15 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, logger.CountEvents ("GotFocus"), "#B4");
Assert.AreEqual (1, logger.CountEvents ("Activated"), "#B5");
Assert.AreEqual (1, logger.CountEvents ("Closing"), "#B6");
-#if NET_2_0
Assert.AreEqual (1, logger.CountEvents ("FormClosing"), "#B7");
-#endif
Assert.AreEqual (1, logger.CountEvents ("Closed"), "#B8");
-#if NET_2_0
Assert.AreEqual (1, logger.CountEvents ("FormClosed"), "#B9");
-#endif
Assert.AreEqual (1, logger.CountEvents ("Deactivate"), "#B10");
Assert.AreEqual (1, logger.CountEvents ("LostFocus"), "#B11");
Assert.AreEqual (1, logger.CountEvents ("HandleDestroyed"), "#B12");
Assert.AreEqual (0, logger.CountEvents ("Disposed"), "#B13");
}
-#if NET_2_0
[Test]
public void FormClosed ()
{
@@ -408,7 +383,6 @@ namespace MonoTests.System.Windows.Forms
_form.ShowDialog ();
Assert.AreEqual (2, logger.CountEvents ("FormClosing"));
}
-#endif
[Test]
public void Load ()
@@ -440,7 +414,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (2, logger.CountEvents ("Load"), "#3");
}
-#if NET_2_0
[Test]
public void Shown ()
{
@@ -477,7 +450,6 @@ namespace MonoTests.System.Windows.Forms
_form.ShowDialog ();
Assert.AreEqual (2, logger.CountEvents ("Shown"), "#3");
}
-#endif
[Test]
public void VisibleChangedEvent ()
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormHandleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormHandleTest.cs
index 25f04bca89c..32d3232c4bf 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormHandleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormHandleTest.cs
@@ -89,16 +89,14 @@ namespace MonoTests.System.Windows.Forms
o = c.Anchor;
c.Anchor = AnchorStyles.Right;
Assert.IsFalse (c.IsHandleCreated, "A6");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.AutoScrollOffset;
c.AutoScrollOffset = new Point (40, 40);
Assert.IsFalse (c.IsHandleCreated, "A7");
#endif
-#if NET_2_0
o = c.AutoSize;
c.AutoSize = true;
Assert.IsFalse (c.IsHandleCreated, "A8");
-#endif
// A - Form
o = c.AcceptButton;
@@ -116,7 +114,6 @@ namespace MonoTests.System.Windows.Forms
c.AllowTransparency = !c.AllowTransparency;
Assert.IsFalse (c.IsHandleCreated, "FA4");
-#if NET_2_0
o = c.AutoScaleDimensions;
c.AutoScaleDimensions = SizeF.Empty;
Assert.IsFalse (c.IsHandleCreated, "FA5");
@@ -124,7 +121,6 @@ namespace MonoTests.System.Windows.Forms
o = c.AutoScaleMode;
c.AutoScaleMode = AutoScaleMode.Dpi;
Assert.IsFalse (c.IsHandleCreated, "FA6");
-#endif
o = c.AutoScroll;
c.AutoScroll = !c.AutoScroll;
Assert.IsFalse (c.IsHandleCreated, "FA7");
@@ -137,7 +133,7 @@ namespace MonoTests.System.Windows.Forms
c.AutoScrollMinSize = new Size (c.AutoScrollMinSize.Width + 1, c.AutoScrollMinSize.Height + 1);
Assert.IsFalse (c.IsHandleCreated, "FA9");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
o = c.AutoScrollOffset;
c.AutoScrollOffset = new Point (c.AutoScrollOffset.X + 1, c.AutoScrollOffset.Y + 1);
Assert.IsFalse (c.IsHandleCreated, "FA10");
@@ -146,7 +142,6 @@ namespace MonoTests.System.Windows.Forms
o = c.AutoScrollPosition;
c.AutoScrollPosition = new Point (c.AutoScrollPosition.X + 1, c.AutoScrollPosition.Y + 1);
Assert.IsFalse (c.IsHandleCreated, "FA11");
-#if NET_2_0
o = c.AutoSize;
c.AutoSize = !c.AutoSize;
@@ -160,7 +155,6 @@ namespace MonoTests.System.Windows.Forms
c.AutoValidate = AutoValidate.EnableAllowFocusChange;
Assert.IsFalse (c.IsHandleCreated, "FA14");
-#endif
// B
o = c.BackColor;
c.BackColor = Color.Green;
@@ -168,11 +162,9 @@ namespace MonoTests.System.Windows.Forms
o = c.BackgroundImage;
c.BackgroundImage = new Bitmap (1, 1);
Assert.IsFalse (c.IsHandleCreated, "A10");
-#if NET_2_0
o = c.BackgroundImageLayout;
c.BackgroundImageLayout = ImageLayout.Stretch;
Assert.IsFalse (c.IsHandleCreated, "A11");
-#endif
o = c.BindingContext;
c.BindingContext = new BindingContext ();
Assert.IsFalse (c.IsHandleCreated, "A12");
@@ -217,11 +209,9 @@ namespace MonoTests.System.Windows.Forms
o = c.ContextMenu;
c.ContextMenu = new ContextMenu ();
Assert.IsFalse (c.IsHandleCreated, "A24");
-#if NET_2_0
o = c.ContextMenuStrip;
c.ContextMenuStrip = new ContextMenuStrip ();
Assert.IsFalse (c.IsHandleCreated, "A25");
-#endif
o = c.Controls;
Assert.IsFalse (c.IsHandleCreated, "A26");
o = c.Created;
@@ -245,11 +235,9 @@ namespace MonoTests.System.Windows.Forms
o = c.ControlBox;
c.ControlBox = !c.ControlBox;
Assert.IsFalse (c.IsHandleCreated, "FC4");
-#if NET_2_0
o = c.CurrentAutoScaleDimensions;
Assert.IsFalse (c.IsHandleCreated, "FC5");
-#endif
// D
o = c.DataBindings;
@@ -323,7 +311,7 @@ namespace MonoTests.System.Windows.Forms
c.HelpButton = !c.HelpButton;
Assert.IsFalse (c.IsHandleCreated, "FH1");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
o = c.HorizontalScroll;
Assert.IsFalse (c.IsHandleCreated, "FH2");
#endif
@@ -336,14 +324,12 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A42");
o = c.IsDisposed;
Assert.IsFalse (c.IsHandleCreated, "A43");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.IsMirrored;
Assert.IsFalse (c.IsHandleCreated, "A44");
#endif
-#if NET_2_0
o = c.LayoutEngine;
Assert.IsFalse (c.IsHandleCreated, "A45");
-#endif
o = c.Left;
c.Left = 15;
Assert.IsFalse (c.IsHandleCreated, "A46");
@@ -377,7 +363,6 @@ namespace MonoTests.System.Windows.Forms
// M - N
-#if NET_2_0
o = c.Margin;
c.Margin = new Padding (6);
Assert.IsFalse (c.IsHandleCreated, "A48");
@@ -387,17 +372,14 @@ namespace MonoTests.System.Windows.Forms
o = c.MinimumSize;
c.MinimumSize = new Size (100, 100);
Assert.IsFalse (c.IsHandleCreated, "A50");
-#endif
o = c.Name;
c.Name = "web";
Assert.IsFalse (c.IsHandleCreated, "A51");
-#if NET_2_0
// M - O - Form
o = c.MainMenuStrip;
c.MainMenuStrip = null;
Assert.IsFalse (c.IsHandleCreated, "FM1");
-#endif
o = c.MaximizeBox;
c.MaximizeBox = !c.MaximizeBox;
@@ -444,11 +426,9 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "FO3");
// P - R
-#if NET_2_0
o = c.Padding;
c.Padding = new Padding (4);
Assert.IsFalse (c.IsHandleCreated, "A52");
-#endif
o = c.Parent;
c.TopLevel = false;
c.Parent = new Form ();
@@ -456,10 +436,8 @@ namespace MonoTests.System.Windows.Forms
c.Close ();
c = new Form ();
-#if NET_2_0
o = c.PreferredSize;
Assert.IsFalse (c.IsHandleCreated, "A54");
-#endif
o = c.ProductName;
Assert.IsFalse (c.IsHandleCreated, "A55");
o = c.ProductVersion;
@@ -479,7 +457,7 @@ namespace MonoTests.System.Windows.Forms
o = c.ParentForm;
Assert.IsFalse (c.IsHandleCreated, "FP1");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
o = c.RestoreBounds;
Assert.IsFalse (c.IsHandleCreated, "FR1");
#endif
@@ -505,7 +483,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A66");
o = c.TopLevelControl;
Assert.IsFalse (c.IsHandleCreated, "A67");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.UseWaitCursor;
c.UseWaitCursor = true;
Assert.IsFalse (c.IsHandleCreated, "A68");
@@ -526,11 +504,9 @@ namespace MonoTests.System.Windows.Forms
// S - W - Form
-#if NET_2_0
o = c.ShowIcon;
c.ShowIcon = !c.ShowIcon;
Assert.IsFalse (c.IsHandleCreated, "FS1");
-#endif
o = c.ShowInTaskbar;
c.ShowInTaskbar = !c.ShowInTaskbar;
@@ -568,7 +544,7 @@ namespace MonoTests.System.Windows.Forms
c.TransparencyKey = Color.BurlyWood;
Assert.IsFalse (c.IsHandleCreated, "FT4");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
o = c.VerticalScroll;
Assert.IsFalse (c.IsHandleCreated, "FV1");
#endif
@@ -589,19 +565,16 @@ namespace MonoTests.System.Windows.Forms
ProtectedPropertyForm c = new ProtectedPropertyForm ();
object o;
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.PublicCanRaiseEvents;
Assert.IsFalse (c.IsHandleCreated, "A1");
#endif
o = c.PublicCreateParams;
Assert.IsFalse (c.IsHandleCreated, "A2");
-#if NET_2_0
o = c.PublicDefaultCursor;
Assert.IsFalse (c.IsHandleCreated, "A3");
-#endif
o = c.PublicDefaultImeMode;
Assert.IsFalse (c.IsHandleCreated, "A4");
-#if NET_2_0
o = c.PublicDefaultMargin;
Assert.IsFalse (c.IsHandleCreated, "A5");
o = c.PublicDefaultMaximumSize;
@@ -615,7 +588,6 @@ namespace MonoTests.System.Windows.Forms
o = c.PublicDoubleBuffered;
c.PublicDoubleBuffered = !c.PublicDoubleBuffered;
Assert.IsFalse (c.IsHandleCreated, "A10");
-#endif
o = c.PublicFontHeight;
c.PublicFontHeight = c.PublicFontHeight + 1;
Assert.IsFalse (c.IsHandleCreated, "A11");
@@ -624,7 +596,7 @@ namespace MonoTests.System.Windows.Forms
o = c.PublicResizeRedraw;
c.PublicResizeRedraw = !c.PublicResizeRedraw;
Assert.IsFalse (c.IsHandleCreated, "A13");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
o = c.PublicScaleChildren;
Assert.IsFalse (c.IsHandleCreated, "A14");
#endif
@@ -633,10 +605,8 @@ namespace MonoTests.System.Windows.Forms
o = c.PublicShowKeyboardCues;
Assert.IsFalse (c.IsHandleCreated, "A16");
-#if NET_2_0
o = c.PublicAutoScaleFactor;
Assert.IsFalse (c.IsHandleCreated, "F1");
-#endif
o = c.PublicDesignMode;
Assert.IsFalse (c.IsHandleCreated, "F2");
@@ -652,10 +622,8 @@ namespace MonoTests.System.Windows.Forms
c.PublicMaximizedBounds = new Rectangle (1, 1, 1, 1);
Assert.IsFalse (c.IsHandleCreated, "F5");
-#if NET_2_0
o = c.PublicShowWithoutActivation;
Assert.IsFalse (c.IsHandleCreated, "F6");
-#endif
o = c.PublicVScroll;
c.PublicVScroll = !c.PublicVScroll;
@@ -733,10 +701,8 @@ namespace MonoTests.System.Windows.Forms
c = new Form ();
c.GetNextControl (new Control (), true);
Assert.IsFalse (c.IsHandleCreated, "A12");
-#if NET_2_0
c.GetPreferredSize (Size.Empty);
Assert.IsFalse (c.IsHandleCreated, "A13");
-#endif
c.Hide ();
Assert.IsFalse (c.IsHandleCreated, "A14");
@@ -791,10 +757,8 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A31");
c.ResumeLayout ();
Assert.IsFalse (c.IsHandleCreated, "A32");
-#if NET_2_0
c.Scale (new SizeF (1.5f, 1.5f));
Assert.IsFalse (c.IsHandleCreated, "A33");
-#endif
c.Select ();
Assert.IsTrue (c.IsHandleCreated, "A34");
c.Dispose ();
@@ -825,7 +789,7 @@ namespace MonoTests.System.Windows.Forms
c.LayoutMdi (MdiLayout.Cascade);
Assert.IsFalse (c.IsHandleCreated, "F5");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
c.PerformAutoScale ();
Assert.IsFalse (c.IsHandleCreated, "F6");
#endif
@@ -849,13 +813,11 @@ namespace MonoTests.System.Windows.Forms
c.SetDesktopLocation (7, 13);
Assert.IsFalse (c.IsHandleCreated, "F12");
-#if NET_2_0
c = new Form ();
c.Show (null);
Assert.IsTrue (c.IsHandleCreated, "F13");
c.Close ();
c = new Form ();
-#endif
//c.ShowDialog ()
@@ -865,7 +827,7 @@ namespace MonoTests.System.Windows.Forms
c.Validate ();
Assert.IsFalse (c.IsHandleCreated, "F15");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
c.ValidateChildren ();
Assert.IsFalse (c.IsHandleCreated, "F16");
#endif
@@ -902,42 +864,32 @@ namespace MonoTests.System.Windows.Forms
public class ProtectedPropertyForm : Form
{
-#if NET_2_0
public SizeF PublicAutoScaleFactor { get { return base.AutoScaleFactor; } }
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public bool PublicCanRaiseEvents { get { return base.CanRaiseEvents; } }
#endif
public CreateParams PublicCreateParams { get { return base.CreateParams; } }
-#if NET_2_0
public Cursor PublicDefaultCursor { get { return base.DefaultCursor; } }
-#endif
public ImeMode PublicDefaultImeMode { get { return base.DefaultImeMode; } }
-#if NET_2_0
public Padding PublicDefaultMargin { get { return base.DefaultMargin; } }
public Size PublicDefaultMaximumSize { get { return base.DefaultMaximumSize; } }
public Size PublicDefaultMinimumSize { get { return base.DefaultMinimumSize; } }
public Padding PublicDefaultPadding { get { return base.DefaultPadding; } }
public Size PublicDefaultSize { get { return base.DefaultSize; } }
-#endif
public bool PublicDesignMode { get {return base.DesignMode; } }
-#if NET_2_0
public bool PublicDoubleBuffered { get { return base.DoubleBuffered; } set { base.DoubleBuffered = value; } }
-#endif
public EventHandlerList PublicEvents { get {return base.Events; } }
public int PublicFontHeight { get { return base.FontHeight; } set { base.FontHeight = value; } }
public bool PublicHScroll { get {return base.HScroll; } set { base.HScroll = value;} }
public Rectangle PublicMaximizedBounds { get {return base.MaximizedBounds; } set { base.MaximizedBounds = value; }}
public bool PublicRenderRightToLeft { get { return base.RenderRightToLeft; } }
public bool PublicResizeRedraw { get { return base.ResizeRedraw; } set { base.ResizeRedraw = value; } }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public bool PublicScaleChildren { get { return base.ScaleChildren; } }
#endif
public bool PublicShowFocusCues { get { return base.ShowFocusCues; } }
public bool PublicShowKeyboardCues { get { return base.ShowKeyboardCues; } }
-#if NET_2_0
public bool PublicShowWithoutActivation { get { return base.ShowWithoutActivation; } }
-#endif
public bool PublicVScroll { get { return base.VScroll; } set { base.VScroll = value; } }
}
@@ -955,11 +907,7 @@ namespace MonoTests.System.Windows.Forms
ProtectedMethodsForm c = new ProtectedMethodsForm ();
c.PublicAccessibilityNotifyClients (AccessibleEvents.Focus, 0);
-#if NET_2_0
Assert.IsFalse (c.IsHandleCreated, "A1");
-#else
- Assert.IsTrue (c.IsHandleCreated, "A1");
-#endif
c.PublicCreateAccessibilityInstance ();
Assert.IsTrue (c.IsHandleCreated, "A2");
c.Dispose ();
@@ -975,11 +923,9 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A5");
c.Dispose ();
c = new ProtectedMethodsForm ();
-#if NET_2_0
c.PublicGetAccessibilityObjectById (0);
Assert.IsFalse (c.IsHandleCreated, "A6");
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
c.PublicGetAutoSizeMode ();
Assert.IsFalse (c.IsHandleCreated, "A7");
c.PublicGetScaledBounds (new Rectangle (0, 0, 100, 100), new SizeF (1.5f, 1.5f), BoundsSpecified.All);
@@ -1037,7 +983,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (c.IsHandleCreated, "A29");
c.PublicRtlTranslateLeftRight (LeftRightAlignment.Left);
Assert.IsFalse (c.IsHandleCreated, "A30");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
c.PublicScaleControl (new SizeF (1.5f, 1.5f), BoundsSpecified.All);
Assert.IsFalse (c.IsHandleCreated, "A31");
#endif
@@ -1048,7 +994,7 @@ namespace MonoTests.System.Windows.Forms
c.Dispose ();
c = new ProtectedMethodsForm ();
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
c.PublicSetAutoSizeMode (AutoSizeMode.GrowAndShrink);
Assert.IsFalse (c.IsHandleCreated, "A34");
#endif
@@ -1070,10 +1016,8 @@ namespace MonoTests.System.Windows.Forms
c.Dispose ();
c = new ProtectedMethodsForm ();
-#if NET_2_0
c.PublicSizeFromClientSize (new Size (160, 160));
Assert.IsFalse (c.IsHandleCreated, "A40");
-#endif
c.PublicUpdateBounds ();
Assert.IsFalse (c.IsHandleCreated, "A41");
c.PublicUpdateStyles ();
@@ -1137,7 +1081,7 @@ namespace MonoTests.System.Windows.Forms
c.PublicProcessTabKey (true);
Assert.IsFalse (c.IsHandleCreated, "F14");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
c.Controls.Add (new Control ());
c.PublicScrollToControl (c.Controls [0]);
Assert.IsFalse (c.IsHandleCreated, "F15");
@@ -1174,10 +1118,8 @@ namespace MonoTests.System.Windows.Forms
public void PublicCreateControlsInstance () { base.CreateControlsInstance (); }
public void PublicCreateHandle () { base.CreateHandle (); }
public void PublicDestroyHandle () { base.DestroyHandle (); }
-#if NET_2_0
public AccessibleObject PublicGetAccessibilityObjectById (int objectId) { return base.GetAccessibilityObjectById (objectId); }
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public AutoSizeMode PublicGetAutoSizeMode () { return base.GetAutoSizeMode (); }
public Rectangle PublicGetScaledBounds (Rectangle bounds, SizeF factor, BoundsSpecified specified) { return base.GetScaledBounds (bounds, factor, specified); }
#endif
@@ -1213,17 +1155,17 @@ namespace MonoTests.System.Windows.Forms
public ContentAlignment PublicRtlTranslateContent (ContentAlignment align) { return base.RtlTranslateContent (align); }
public HorizontalAlignment PublicRtlTranslateHorizontal (HorizontalAlignment align) { return base.RtlTranslateHorizontal (align); }
public LeftRightAlignment PublicRtlTranslateLeftRight (LeftRightAlignment align) { return base.RtlTranslateLeftRight (align); }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public void PublicScaleControl (SizeF factor, BoundsSpecified specified) { base.ScaleControl (factor, specified); }
#endif
public void PublicScaleCore (float dx, float dy) { base.ScaleCore (dx, dy); }
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
public void PublicScrollToControl (Control activeControl) { base.ScrollToControl (activeControl); }
#endif
public void PublicSelect () { base.Select (); }
public void PublicSelect (bool directed, bool forward) { base.Select (directed, forward); }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public void PublicSetAutoSizeMode (AutoSizeMode mode) { base.SetAutoSizeMode (mode); }
#endif
public void PublicSetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified) { base.SetBoundsCore (x, y, width, height, specified); }
@@ -1233,9 +1175,7 @@ namespace MonoTests.System.Windows.Forms
public void PublicSetStyle (ControlStyles flag, bool value) { base.SetStyle (flag, value); }
public void PublicSetTopLevel (bool value) { base.SetTopLevel (value); }
public void PublicSetVisibleCore (bool value) { base.SetVisibleCore (value); }
-#if NET_2_0
public Size PublicSizeFromClientSize (Size clientSize) { return base.SizeFromClientSize (clientSize); }
-#endif
public void PublicUpdateBounds () { base.UpdateBounds (); }
public void PublicUpdateDefaultButton (int bit, bool value) { base.UpdateDefaultButton (); }
public void PublicUpdateStyles () { base.UpdateStyles (); }
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
index 7b446fea570..424baa00da3 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/FormTest.cs
@@ -619,15 +619,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("VisibleChanged", f.Reason, "#00");
Assert.AreEqual (1, log.CountEvents ("Closing"), "#01");
-#if NET_2_0
Assert.AreEqual (1, log.CountEvents ("FormClosing"), "#02");
-#endif
Assert.AreEqual (1, log.CountEvents ("HandleDestroyed"), "#03");
Assert.AreEqual (0, log.CountEvents ("Closed"), "#04");
-#if NET_2_0
Assert.AreEqual (0, log.CountEvents ("FormClosed"), "#05");
-#endif
Assert.AreEqual (0, log.CountEvents ("Disposed"), "#06");
}
@@ -637,15 +633,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("Bombed", f.Reason, "#A0");
Assert.AreEqual (1, log.CountEvents ("Closing"), "#A1");
-#if NET_2_0
Assert.AreEqual (1, log.CountEvents ("FormClosing"), "#A2");
-#endif
Assert.AreEqual (1, log.CountEvents ("HandleDestroyed"), "#A3");
Assert.AreEqual (1, log.CountEvents ("Closed"), "#A4");
-#if NET_2_0
Assert.AreEqual (1, log.CountEvents ("FormClosed"), "#A5");
-#endif
Assert.AreEqual (0, log.CountEvents ("Disposed"), "#A6");
}
@@ -656,16 +648,12 @@ namespace MonoTests.System.Windows.Forms
f.ShowDialog ();
Assert.AreEqual ("VisibleChanged", f.Reason, "#B0");
-#if NET_2_0
Assert.AreEqual (1, log.CountEvents ("Closing"), "#B1");
Assert.AreEqual (1, log.CountEvents ("FormClosing"), "#B2");
-#endif
Assert.AreEqual (1, log.CountEvents ("HandleDestroyed"), "#B3");
-#if NET_2_0
Assert.AreEqual (1, log.CountEvents ("Closed"), "#B4");
Assert.AreEqual (1, log.CountEvents ("FormClosed"), "#B5");
-#endif
Assert.AreEqual (0, log.CountEvents ("Disposed"), "#B6");
}
@@ -677,15 +665,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("Bombed", f.Reason, "#C0");
Assert.AreEqual (1, log.CountEvents ("Closing"), "#C1");
-#if NET_2_0
Assert.AreEqual (1, log.CountEvents ("FormClosing"), "#C2");
-#endif
Assert.AreEqual (1, log.CountEvents ("HandleDestroyed"), "#C3");
Assert.AreEqual (1, log.CountEvents ("Closed"), "#C4");
-#if NET_2_0
Assert.AreEqual (1, log.CountEvents ("FormClosed"), "#C5");
-#endif
Assert.AreEqual (0, log.CountEvents ("Disposed"), "#C6");
Assert.AreEqual (DialogResult.Cancel, f.DialogResult, "#C7");
@@ -1359,13 +1343,13 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (WindowStyles.WS_TILED | WindowStyles.WS_TABSTOP | WindowStyles.WS_THICKFRAME | WindowStyles.WS_SYSMENU | WindowStyles.WS_CAPTION | WindowStyles.WS_CLIPCHILDREN, ((WindowStyles)TestHelper.GetCreateParams (frm).Style), "#22-Style");
Assert.AreEqual (WindowExStyles.WS_EX_LEFT | WindowExStyles.WS_EX_RIGHTSCROLLBAR | WindowExStyles.WS_EX_CONTROLPARENT | WindowExStyles.WS_EX_APPWINDOW, ((WindowExStyles)TestHelper.GetCreateParams (frm).ExStyle), "#22-ExStyle");
}
-#if NET_2_0
+
using (frm = new Form ()) {
frm.ShowIcon = !frm.ShowIcon;
Assert.AreEqual (WindowStyles.WS_TILED | WindowStyles.WS_TILEDWINDOW | WindowStyles.WS_CLIPCHILDREN, ((WindowStyles)TestHelper.GetCreateParams (frm).Style), "#23-Style");
Assert.AreEqual (WindowExStyles.WS_EX_LEFT | WindowExStyles.WS_EX_RIGHTSCROLLBAR | WindowExStyles.WS_EX_DLGMODALFRAME | WindowExStyles.WS_EX_CONTROLPARENT | WindowExStyles.WS_EX_APPWINDOW, ((WindowExStyles)TestHelper.GetCreateParams (frm).ExStyle), "#23-ExStyle");
}
-#endif
+
using (frm = new Form ()) {
frm.ShowInTaskbar = !frm.ShowInTaskbar;
Assert.AreEqual (WindowStyles.WS_TILED | WindowStyles.WS_TILEDWINDOW | WindowStyles.WS_CLIPCHILDREN, ((WindowStyles)TestHelper.GetCreateParams (frm).Style), "#24-Style");
@@ -2013,22 +1997,8 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (myform.IsDisposed, "A2");
myform.Close ();
-#if NET_2_0
- Assert.IsTrue (myform.IsDisposed, "A3");
-#else
- Assert.IsFalse (myform.Visible, "A4");
- Assert.IsFalse (myform.IsDisposed, "A5");
-
- myform.Show ();
-
- Assert.IsTrue (myform.Visible, "A6");
- Assert.IsFalse (myform.IsDisposed, "A7");
-
- myform.Close ();
- Assert.IsFalse (myform.Visible, "A8");
- Assert.IsTrue (myform.IsDisposed, "A9");
-#endif
+ Assert.IsTrue (myform.IsDisposed, "A3");
}
[Test]
@@ -2041,13 +2011,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (f.Visible, "A1");
f.Close ();
Assert.AreEqual (0, f.close_count, "A2");
-#if NET_2_0
Assert.IsTrue (f.IsDisposed, "A3");
-#else
- f.Show ();
- f.Close ();
- Assert.AreEqual (1, f.close_count, "A4");
-#endif
}
class WMCloseWatcher : Form {
@@ -2104,7 +2068,6 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#if NET_2_0
[Test]
public void FormClosingEvents ()
{
@@ -2307,7 +2270,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (new Size (292, 266), f.Size, "A3");
Assert.AreEqual (new Size (292, 266), f.ClientSize, "A4");
}
-#endif
[Test] // bug #438866
public void MinMaxSize ()
@@ -2475,7 +2437,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test]
public void AutoSizeGrowOnly ()
{
@@ -2609,7 +2570,7 @@ namespace MonoTests.System.Windows.Forms
base.ScaleControl (factor, specified);
}
}
-#endif
+
[Test]
public void Bug325436 ()
{
@@ -2638,7 +2599,6 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#if NET_2_0
#region PreferredSize
[Test]
public void PreferredSize ()
@@ -2667,7 +2627,7 @@ namespace MonoTests.System.Windows.Forms
}
}
#endregion
-#endif
+
private class MockForm : Form
{
public bool CloseOnLoad {
@@ -2741,7 +2701,6 @@ namespace MonoTests.System.Windows.Forms
private DialogResult _dialogResult = DialogResult.None;
}
-#if NET_2_0
[Test]
public void RestoreBounds ()
{
@@ -2904,7 +2863,6 @@ namespace MonoTests.System.Windows.Forms
f.AutoScaleMode = AutoScaleMode.None;
Assert.AreEqual (false, f.AutoScale, "A3");
}
-#endif
[Test] // Bug #359098
public void AutoScaleBounds ()
@@ -2926,7 +2884,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (new Rectangle ( 5, 5, 60, 47), new Rectangle (a.listBox1.Location, a.listBox1.Size), "A12");
a.Dispose ();
-#if NET_2_0
a = new AutoScaleForm (true);
a.Show ();
Assert.AreEqual (new Size (184, 104), a.ClientSize, "B0");
@@ -2943,7 +2900,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (new Rectangle ( 4, 54, 38, 12), new Rectangle (a.button1.Location, a.button1.ClientSize), "B11");
Assert.AreEqual (new Rectangle ( 4, 4, 50, 39), new Rectangle (a.listBox1.Location, a.listBox1.ClientSize), "B12");
a.Dispose ();
-#endif
}
[Test]
@@ -3043,11 +2999,9 @@ namespace MonoTests.System.Windows.Forms
textBox2, richTextBox1, listView1, treeView1, vScrollBar1, hScrollBar1 } );
if (use_new_auto_scale) {
-#if NET_2_0
AutoScaleMode = AutoScaleMode.Dpi;
SizeF s = CurrentAutoScaleDimensions;
AutoScaleDimensions = new SizeF (s.Width * 2, s.Height * 2);
-#endif
}
else {
AutoScale = true;
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/GroupBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/GroupBoxTest.cs
index 8ee31ac21c5..5daf8dabd70 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/GroupBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/GroupBoxTest.cs
@@ -30,12 +30,10 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (false, gb.TabStop, "A4");
Assert.AreEqual (string.Empty, gb.Text, "A5");
-#if NET_2_0
Assert.AreEqual (false, gb.AutoSize, "A6");
Assert.AreEqual (AutoSizeMode.GrowOnly, gb.AutoSizeMode, "A7");
Assert.AreEqual (true, gb.UseCompatibleTextRendering, "A8");
Assert.AreEqual ("System.Windows.Forms.GroupBox+GroupBoxAccessibleObject", gb.AccessibilityObject.GetType ().ToString (), "A9");
-#endif
}
[Test]
@@ -59,7 +57,6 @@ namespace MonoTests.System.Windows.Forms
myform.Dispose ();
}
-#if NET_2_0
[Test]
public void AutoSize ()
{
@@ -144,6 +141,5 @@ namespace MonoTests.System.Windows.Forms
base.ScaleControl (factor, specified);
}
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HScrollPropertiesTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HScrollPropertiesTest.cs
index 7e68df2946b..2c99b67c1cc 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HScrollPropertiesTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HScrollPropertiesTest.cs
@@ -26,7 +26,6 @@
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using NUnit.Framework;
using System.Drawing;
@@ -124,4 +123,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HelpProviderTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HelpProviderTest.cs
index f9e797355dd..31f020bb9f7 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HelpProviderTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/HelpProviderTest.cs
@@ -8,7 +8,6 @@ namespace MonoTests.System.Windows.Forms
[TestFixture]
public class HelpProviderTest : TestHelper
{
-#if NET_2_0
[Test]
public void HelpProviderPropertyTag ()
{
@@ -20,6 +19,5 @@ namespace MonoTests.System.Windows.Forms
md.Tag = s;
Assert.AreSame (s, md.Tag, "A2");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageKeyConverterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageKeyConverterTest.cs
index 535fff317e0..5fc1c7d9107 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageKeyConverterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageKeyConverterTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -102,4 +101,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListStreamerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListStreamerTest.cs
index b84b94c69de..f3ffac0d84e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListStreamerTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListStreamerTest.cs
@@ -62,7 +62,6 @@ namespace MonoTests.System.Windows.Forms
}
static byte [] _serialized = {
-#if NET_2_0
0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x02, 0x00,
0x00, 0x00, 0x57, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E,
@@ -313,258 +312,5 @@ namespace MonoTests.System.Windows.Forms
0x03, 0x00, 0x01, 0x40, 0x03, 0x00, 0x01, 0x20, 0x03, 0x00,
0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x06, 0x00, 0x01, 0x01,
0x16, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x02, 0x00, 0x0B };
-#else
- 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x02, 0x00,
- 0x00, 0x00, 0x5A, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E,
- 0x57, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x73, 0x2E, 0x46, 0x6F,
- 0x72, 0x6D, 0x73, 0x2C, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69,
- 0x6F, 0x6E, 0x3D, 0x31, 0x2E, 0x30, 0x2E, 0x35, 0x30, 0x30,
- 0x30, 0x2E, 0x30, 0x2C, 0x20, 0x43, 0x75, 0x6C, 0x74, 0x75,
- 0x72, 0x65, 0x3D, 0x6E, 0x65, 0x75, 0x74, 0x72, 0x61, 0x6C,
- 0x2C, 0x20, 0x50, 0x75, 0x62, 0x6C, 0x69, 0x63, 0x4B, 0x65,
- 0x79, 0x54, 0x6F, 0x6B, 0x65, 0x6E, 0x3D, 0x62, 0x37, 0x37,
- 0x61, 0x35, 0x63, 0x35, 0x36, 0x31, 0x39, 0x33, 0x34, 0x65,
- 0x30, 0x38, 0x39, 0x05, 0x01, 0x00, 0x00, 0x00, 0x26, 0x53,
- 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x57, 0x69, 0x6E, 0x64,
- 0x6F, 0x77, 0x73, 0x2E, 0x46, 0x6F, 0x72, 0x6D, 0x73, 0x2E,
- 0x49, 0x6D, 0x61, 0x67, 0x65, 0x4C, 0x69, 0x73, 0x74, 0x53,
- 0x74, 0x72, 0x65, 0x61, 0x6D, 0x65, 0x72, 0x01, 0x00, 0x00,
- 0x00, 0x04, 0x44, 0x61, 0x74, 0x61, 0x07, 0x02, 0x02, 0x00,
- 0x00, 0x00, 0x09, 0x03, 0x00, 0x00, 0x00, 0x0F, 0x03, 0x00,
- 0x00, 0x00, 0x0A, 0x09, 0x00, 0x00, 0x02, 0x4D, 0x53, 0x46,
- 0x74, 0x01, 0x49, 0x01, 0x4C, 0x02, 0x01, 0x01, 0x02, 0x01,
- 0x00, 0x01, 0x05, 0x01, 0x00, 0x01, 0x04, 0x01, 0x00, 0x01,
- 0x10, 0x01, 0x00, 0x01, 0x10, 0x01, 0x00, 0x04, 0xFF, 0x01,
- 0x09, 0x01, 0x00, 0x08, 0xFF, 0x01, 0x42, 0x01, 0x4D, 0x01,
- 0x36, 0x01, 0x04, 0x06, 0x00, 0x01, 0x36, 0x01, 0x04, 0x02,
- 0x00, 0x01, 0x28, 0x03, 0x00, 0x01, 0x40, 0x03, 0x00, 0x01,
- 0x20, 0x03, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x08, 0x06,
- 0x00, 0x01, 0x08, 0x18, 0x00, 0x01, 0x80, 0x02, 0x00, 0x01,
- 0x80, 0x03, 0x00, 0x02, 0x80, 0x01, 0x00, 0x01, 0x80, 0x03,
- 0x00, 0x01, 0x80, 0x01, 0x00, 0x01, 0x80, 0x01, 0x00, 0x02,
- 0x80, 0x02, 0x00, 0x03, 0xC0, 0x01, 0x00, 0x01, 0xC0, 0x01,
- 0xDC, 0x01, 0xC0, 0x01, 0x00, 0x01, 0xF0, 0x01, 0xCA, 0x01,
- 0xA6, 0x01, 0x00, 0x01, 0x33, 0x05, 0x00, 0x01, 0x33, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0x00, 0x01, 0x33, 0x01, 0x00, 0x02,
- 0x33, 0x02, 0x00, 0x03, 0x16, 0x01, 0x00, 0x03, 0x1C, 0x01,
- 0x00, 0x03, 0x22, 0x01, 0x00, 0x03, 0x29, 0x01, 0x00, 0x03,
- 0x55, 0x01, 0x00, 0x03, 0x4D, 0x01, 0x00, 0x03, 0x42, 0x01,
- 0x00, 0x03, 0x39, 0x01, 0x00, 0x01, 0x80, 0x01, 0x7C, 0x01,
- 0xFF, 0x01, 0x00, 0x02, 0x50, 0x01, 0xFF, 0x01, 0x00, 0x01,
- 0x93, 0x01, 0x00, 0x01, 0xD6, 0x01, 0x00, 0x01, 0xFF, 0x01,
- 0xEC, 0x01, 0xCC, 0x01, 0x00, 0x01, 0xC6, 0x01, 0xD6, 0x01,
- 0xEF, 0x01, 0x00, 0x01, 0xD6, 0x02, 0xE7, 0x01, 0x00, 0x01,
- 0x90, 0x01, 0xA9, 0x01, 0xAD, 0x02, 0x00, 0x01, 0xFF, 0x01,
- 0x33, 0x03, 0x00, 0x01, 0x66, 0x03, 0x00, 0x01, 0x99, 0x03,
- 0x00, 0x01, 0xCC, 0x02, 0x00, 0x01, 0x33, 0x03, 0x00, 0x02,
- 0x33, 0x02, 0x00, 0x01, 0x33, 0x01, 0x66, 0x02, 0x00, 0x01,
- 0x33, 0x01, 0x99, 0x02, 0x00, 0x01, 0x33, 0x01, 0xCC, 0x02,
- 0x00, 0x01, 0x33, 0x01, 0xFF, 0x02, 0x00, 0x01, 0x66, 0x03,
- 0x00, 0x01, 0x66, 0x01, 0x33, 0x02, 0x00, 0x02, 0x66, 0x02,
- 0x00, 0x01, 0x66, 0x01, 0x99, 0x02, 0x00, 0x01, 0x66, 0x01,
- 0xCC, 0x02, 0x00, 0x01, 0x66, 0x01, 0xFF, 0x02, 0x00, 0x01,
- 0x99, 0x03, 0x00, 0x01, 0x99, 0x01, 0x33, 0x02, 0x00, 0x01,
- 0x99, 0x01, 0x66, 0x02, 0x00, 0x02, 0x99, 0x02, 0x00, 0x01,
- 0x99, 0x01, 0xCC, 0x02, 0x00, 0x01, 0x99, 0x01, 0xFF, 0x02,
- 0x00, 0x01, 0xCC, 0x03, 0x00, 0x01, 0xCC, 0x01, 0x33, 0x02,
- 0x00, 0x01, 0xCC, 0x01, 0x66, 0x02, 0x00, 0x01, 0xCC, 0x01,
- 0x99, 0x02, 0x00, 0x02, 0xCC, 0x02, 0x00, 0x01, 0xCC, 0x01,
- 0xFF, 0x02, 0x00, 0x01, 0xFF, 0x01, 0x66, 0x02, 0x00, 0x01,
- 0xFF, 0x01, 0x99, 0x02, 0x00, 0x01, 0xFF, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0xFF, 0x02, 0x00, 0x01, 0xFF, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0x00, 0x01, 0x33, 0x01, 0x00, 0x01,
- 0x66, 0x01, 0x00, 0x01, 0x33, 0x01, 0x00, 0x01, 0x99, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x00, 0x01,
- 0x33, 0x01, 0x00, 0x01, 0xFF, 0x01, 0x00, 0x01, 0xFF, 0x01,
- 0x33, 0x02, 0x00, 0x03, 0x33, 0x01, 0x00, 0x02, 0x33, 0x01,
- 0x66, 0x01, 0x00, 0x02, 0x33, 0x01, 0x99, 0x01, 0x00, 0x02,
- 0x33, 0x01, 0xCC, 0x01, 0x00, 0x02, 0x33, 0x01, 0xFF, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0x66, 0x02, 0x00, 0x01, 0x33, 0x01,
- 0x66, 0x01, 0x33, 0x01, 0x00, 0x01, 0x33, 0x02, 0x66, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0x66, 0x01, 0x99, 0x01, 0x00, 0x01,
- 0x33, 0x01, 0x66, 0x01, 0xCC, 0x01, 0x00, 0x01, 0x33, 0x01,
- 0x66, 0x01, 0xFF, 0x01, 0x00, 0x01, 0x33, 0x01, 0x99, 0x02,
- 0x00, 0x01, 0x33, 0x01, 0x99, 0x01, 0x33, 0x01, 0x00, 0x01,
- 0x33, 0x01, 0x99, 0x01, 0x66, 0x01, 0x00, 0x01, 0x33, 0x02,
- 0x99, 0x01, 0x00, 0x01, 0x33, 0x01, 0x99, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0x99, 0x01, 0xFF, 0x01, 0x00, 0x01,
- 0x33, 0x01, 0xCC, 0x02, 0x00, 0x01, 0x33, 0x01, 0xCC, 0x01,
- 0x33, 0x01, 0x00, 0x01, 0x33, 0x01, 0xCC, 0x01, 0x66, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0xCC, 0x01, 0x99, 0x01, 0x00, 0x01,
- 0x33, 0x02, 0xCC, 0x01, 0x00, 0x01, 0x33, 0x01, 0xCC, 0x01,
- 0xFF, 0x01, 0x00, 0x01, 0x33, 0x01, 0xFF, 0x01, 0x33, 0x01,
- 0x00, 0x01, 0x33, 0x01, 0xFF, 0x01, 0x66, 0x01, 0x00, 0x01,
- 0x33, 0x01, 0xFF, 0x01, 0x99, 0x01, 0x00, 0x01, 0x33, 0x01,
- 0xFF, 0x01, 0xCC, 0x01, 0x00, 0x01, 0x33, 0x02, 0xFF, 0x01,
- 0x00, 0x01, 0x66, 0x03, 0x00, 0x01, 0x66, 0x01, 0x00, 0x01,
- 0x33, 0x01, 0x00, 0x01, 0x66, 0x01, 0x00, 0x01, 0x66, 0x01,
- 0x00, 0x01, 0x66, 0x01, 0x00, 0x01, 0x99, 0x01, 0x00, 0x01,
- 0x66, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x00, 0x01, 0x66, 0x01,
- 0x00, 0x01, 0xFF, 0x01, 0x00, 0x01, 0x66, 0x01, 0x33, 0x02,
- 0x00, 0x01, 0x66, 0x02, 0x33, 0x01, 0x00, 0x01, 0x66, 0x01,
- 0x33, 0x01, 0x66, 0x01, 0x00, 0x01, 0x66, 0x01, 0x33, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0x66, 0x01, 0x33, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x66, 0x01, 0x33, 0x01, 0xFF, 0x01, 0x00, 0x02,
- 0x66, 0x02, 0x00, 0x02, 0x66, 0x01, 0x33, 0x01, 0x00, 0x03,
- 0x66, 0x01, 0x00, 0x02, 0x66, 0x01, 0x99, 0x01, 0x00, 0x02,
- 0x66, 0x01, 0xCC, 0x01, 0x00, 0x01, 0x66, 0x01, 0x99, 0x02,
- 0x00, 0x01, 0x66, 0x01, 0x99, 0x01, 0x33, 0x01, 0x00, 0x01,
- 0x66, 0x01, 0x99, 0x01, 0x66, 0x01, 0x00, 0x01, 0x66, 0x02,
- 0x99, 0x01, 0x00, 0x01, 0x66, 0x01, 0x99, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x66, 0x01, 0x99, 0x01, 0xFF, 0x01, 0x00, 0x01,
- 0x66, 0x01, 0xCC, 0x02, 0x00, 0x01, 0x66, 0x01, 0xCC, 0x01,
- 0x33, 0x01, 0x00, 0x01, 0x66, 0x01, 0xCC, 0x01, 0x99, 0x01,
- 0x00, 0x01, 0x66, 0x02, 0xCC, 0x01, 0x00, 0x01, 0x66, 0x01,
- 0xCC, 0x01, 0xFF, 0x01, 0x00, 0x01, 0x66, 0x01, 0xFF, 0x02,
- 0x00, 0x01, 0x66, 0x01, 0xFF, 0x01, 0x33, 0x01, 0x00, 0x01,
- 0x66, 0x01, 0xFF, 0x01, 0x99, 0x01, 0x00, 0x01, 0x66, 0x01,
- 0xFF, 0x01, 0xCC, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x00, 0x01,
- 0xFF, 0x01, 0x00, 0x01, 0xFF, 0x01, 0x00, 0x01, 0xCC, 0x01,
- 0x00, 0x02, 0x99, 0x02, 0x00, 0x01, 0x99, 0x01, 0x33, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0x99, 0x01, 0x00, 0x01, 0x99, 0x01,
- 0x00, 0x01, 0x99, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x00, 0x01,
- 0x99, 0x03, 0x00, 0x01, 0x99, 0x02, 0x33, 0x01, 0x00, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0x66, 0x01, 0x00, 0x01, 0x99, 0x01,
- 0x33, 0x01, 0xCC, 0x01, 0x00, 0x01, 0x99, 0x01, 0x00, 0x01,
- 0xFF, 0x01, 0x00, 0x01, 0x99, 0x01, 0x66, 0x02, 0x00, 0x01,
- 0x99, 0x01, 0x66, 0x01, 0x33, 0x01, 0x00, 0x01, 0x99, 0x01,
- 0x33, 0x01, 0x66, 0x01, 0x00, 0x01, 0x99, 0x01, 0x66, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0x99, 0x01, 0x66, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x99, 0x01, 0x33, 0x01, 0xFF, 0x01, 0x00, 0x02,
- 0x99, 0x01, 0x33, 0x01, 0x00, 0x02, 0x99, 0x01, 0x66, 0x01,
- 0x00, 0x03, 0x99, 0x01, 0x00, 0x02, 0x99, 0x01, 0xCC, 0x01,
- 0x00, 0x02, 0x99, 0x01, 0xFF, 0x01, 0x00, 0x01, 0x99, 0x01,
- 0xCC, 0x02, 0x00, 0x01, 0x99, 0x01, 0xCC, 0x01, 0x33, 0x01,
- 0x00, 0x01, 0x66, 0x01, 0xCC, 0x01, 0x66, 0x01, 0x00, 0x01,
- 0x99, 0x01, 0xCC, 0x01, 0x99, 0x01, 0x00, 0x01, 0x99, 0x02,
- 0xCC, 0x01, 0x00, 0x01, 0x99, 0x01, 0xCC, 0x01, 0xFF, 0x01,
- 0x00, 0x01, 0x99, 0x01, 0xFF, 0x02, 0x00, 0x01, 0x99, 0x01,
- 0xFF, 0x01, 0x33, 0x01, 0x00, 0x01, 0x99, 0x01, 0xCC, 0x01,
- 0x66, 0x01, 0x00, 0x01, 0x99, 0x01, 0xFF, 0x01, 0x99, 0x01,
- 0x00, 0x01, 0x99, 0x01, 0xFF, 0x01, 0xCC, 0x01, 0x00, 0x01,
- 0x99, 0x02, 0xFF, 0x01, 0x00, 0x01, 0xCC, 0x03, 0x00, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0x33, 0x01, 0x00, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x66, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x00, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x00, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x99, 0x01, 0x33, 0x02, 0x00, 0x01, 0xCC, 0x02,
- 0x33, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x33, 0x01, 0x66, 0x01,
- 0x00, 0x01, 0xCC, 0x01, 0x33, 0x01, 0x99, 0x01, 0x00, 0x01,
- 0xCC, 0x01, 0x33, 0x01, 0xCC, 0x01, 0x00, 0x01, 0xCC, 0x01,
- 0x33, 0x01, 0xFF, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x66, 0x02,
- 0x00, 0x01, 0xCC, 0x01, 0x66, 0x01, 0x33, 0x01, 0x00, 0x01,
- 0x99, 0x02, 0x66, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x66, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x66, 0x01, 0xCC, 0x01,
- 0x00, 0x01, 0x99, 0x01, 0x66, 0x01, 0xFF, 0x01, 0x00, 0x01,
- 0xCC, 0x01, 0x99, 0x02, 0x00, 0x01, 0xCC, 0x01, 0x99, 0x01,
- 0x33, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x99, 0x01, 0x66, 0x01,
- 0x00, 0x01, 0xCC, 0x02, 0x99, 0x01, 0x00, 0x01, 0xCC, 0x01,
- 0x99, 0x01, 0xCC, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x99, 0x01,
- 0xFF, 0x01, 0x00, 0x02, 0xCC, 0x02, 0x00, 0x02, 0xCC, 0x01,
- 0x33, 0x01, 0x00, 0x02, 0xCC, 0x01, 0x66, 0x01, 0x00, 0x02,
- 0xCC, 0x01, 0x99, 0x01, 0x00, 0x03, 0xCC, 0x01, 0x00, 0x02,
- 0xCC, 0x01, 0xFF, 0x01, 0x00, 0x01, 0xCC, 0x01, 0xFF, 0x02,
- 0x00, 0x01, 0xCC, 0x01, 0xFF, 0x01, 0x33, 0x01, 0x00, 0x01,
- 0x99, 0x01, 0xFF, 0x01, 0x66, 0x01, 0x00, 0x01, 0xCC, 0x01,
- 0xFF, 0x01, 0x99, 0x01, 0x00, 0x01, 0xCC, 0x01, 0xFF, 0x01,
- 0xCC, 0x01, 0x00, 0x01, 0xCC, 0x02, 0xFF, 0x01, 0x00, 0x01,
- 0xCC, 0x01, 0x00, 0x01, 0x33, 0x01, 0x00, 0x01, 0xFF, 0x01,
- 0x00, 0x01, 0x66, 0x01, 0x00, 0x01, 0xFF, 0x01, 0x00, 0x01,
- 0x99, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x33, 0x02, 0x00, 0x01,
- 0xFF, 0x02, 0x33, 0x01, 0x00, 0x01, 0xFF, 0x01, 0x33, 0x01,
- 0x66, 0x01, 0x00, 0x01, 0xFF, 0x01, 0x33, 0x01, 0x99, 0x01,
- 0x00, 0x01, 0xFF, 0x01, 0x33, 0x01, 0xCC, 0x01, 0x00, 0x01,
- 0xFF, 0x01, 0x33, 0x01, 0xFF, 0x01, 0x00, 0x01, 0xFF, 0x01,
- 0x66, 0x02, 0x00, 0x01, 0xFF, 0x01, 0x66, 0x01, 0x33, 0x01,
- 0x00, 0x01, 0xCC, 0x02, 0x66, 0x01, 0x00, 0x01, 0xFF, 0x01,
- 0x66, 0x01, 0x99, 0x01, 0x00, 0x01, 0xFF, 0x01, 0x66, 0x01,
- 0xCC, 0x01, 0x00, 0x01, 0xCC, 0x01, 0x66, 0x01, 0xFF, 0x01,
- 0x00, 0x01, 0xFF, 0x01, 0x99, 0x02, 0x00, 0x01, 0xFF, 0x01,
- 0x99, 0x01, 0x33, 0x01, 0x00, 0x01, 0xFF, 0x01, 0x99, 0x01,
- 0x66, 0x01, 0x00, 0x01, 0xFF, 0x02, 0x99, 0x01, 0x00, 0x01,
- 0xFF, 0x01, 0x99, 0x01, 0xCC, 0x01, 0x00, 0x01, 0xFF, 0x01,
- 0x99, 0x01, 0xFF, 0x01, 0x00, 0x01, 0xFF, 0x01, 0xCC, 0x02,
- 0x00, 0x01, 0xFF, 0x01, 0xCC, 0x01, 0x33, 0x01, 0x00, 0x01,
- 0xFF, 0x01, 0xCC, 0x01, 0x66, 0x01, 0x00, 0x01, 0xFF, 0x01,
- 0xCC, 0x01, 0x99, 0x01, 0x00, 0x01, 0xFF, 0x02, 0xCC, 0x01,
- 0x00, 0x01, 0xFF, 0x01, 0xCC, 0x01, 0xFF, 0x01, 0x00, 0x02,
- 0xFF, 0x01, 0x33, 0x01, 0x00, 0x01, 0xCC, 0x01, 0xFF, 0x01,
- 0x66, 0x01, 0x00, 0x02, 0xFF, 0x01, 0x99, 0x01, 0x00, 0x02,
- 0xFF, 0x01, 0xCC, 0x01, 0x00, 0x02, 0x66, 0x01, 0xFF, 0x01,
- 0x00, 0x01, 0x66, 0x01, 0xFF, 0x01, 0x66, 0x01, 0x00, 0x01,
- 0x66, 0x02, 0xFF, 0x01, 0x00, 0x01, 0xFF, 0x02, 0x66, 0x01,
- 0x00, 0x01, 0xFF, 0x01, 0x66, 0x01, 0xFF, 0x01, 0x00, 0x02,
- 0xFF, 0x01, 0x66, 0x01, 0x00, 0x01, 0x21, 0x01, 0x00, 0x01,
- 0xA5, 0x01, 0x00, 0x03, 0x5F, 0x01, 0x00, 0x03, 0x77, 0x01,
- 0x00, 0x03, 0x86, 0x01, 0x00, 0x03, 0x96, 0x01, 0x00, 0x03,
- 0xCB, 0x01, 0x00, 0x03, 0xB2, 0x01, 0x00, 0x03, 0xD7, 0x01,
- 0x00, 0x03, 0xDD, 0x01, 0x00, 0x03, 0xE3, 0x01, 0x00, 0x03,
- 0xEA, 0x01, 0x00, 0x03, 0xF1, 0x01, 0x00, 0x03, 0xF8, 0x01,
- 0x00, 0x01, 0xF0, 0x01, 0xFB, 0x01, 0xFF, 0x01, 0x00, 0x01,
- 0xA4, 0x02, 0xA0, 0x01, 0x00, 0x03, 0x80, 0x03, 0x00, 0x01,
- 0xFF, 0x02, 0x00, 0x01, 0xFF, 0x03, 0x00, 0x02, 0xFF, 0x01,
- 0x00, 0x01, 0xFF, 0x03, 0x00, 0x01, 0xFF, 0x01, 0x00, 0x01,
- 0xFF, 0x01, 0x00, 0x02, 0xFF, 0x02, 0x00, 0x03, 0xFF, 0xFF,
- 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x05, 0x00, 0x10,
- 0x05, 0x01, 0x00, 0x04, 0xF8, 0x01, 0xAE, 0x01, 0xF8, 0x01,
- 0xAE, 0x04, 0x6D, 0x04, 0xEA, 0x20, 0x00, 0x01, 0x05, 0x0E,
- 0xFF, 0x01, 0x05, 0x01, 0x00, 0x01, 0xEA, 0x02, 0xEB, 0x01,
- 0xEF, 0x01, 0xF8, 0x01, 0xED, 0x01, 0xF8, 0x01, 0xED, 0x01,
- 0x6D, 0x02, 0xEC, 0x01, 0x13, 0x01, 0xED, 0x01, 0x12, 0x01,
- 0x15, 0x20, 0x00, 0x01, 0x05, 0x08, 0xFF, 0x04, 0x05, 0x02,
- 0xFF, 0x01, 0x05, 0x01, 0x00, 0x01, 0x59, 0x01, 0xF7, 0x01,
- 0xEB, 0x02, 0xED, 0x01, 0x07, 0x01, 0xEF, 0x01, 0x92, 0x01,
- 0xF8, 0x01, 0x07, 0x01, 0xED, 0x01, 0xEA, 0x01, 0xF8, 0x01,
- 0x13, 0x01, 0x59, 0x20, 0x00, 0x01, 0x05, 0x07, 0xFF, 0x05,
- 0x05, 0x02, 0xFF, 0x01, 0x05, 0x01, 0x00, 0x01, 0x43, 0x06,
- 0x91, 0x03, 0xAE, 0x02, 0x6D, 0x02, 0xEA, 0x01, 0x43, 0x20,
- 0x00, 0x01, 0x05, 0x06, 0xFF, 0x06, 0x05, 0x02, 0xFF, 0x01,
- 0x05, 0x01, 0x00, 0x01, 0xAE, 0x01, 0xEB, 0x05, 0xAE, 0x02,
- 0x6C, 0x03, 0x66, 0x02, 0x15, 0x01, 0x43, 0x20, 0x00, 0x01,
- 0x05, 0x05, 0xFF, 0x07, 0x05, 0x02, 0xFF, 0x01, 0x05, 0x01,
- 0x00, 0x01, 0xAE, 0x02, 0x6D, 0x03, 0xAE, 0x01, 0x8B, 0x01,
- 0x6C, 0x03, 0x66, 0x01, 0x15, 0x01, 0x43, 0x02, 0x11, 0x20,
- 0x00, 0x01, 0x05, 0x04, 0xFF, 0x08, 0x05, 0x02, 0xFF, 0x01,
- 0x05, 0x01, 0x00, 0x01, 0xAE, 0x02, 0xF1, 0x01, 0x14, 0x05,
- 0xAE, 0x01, 0x66, 0x01, 0xEA, 0x01, 0x15, 0x01, 0x14, 0x01,
- 0x15, 0x01, 0x11, 0x20, 0x00, 0x01, 0x05, 0x03, 0xFF, 0x05,
- 0x05, 0x01, 0xFF, 0x03, 0x05, 0x02, 0xFF, 0x01, 0x05, 0x01,
- 0x00, 0x01, 0xAE, 0x01, 0xFF, 0x01, 0xAE, 0x01, 0x12, 0x01,
- 0xF7, 0x01, 0xEF, 0x01, 0x07, 0x01, 0x6D, 0x01, 0xF7, 0x01,
- 0x6D, 0x01, 0xEA, 0x01, 0xEB, 0x01, 0xEF, 0x01, 0x12, 0x01,
- 0x11, 0x20, 0x00, 0x01, 0x05, 0x02, 0xFF, 0x05, 0x05, 0x02,
- 0xFF, 0x03, 0x05, 0x02, 0xFF, 0x01, 0x05, 0x01, 0x00, 0x02,
- 0xAE, 0x01, 0x92, 0x01, 0x12, 0x01, 0x91, 0x02, 0xAE, 0x01,
- 0x8B, 0x01, 0x6C, 0x03, 0x66, 0x01, 0x15, 0x01, 0x43, 0x01,
- 0x11, 0x20, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x05, 0x05, 0x03,
- 0xFF, 0x03, 0x05, 0x02, 0xFF, 0x01, 0x05, 0x01, 0x00, 0x01,
- 0xAE, 0x02, 0x91, 0x01, 0x12, 0x01, 0xEB, 0x02, 0xEF, 0x01,
- 0xED, 0x01, 0x43, 0x01, 0x66, 0x01, 0x43, 0x01, 0x07, 0x01,
- 0x13, 0x01, 0xF7, 0x01, 0x11, 0x20, 0x00, 0x01, 0x05, 0x01,
- 0xFF, 0x04, 0x05, 0x04, 0xFF, 0x03, 0x05, 0x02, 0xFF, 0x01,
- 0x05, 0x01, 0x00, 0x01, 0x6D, 0x02, 0xEC, 0x01, 0x12, 0x01,
- 0xF7, 0x02, 0xFF, 0x02, 0xED, 0x01, 0x66, 0x03, 0x43, 0x01,
- 0x14, 0x01, 0x11, 0x20, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x03,
- 0x05, 0x05, 0xFF, 0x03, 0x05, 0x02, 0xFF, 0x01, 0x05, 0x01,
- 0x00, 0x01, 0x07, 0x01, 0xEC, 0x01, 0xED, 0x01, 0x12, 0x01,
- 0xF7, 0x02, 0xFF, 0x01, 0x11, 0x01, 0x07, 0x04, 0x15, 0x02,
- 0x43, 0x20, 0x00, 0x01, 0x05, 0x01, 0xFF, 0x03, 0x05, 0x05,
- 0xFF, 0x03, 0x05, 0x02, 0xFF, 0x01, 0x05, 0x01, 0x00, 0x01,
- 0x07, 0x02, 0x14, 0x01, 0x12, 0x01, 0xEF, 0x01, 0xFF, 0x01,
- 0xF5, 0x01, 0xF4, 0x01, 0x14, 0x01, 0xF1, 0x01, 0x66, 0x01,
- 0xF2, 0x01, 0xF8, 0x01, 0xF4, 0x01, 0x12, 0x20, 0x00, 0x01,
- 0x05, 0x01, 0xFF, 0x03, 0x05, 0x05, 0xFF, 0x03, 0x05, 0x02,
- 0xFF, 0x01, 0x05, 0x01, 0x00, 0x01, 0xF7, 0x02, 0xF4, 0x01,
- 0x6D, 0x01, 0xED, 0x01, 0x91, 0x02, 0xAE, 0x01, 0x6D, 0x04,
- 0x66, 0x02, 0x43, 0x20, 0x00, 0x01, 0x05, 0x0E, 0xFF, 0x01,
- 0x05, 0x01, 0x00, 0x01, 0xEC, 0x01, 0xED, 0x03, 0x92, 0x01,
- 0xED, 0x02, 0xAE, 0x01, 0x6D, 0x01, 0xEA, 0x03, 0x66, 0x01,
- 0x15, 0x01, 0x43, 0x20, 0x00, 0x10, 0x05, 0x30, 0x00, 0x01,
- 0x42, 0x01, 0x4D, 0x01, 0x3E, 0x07, 0x00, 0x01, 0x3E, 0x03,
- 0x00, 0x01, 0x28, 0x03, 0x00, 0x01, 0x40, 0x03, 0x00, 0x01,
- 0x20, 0x03, 0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x06,
- 0x00, 0x01, 0x01, 0x16, 0x00, 0x03, 0xFF, 0xFF, 0x00, 0x02,
- 0x00, 0x0B };
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListTest.cs
index eb003ede143..62893b6c04b 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ImageListTest.cs
@@ -63,7 +63,6 @@ namespace MonoTests.System.Windows.Forms
ImageList il = new ImageList ();
// test its defaults
-#if NET_2_0
Assert.IsTrue (colordepth_prop.ShouldSerializeValue (il), "1");
Assert.IsTrue (colordepth_prop.CanResetValue (il), "2");
Assert.IsTrue (imagesize_prop.ShouldSerializeValue (il), "3");
@@ -110,56 +109,6 @@ namespace MonoTests.System.Windows.Forms
il.ImageSize = new Size (32, 32);
Assert.IsFalse (imagesize_prop.ShouldSerializeValue (il), "23");
Assert.IsFalse (imagesize_prop.CanResetValue (il), "24");
-#else
-
- Assert.IsFalse (colordepth_prop.ShouldSerializeValue (il), "1");
- Assert.IsFalse (colordepth_prop.CanResetValue (il), "2");
- Assert.IsFalse (imagesize_prop.ShouldSerializeValue (il), "3");
- Assert.IsFalse (imagesize_prop.CanResetValue (il), "4");
- Assert.IsTrue (transparentcolor_prop.ShouldSerializeValue (il), "5");
- Assert.IsFalse (transparentcolor_prop.CanResetValue (il), "6");
-
- // test what happens when we set the transparent color to LightGray
- il.TransparentColor = Color.LightGray;
- Assert.IsFalse (transparentcolor_prop.ShouldSerializeValue (il), "7");
- Assert.IsFalse (transparentcolor_prop.CanResetValue (il), "8");
-
- // test what happens when we set the depth to something other than the default
- il.ColorDepth = ColorDepth.Depth16Bit;
- Assert.IsTrue (colordepth_prop.ShouldSerializeValue (il), "9");
- Assert.IsTrue (colordepth_prop.CanResetValue (il), "10");
-
- // same test for ImageSize
- il.ImageSize = new Size (32, 32);
- Assert.IsTrue (imagesize_prop.ShouldSerializeValue (il), "11");
- Assert.IsFalse (imagesize_prop.CanResetValue (il), "12");
-
- // create an ImageList containing an image
- il = new ImageList ();
- il.Images.Add (Image.FromFile ("M.gif"));
-
- Assert.IsFalse (colordepth_prop.ShouldSerializeValue (il), "13");
- Assert.IsFalse (colordepth_prop.CanResetValue (il), "14");
- Assert.IsFalse (imagesize_prop.ShouldSerializeValue (il), "15");
- Assert.IsFalse (imagesize_prop.CanResetValue (il), "16");
- Assert.IsTrue (transparentcolor_prop.ShouldSerializeValue (il), "17");
- Assert.IsFalse (transparentcolor_prop.CanResetValue (il), "18");
-
- // test what happens when we set the transparent color to LightGray
- il.TransparentColor = Color.LightGray;
- Assert.IsFalse (transparentcolor_prop.ShouldSerializeValue (il), "19");
- Assert.IsFalse (transparentcolor_prop.CanResetValue (il), "20");
-
- // test what happens when we set the depth to something other than the default
- il.ColorDepth = ColorDepth.Depth16Bit;
- Assert.IsTrue (colordepth_prop.ShouldSerializeValue (il), "21");
- Assert.IsTrue (colordepth_prop.CanResetValue (il), "22");
-
- // same test for ImageSize
- il.ImageSize = new Size (32, 32);
- Assert.IsTrue (imagesize_prop.ShouldSerializeValue (il), "23");
- Assert.IsFalse (imagesize_prop.CanResetValue (il), "24");
-#endif
}
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/InputLanguageTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/InputLanguageTest.cs
index fcce4ea1067..458da89effa 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/InputLanguageTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/InputLanguageTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -51,4 +50,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeyEventArgsTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeyEventArgsTest.cs
index 610cb1d679e..5e77f3d9a9c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeyEventArgsTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeyEventArgsTest.cs
@@ -20,7 +20,6 @@ namespace MonoTests.System.Windows.Forms
[TestFixture]
public class KeyEventArgsTest : TestHelper
{
-#if NET_2_0
[Test]
public void SuppressKeyPressTest ()
{
@@ -40,6 +39,5 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (kea.Handled, "#06");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeysConverterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeysConverterTest.cs
index 7ffce719c4e..8d50d25c698 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeysConverterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/KeysConverterTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -48,4 +47,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LabelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LabelTest.cs
index dcaf0b5ca51..fee5db740e3 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LabelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LabelTest.cs
@@ -66,7 +66,6 @@ namespace MonoTests.System.Windows.Forms
l.BorderStyle = BorderStyle.Fixed3D;
Assert.AreEqual (l.PreferredHeight, (l.Font.Height + 6), "#4");
-#if NET_2_0
l.UseCompatibleTextRendering = false;
l.BorderStyle = BorderStyle.None;
@@ -77,7 +76,6 @@ namespace MonoTests.System.Windows.Forms
l.BorderStyle = BorderStyle.Fixed3D;
Assert.AreEqual (l.PreferredHeight, (l.Font.Height), "#7");
-#endif
}
[Test]
@@ -114,11 +112,7 @@ namespace MonoTests.System.Windows.Forms
// Height: autosize = false
Assert.IsFalse (l1.Height.Equals (l2.Height), "#7");
Assert.IsTrue (l1.Height.Equals (l3.Height), "#8");
-#if NET_2_0
Assert.IsTrue ((l4.Height > l1.Height), "#9");
-#else
- Assert.IsTrue (l1.Height.Equals (l4.Height), "#9");
-#endif
// Width: autosize = false
Assert.IsFalse (l1.Width.Equals (l2.Width), "#10");
@@ -252,7 +246,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("System.Windows.Forms.Label, Text: My Label", l.ToString (), "T1");
}
-#if NET_2_0
[Test]
public void AutoSizeExplicitSize ()
{
@@ -331,7 +324,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, b.ImageIndex, "D14");
Assert.AreEqual (string.Empty, b.ImageKey, "D15");
}
-#endif
}
[TestFixture]
@@ -348,9 +340,7 @@ namespace MonoTests.System.Windows.Forms
eventhandled = true;
}
-#if NET_2_0
[Ignore ("AutoSize moved to Control in 2.0, Label.AutoSize needs to be reworked a bit.")]
-#endif
[Test]
public void AutoSizeChangedChangedTest ()
{
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkAreaTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkAreaTest.cs
index ead19b99161..e39810fdbe0 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkAreaTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkAreaTest.cs
@@ -8,7 +8,6 @@ namespace MonoTests.System.Windows.Forms
[TestFixture]
public class LinkAreaTest : TestHelper
{
-#if NET_2_0
[Test]
public void LinkAreaToString ()
{
@@ -45,6 +44,5 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (l1 != l2, "A2");
Assert.IsTrue (l2 != l3, "A3");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkConverterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkConverterTest.cs
index 3a7a1e41f27..72fef9218ec 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkConverterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkConverterTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -92,4 +91,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkLabelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkLabelTest.cs
index 6225050f1a4..eef9db50b98 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkLabelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/LinkLabelTest.cs
@@ -61,12 +61,8 @@ namespace MonoTests.System.Windows.Forms
l.Text = "linkLabel1";
form.Controls.Add (l);
-#if NET_2_0
LinkLabel.Link link = new LinkLabel.Link (2, 5);
l.Links.Add (link);
-#else
- l.Links.Add (2, 5);
-#endif
form.Show ();
form.Dispose ();
@@ -98,7 +94,6 @@ namespace MonoTests.System.Windows.Forms
}
-#if NET_2_0
[TestFixture]
public class LinkTest : TestHelper
{
@@ -139,7 +134,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (false, l.Visited, "A24");
}
}
-#endif
[TestFixture]
public class LinkCollectionTest : TestHelper
@@ -157,32 +151,22 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, links1.Count, "#A1");
Assert.IsFalse (links1.IsReadOnly, "#A2");
-#if NET_2_0
Assert.IsFalse (links1.LinksAdded, "#A3");
-#endif
LinkLabel.Link link = links1 [0];
-#if NET_2_0
Assert.IsNull (link.Description, "#B1");
-#endif
Assert.IsTrue (link.Enabled, "#B2");
Assert.AreEqual (21, link.Length, "#B3");
Assert.IsNull (link.LinkData, "#B4");
-#if NET_2_0
Assert.IsNotNull (link.Name, "#B5");
Assert.AreEqual (string.Empty, link.Name, "#B6");
-#endif
Assert.AreEqual (0, link.Start, "#B7");
-#if NET_2_0
Assert.IsNull (link.Tag, "#B8");
-#endif
Assert.IsFalse (link.Visited, "#B9");
Assert.AreEqual (1, links2.Count, "#C1");
Assert.IsFalse (links2.IsReadOnly, "#C2");
-#if NET_2_0
Assert.IsFalse (links2.LinksAdded, "#C3");
-#endif
Assert.AreSame (link, links2 [0], "#C4");
}
@@ -201,7 +185,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test] // Add (LinkLabel.Link)
public void Add1 ()
{
@@ -314,7 +297,6 @@ namespace MonoTests.System.Windows.Forms
} catch (NullReferenceException) {
}
}
-#endif
[Test] // Add (int, int)
public void Add2 ()
@@ -330,20 +312,16 @@ namespace MonoTests.System.Windows.Forms
LinkLabel.Link linkA = links1.Add (0, 7);
Assert.AreEqual (1, links1.Count, "#A1");
Assert.AreEqual (1, links2.Count, "#A2");
-#if NET_2_0
Assert.IsTrue (links1.LinksAdded, "#A3");
Assert.IsFalse (links2.LinksAdded, "#A4");
-#endif
Assert.AreSame (linkA, links1 [0], "#A5");
Assert.AreSame (linkA, links2 [0], "#A6");
LinkLabel.Link linkB = links1.Add (8, 7);
Assert.AreEqual (2, links1.Count, "#B1");
Assert.AreEqual (2, links2.Count, "#B2");
-#if NET_2_0
Assert.IsTrue (links1.LinksAdded, "#B3");
Assert.IsFalse (links2.LinksAdded, "#B4");
-#endif
Assert.AreSame (linkA, links1 [0], "#B5");
Assert.AreSame (linkA, links2 [0], "#B6");
Assert.AreSame (linkB, links1 [1], "#B7");
@@ -352,9 +330,7 @@ namespace MonoTests.System.Windows.Forms
LinkLabel.LinkCollection links3 = new LinkLabel.LinkCollection (
l);
Assert.AreEqual (2, links3.Count, "#C1");
-#if NET_2_0
Assert.IsFalse (links3.LinksAdded, "#C2");
-#endif
Assert.AreSame (linkA, links3 [0], "#C3");
Assert.AreSame (linkB, links3 [1], "#C4");
}
@@ -370,9 +346,7 @@ namespace MonoTests.System.Windows.Forms
LinkLabel.Link linkA = links.Add (0, 7);
Assert.AreEqual (1, links.Count, "#A1");
-#if NET_2_0
Assert.IsTrue (links.LinksAdded, "#A2");
-#endif
Assert.AreSame (linkA, links [0], "#A3");
try {
@@ -386,9 +360,7 @@ namespace MonoTests.System.Windows.Forms
}
Assert.AreEqual (2, links.Count, "#B5");
-#if NET_2_0
Assert.IsTrue (links.LinksAdded, "#B6");
-#endif
Assert.AreSame (linkA, links [0], "#B7");
Assert.IsNotNull (links [1], "#B8");
Assert.AreEqual (0, linkA.Start, "#B9");
@@ -407,9 +379,7 @@ namespace MonoTests.System.Windows.Forms
}
Assert.AreEqual (3, links.Count, "#C5");
-#if NET_2_0
Assert.IsTrue (links.LinksAdded, "#C6");
-#endif
Assert.AreSame (linkA, links [0], "#C7");
Assert.IsNotNull (links [1], "#C8");
Assert.IsNotNull (links [2], "#C9");
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBindingHelperTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBindingHelperTest.cs
index f8ec2acf3d1..e31996a5d6e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBindingHelperTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBindingHelperTest.cs
@@ -26,7 +26,6 @@
// (C) 2008 Novell, Inc. (http://www.novell.com)
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -478,4 +477,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
index c72999b8ac9..ce2032a93a2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListBoxTest.cs
@@ -270,7 +270,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (0, x, "#207");
}
-#if NET_2_0
[Test]
public void AllowSelection ()
{
@@ -280,7 +279,6 @@ namespace MonoTests.System.Windows.Forms
lb.SelectionMode = SelectionMode.One;
Assert.IsTrue (lb.allow_selection, "#2");
}
-#endif
//
// Exceptions
@@ -358,7 +356,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, listBox.SelectedIndex, "#4");
}
-#if NET_2_0
[Test]
public void SelectedIndex_Removed ()
{
@@ -501,7 +498,6 @@ namespace MonoTests.System.Windows.Forms
} catch (ArgumentException) {
}
}
-#endif
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
@@ -587,12 +583,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("item", ex.ParamName, "#5");
}
-#if NET_2_0
Assert.AreEqual (1, l.Items.Count, "#6");
Assert.AreEqual ("A", l.Items [0], "#7");
-#else
- Assert.AreEqual (0, l.Items.Count, "#6");
-#endif
}
[Test]
@@ -623,7 +615,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test]
public void GetScaledBoundsTest ()
{
@@ -693,7 +684,6 @@ namespace MonoTests.System.Windows.Forms
base.ScaleControl (factor, specified);
}
}
-#endif
[Test]
public void MethodIsInputChar ()
@@ -818,11 +808,9 @@ namespace MonoTests.System.Windows.Forms
public class MockListBox : ListBox
{
-#if NET_2_0
public bool allow_selection {
get { return base.AllowSelection; }
}
-#endif
public void InvokeSetItemsCore (IList value)
{
@@ -1010,11 +998,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
-#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#5");
-#else
- Assert.IsNotNull (ex.ParamName, "#5");
-#endif
}
}
@@ -1053,18 +1037,12 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
-#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#5");
-#else
- Assert.IsNotNull (ex.ParamName, "#5");
-#endif
}
}
[Test]
-#if NET_2_0
[NUnit.Framework.Category ("NotDotNet")] // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=363285
-#endif
public void Insert_Item_Null ()
{
col.Add ("Item1");
@@ -1114,7 +1092,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[TestFixture]
public class ListBoxIntegerCollectionTest : TestHelper
{
@@ -1657,5 +1634,4 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, list.Count, "#6");
}
}
-#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListControlTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListControlTest.cs
index d37fed9e21c..208297329d6 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListControlTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListControlTest.cs
@@ -28,9 +28,7 @@
using System;
using System.Collections;
-#if NET_2_0
using System.ComponentModel;
-#endif
using System.IO;
using System.Data;
using System.Globalization;
@@ -324,7 +322,6 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#if NET_2_0
[Test] // bug #81771
public void DataSource_BindingList1 ()
{
@@ -441,7 +438,6 @@ namespace MonoTests.System.Windows.Forms
lc.FormatString = CultureInfo.CurrentCulture.NumberFormat.ToString ();
Assert.AreEqual (true, refresh_items_called, "C1");
}
-#endif
void ListControl_DataSourceChanged (object sender, EventArgs e)
{
@@ -479,11 +475,9 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
public bool allow_selection {
get { return base.AllowSelection; }
}
-#endif
public object FilterItem (object obj, string field)
{
@@ -494,7 +488,6 @@ namespace MonoTests.System.Windows.Forms
{
}
-#if NET_2_0
protected override void RefreshItems ()
{
base.RefreshItems ();
@@ -504,7 +497,6 @@ namespace MonoTests.System.Windows.Forms
}
public event EventHandler RefreshingItems;
-#endif
protected override void SetItemsCore (IList items)
{
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewCollectionsTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewCollectionsTest.cs
index 9293d65ab48..92d62ad94f2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewCollectionsTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewCollectionsTest.cs
@@ -221,7 +221,6 @@ namespace MonoTests.System.Windows.Forms
((IList)listview.CheckedItems).Add (5);
}
-#if NET_2_0
[Test, ExpectedException (typeof (InvalidOperationException))]
public void CheckedItemCollectionTest_ContainsKey_ExceptionTest ()
{
@@ -261,7 +260,6 @@ namespace MonoTests.System.Windows.Forms
listview.VirtualMode = true;
listview.CheckedItems.IndexOfKey (String.Empty);
}
-#endif
[Test]
public void CheckedItemCollectionTest_Indexer_ExceptionTest ()
@@ -281,7 +279,6 @@ namespace MonoTests.System.Windows.Forms
} catch (ArgumentOutOfRangeException) {
}
-#if NET_2_0
listview.VirtualMode = true;
try {
@@ -295,7 +292,6 @@ namespace MonoTests.System.Windows.Forms
Assert.Fail ("#A4");
} catch (InvalidOperationException) {
}
-#endif
// Avoid mcs 168 warning
Assert.IsNull (item, "#A5");
}
@@ -373,19 +369,13 @@ namespace MonoTests.System.Windows.Forms
ListView listview = new ListView ();
// Properties
-#if !NET_2_0
- Assert.AreEqual (true, listview.SelectedIndices.IsReadOnly, "SelectedIndexCollectionTest_PropertiesTest#1");
- Assert.AreEqual (true, ((IList)listview.SelectedIndices).IsFixedSize, "SelectedIndexCollectionTest_PropertiesTest#4");
-#else
Assert.AreEqual (false, listview.SelectedIndices.IsReadOnly, "SelectedIndexCollectionTest_PropertiesTest#1");
Assert.AreEqual (false, ((IList)listview.SelectedIndices).IsFixedSize, "SelectedIndexCollectionTest_PropertiesTest#4");
-#endif
Assert.AreEqual (false, ((ICollection)listview.SelectedIndices).IsSynchronized, "SelectedIndexCollectionTest_PropertiesTest#2");
Assert.AreEqual (listview.SelectedIndices, ((ICollection)listview.SelectedIndices).SyncRoot, "SelectedIndexCollectionTest_PropertiesTest#3");
Assert.AreEqual (0, listview.SelectedIndices.Count, "SelectedIndexCollectionTest_PropertiesTest#5");
}
-#if NET_2_0
[Test]
public void SelectedIndexCollectionTest_AddTest ()
{
@@ -635,24 +625,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (false, listview.Items [0].Selected, "SelectedIndexCollectionTest_RemoveTest#18");
listview.Dispose ();
}
-#endif
// Exceptions
-#if !NET_2_0
- [Test, ExpectedException (typeof (NotSupportedException))]
- public void SelectedIndexCollectionTest_Add_ExceptionTest ()
- {
- ListView listview = new ListView ();
- ((IList)listview.SelectedIndices).Add (5);
- }
-
- [Test, ExpectedException (typeof (NotSupportedException))]
- public void SelectedIndexCollectionTest_Remove_ExceptionTest ()
- {
- ListView listview = new ListView ();
- ((IList)listview.SelectedIndices).Remove (5);
- }
-#endif
[Test, ExpectedException (typeof (NotSupportedException))]
public void SelectedIndexCollectionTest_RemoveAt_ExceptionTest ()
@@ -661,7 +635,6 @@ namespace MonoTests.System.Windows.Forms
((IList)listview.SelectedIndices).RemoveAt (5);
}
-#if NET_2_0
[Test]
public void SelectedIndexCollectionTest_Remove_ExceptionTest ()
{
@@ -711,7 +684,6 @@ namespace MonoTests.System.Windows.Forms
} catch (ArgumentOutOfRangeException) {
}
}
-#endif
/*
SelectedItemCollection
@@ -929,7 +901,6 @@ namespace MonoTests.System.Windows.Forms
form.Dispose ();
}
-#if NET_2_0
[Test]
public void SelectedItemCollectionTest_IndexOfKey ()
{
@@ -1013,7 +984,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (lvi6, lvw.SelectedItems ["F name"], "#B2");
lvw.Dispose ();
}
-#endif
[Test]
public void SelectedItemCollectionTest_Order ()
@@ -1094,7 +1064,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreSame (item, lvw.Items [0], "#C7");
}
-#if NET_2_0
[Test]
public void ListViewItemCollectionTest_Add_Group ()
{
@@ -1164,7 +1133,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, lvg2.Items.Count, "#G2");
Assert.AreEqual (lvg2, lvi.Group, "#G3");
}
-#endif
[Test]
[ExpectedException (typeof (ArgumentException))] // An item cannot be added more than once. To add an item again, you need to clone it
@@ -1192,28 +1160,21 @@ namespace MonoTests.System.Windows.Forms
ListViewItem item4 = lv1.Items.Add("Item4", 4);
Assert.AreEqual(item4, lv1.Items[0], "#D1");
-#if NET_2_0
Assert.AreEqual(string.Empty, lv1.Items[0].Name, "#D2");
-#endif
Assert.AreEqual("Item4", lv1.Items[0].Text, "#D3");
Assert.AreEqual(4, lv1.Items[0].ImageIndex, "#D4");
string text = null;
ListViewItem item5 = lv1.Items.Add(text);
Assert.AreEqual(item5, lv1.Items[1], "#E1");
-#if NET_2_0
Assert.AreEqual(string.Empty, lv1.Items[1].Name, "#E2");
-#endif
Assert.AreEqual(string.Empty, lv1.Items[1].Text, "#E3");
ListViewItem item6 = lv1.Items.Add(null, 5);
Assert.AreEqual(item6, lv1.Items[2], "#F1");
-#if NET_2_0
Assert.AreEqual(string.Empty, lv1.Items[2].Name, "#F2");
-#endif
Assert.AreEqual(string.Empty, lv1.Items[2].Text, "#F3");
Assert.AreEqual(5, lv1.Items[2].ImageIndex, "#F4");
-#if NET_2_0
ListViewItem item1 = lv1.Items.Add("ItemKey1", "Item1", 1);
Assert.AreEqual(item1, lv1.Items[3], "#A1");
Assert.AreEqual("ItemKey1", lv1.Items[3].Name, "#A2");
@@ -1249,7 +1210,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual("ItemKey8", lv1.Items[8].Name, "#I2");
Assert.AreEqual("Item8", lv1.Items[8].Text, "#I3");
Assert.AreEqual(string.Empty, lv1.Items[8].ImageKey, "#I4");
-#endif
}
[Test]
@@ -1336,7 +1296,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNull (itemA.ListView, "#B2");
Assert.IsNull (itemB.ListView, "#B3");
}
-#if NET_2_0
[Test]
public void ListViewItemCollectionTest_Clear_Groups ()
{
@@ -1403,7 +1362,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (null, itemA.Group, "#F5");
//Assert.AreEqual (null, itemB.Group, "#F6"); // Bogus impl again
}
-#endif
[Test]
public void ListViewItemCollectionTest_Insert ()
@@ -1452,7 +1410,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (2, item.Index, "#E6");
Assert.AreSame (item, lvw.Items [2], "#E7");
}
-#if NET_2_0
[Test]
public void ListViewItemCollectionTest_Insert_Group ()
{
@@ -1522,7 +1479,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, lvg2.Items.Count, "#G2");
Assert.AreEqual (lvg2, lvi.Group, "#G3");
}
-#endif
[Test]
[ExpectedException (typeof (ArgumentException))] // An item cannot be added more than once. To add an item again, you need to clone it
@@ -1617,7 +1573,6 @@ namespace MonoTests.System.Windows.Forms
form.Dispose ();
}
-#if NET_2_0
[Test]
public void ListViewItemCollectionTest_Remove_Groups ()
{
@@ -1670,7 +1625,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (lvw, itemA.ListView, "#F3");
Assert.AreEqual (null, itemA.Group, "#F4");
}
-#endif
[Test]
public void ListViewItemCollectionTest_RemoveAt ()
@@ -1751,7 +1705,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (2, lv.Items.Count);
}
-#if NET_2_0
[Test]
public void ListViewItemCollectionTest_RemoveByKey ()
{
@@ -2106,7 +2059,6 @@ namespace MonoTests.System.Windows.Forms
{
args.Item = items [args.ItemIndex];
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupCollectionTest.cs
index 8005c4f9111..212feb34acf 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupCollectionTest.cs
@@ -26,7 +26,6 @@
// Daniel Nauck (dna(at)mono-project(dot)de)
// Carlos Alberto Cortez <calberto.cortez@gmail.com>
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -216,4 +215,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupTest.cs
index a6e666fbdf5..6040ec3871a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewGroupTest.cs
@@ -25,7 +25,6 @@
// Author:
// Daniel Nauck (dna(at)mono-project(dot)de)
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -114,4 +113,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs
index c63088e2a71..ce189e247de 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewItemTest.cs
@@ -194,7 +194,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (string.Empty, item.SubItems [0].Text, "#7");
}
-#if NET_2_0
[Test]
public void Constructor9_Text_Null ()
{
@@ -326,7 +325,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (String.Empty, item2.ToolTipText, "#A19");
Assert.AreEqual (item.Group.Header, item2.Group.Header, "#A20");
}
-#endif
[Test]
public void ListViewItemDefaultValues ()
@@ -338,12 +336,10 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (string.Empty, item.Text, "DefaultValues#5");
Assert.IsTrue (item.UseItemStyleForSubItems, "DefaultValues#6");
Assert.AreEqual (-1, item.ImageIndex, "DefaultValues#7");
-#if NET_2_0
Assert.AreEqual (String.Empty, item.Name, "DefaultValues#8");
Assert.AreEqual(String.Empty, item.ImageKey, "DefaultValues#9");
Assert.AreEqual (String.Empty, item.ToolTipText, "DefaultValues#10");
Assert.AreEqual (0, item.IndentCount, "DefaultValues#11");
-#endif
}
[Test]
@@ -433,7 +429,6 @@ namespace MonoTests.System.Windows.Forms
form.Dispose ();
}
-#if NET_2_0
[Test]
[ExpectedException (typeof (ArgumentOutOfRangeException))]
public void ListViewItemIndent ()
@@ -498,7 +493,6 @@ namespace MonoTests.System.Windows.Forms
itemB.Position = Point.Empty;
Assert.AreEqual (itemB_pos, itemB.Position, "#H1");
}
-#endif
[Test] // bug #330415 and #331643
public void RemoveFocusedItem ()
@@ -577,7 +571,6 @@ namespace MonoTests.System.Windows.Forms
form.Dispose ();
}
-#if NET_2_0
[Test]
public void ListViewItemGroup ()
{
@@ -595,7 +588,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (1, lvg2.Items.Count, "#B2");
Assert.AreEqual (lvg2, lvi.Group, "#B3");
}
-#endif
[Test]
public void ListViewItemUseItemStyleForSubItems ()
@@ -635,9 +627,7 @@ namespace MonoTests.System.Windows.Forms
item1.BackColor = Color.Red;
item1.Font = new Font ("Arial", 14);
item1.SubItems.Add ("Element2");
-#if NET_2_0
item1.ToolTipText = item1.Text;
-#endif
f.Show ();
@@ -649,9 +639,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (2, item2.SubItems.Count, "#5");
Assert.AreEqual ("Hello", item2.SubItems [0].Text, "#6");
Assert.AreEqual ("Element2", item2.SubItems[1].Text, "#7");
-#if NET_2_0
Assert.AreEqual (item1.ToolTipText, item2.ToolTipText, "#8");
-#endif
// Focused is not copied
// These tests shoule be re-enabled when #333693
/*Assert.IsTrue (item1.Focused, "#9");
@@ -660,7 +648,6 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#if NET_2_0
[Test]
public void ListViewItemTestImageIndex()
{
@@ -690,7 +677,6 @@ namespace MonoTests.System.Windows.Forms
item1.ToolTipText = null;
Assert.AreEqual (String.Empty, item1.ToolTipText, "ToolTipText#1");
}
-#endif
}
[TestFixture]
@@ -703,9 +689,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (string.Empty, subItem.Text, "#1");
Assert.AreEqual (SystemColors.Window, subItem.BackColor, "#2");
Assert.AreEqual (SystemColors.WindowText, subItem.ForeColor, "#3");
-#if NET_2_0
Assert.AreEqual (SystemFonts.DefaultFont, subItem.Font, "#4");
-#endif
}
[Test] // ctor (ListViewItem, String)
@@ -716,18 +700,14 @@ namespace MonoTests.System.Windows.Forms
subItem = new ListViewItem.ListViewSubItem (null, null);
Assert.IsNotNull (subItem.Font, "#A1");
-#if NET_2_0
Assert.AreEqual (string.Empty, subItem.Name, "#A2");
Assert.IsNull (subItem.Tag, "#A3");
-#endif
Assert.AreEqual (String.Empty, subItem.Text, "#A4");
subItem = new ListViewItem.ListViewSubItem (item, "SubItem2");
Assert.IsNotNull (subItem.Font, "#B1");
-#if NET_2_0
Assert.AreEqual (string.Empty, subItem.Name, "#B2");
Assert.IsNull (subItem.Tag, "#B3");
-#endif
Assert.AreEqual ("SubItem2", subItem.Text, "#B4");
}
@@ -743,10 +723,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (Color.Red, subItem.BackColor, "#A1");
Assert.IsNotNull (subItem.Font, "#A2");
Assert.AreEqual (Color.Blue, subItem.ForeColor, "#A3");
-#if NET_2_0
Assert.AreEqual (string.Empty, subItem.Name, "#A4");
Assert.IsNull (subItem.Tag, "#A5");
-#endif
Assert.AreEqual (string.Empty, subItem.Text, "#A6");
subItem = new ListViewItem.ListViewSubItem (item, "SubItem3",
@@ -754,14 +732,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (Color.Green, subItem.BackColor, "#B1");
Assert.AreSame (font, subItem.Font, "#B2");
Assert.AreEqual (Color.Blue, subItem.ForeColor, "#B3");
-#if NET_2_0
Assert.AreEqual (string.Empty, subItem.Name, "#B4");
Assert.IsNull (subItem.Tag, "#B5");
-#endif
Assert.AreEqual ("SubItem3", subItem.Text, "#B6");
}
-#if NET_2_0
[Test]
public void Name ()
{
@@ -789,7 +764,6 @@ namespace MonoTests.System.Windows.Forms
subItem.Tag = 5;
Assert.AreEqual (5, subItem.Tag, "#3");
}
-#endif
[Test]
public void Text ()
@@ -817,10 +791,8 @@ namespace MonoTests.System.Windows.Forms
subItem = new ListViewItem.ListViewSubItem (item,
"SubItemText", Color.Yellow, Color.Green,
font);
-#if NET_2_0
subItem.Name = "foo";
subItem.Tag = "bar";
-#endif
MemoryStream ms = new MemoryStream ();
BinaryFormatter formatter = new BinaryFormatter ();
@@ -833,10 +805,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (Color.Green, subItem.BackColor, "#A1");
Assert.AreEqual (font, subItem.Font, "#A2");
Assert.AreEqual (Color.Yellow, subItem.ForeColor, "#A3");
-#if NET_2_0
Assert.AreEqual (string.Empty, subItem.Name, "#A4");
Assert.IsNull (subItem.Tag, "#A5");
-#endif
Assert.AreEqual ("SubItemText", subItem.Text, "#A6");
ms.Position = 0;
@@ -856,10 +826,8 @@ namespace MonoTests.System.Windows.Forms
subItem = new ListViewItem.ListViewSubItem (item,
"SubItemText", Color.Yellow, Color.Green,
font);
-#if NET_2_0
subItem.Name = "foo";
subItem.Tag = "bar";
-#endif
MemoryStream ms = new MemoryStream ();
BinaryFormatter formatter = new BinaryFormatter ();
@@ -870,11 +838,7 @@ namespace MonoTests.System.Windows.Forms
byte [] ser = new byte [ms.Length];
ms.Read (ser, 0, ser.Length);
-#if NET_2_0
Assert.AreEqual (_serializedV20_Mono, ser);
-#else
- Assert.AreEqual (_serializedV11_Mono, ser);
-#endif
}
[Test]
@@ -888,10 +852,8 @@ namespace MonoTests.System.Windows.Forms
subItem = new ListViewItem.ListViewSubItem (item,
"SubItemText", Color.Yellow, Color.Green,
font);
-#if NET_2_0
subItem.Name = "foo";
subItem.Tag = "bar";
-#endif
MemoryStream ms = new MemoryStream ();
BinaryFormatter formatter = new BinaryFormatter ();
@@ -901,11 +863,7 @@ namespace MonoTests.System.Windows.Forms
byte [] ser = new byte [ms.Length];
ms.Read (ser, 0, ser.Length);
-#if NET_2_0
Assert.AreEqual (_serializedV20_MS, ser);
-#else
- Assert.AreEqual (_serializedV11_MS, ser);
-#endif
}
[Test]
@@ -929,10 +887,8 @@ namespace MonoTests.System.Windows.Forms
// FIXME: bug #410693
//Assert.AreEqual (Color.Yellow, subItem.ForeColor, "#A3");
Assert.AreEqual ("Yellow", subItem.ForeColor.Name, "#A3");
-#if NET_2_0
Assert.AreEqual (string.Empty, subItem.Name, "#A4");
Assert.IsNull (subItem.Tag, "#A5");
-#endif
Assert.AreEqual ("SubItemText", subItem.Text, "#A6");
ms = new MemoryStream ();
@@ -949,13 +905,10 @@ namespace MonoTests.System.Windows.Forms
// FIXME: bug #410693
//Assert.AreEqual (Color.Yellow, subItem.ForeColor, "#B3");
Assert.AreEqual ("Yellow", subItem.ForeColor.Name, "#B3");
-#if NET_2_0
Assert.AreEqual (string.Empty, subItem.Name, "#B4");
Assert.IsNull (subItem.Tag, "#B5");
-#endif
Assert.AreEqual ("SubItemText", subItem.Text, "#B6");
-#if NET_2_0
ms = new MemoryStream ();
ms.Write (_serializedV20_Mono, 0, _serializedV20_Mono.Length);
ms.Position = 0;
@@ -991,7 +944,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (string.Empty, subItem.Name, "#D4");
Assert.IsNull (subItem.Tag, "#D5");
Assert.AreEqual ("SubItemText", subItem.Text, "#D6");
-#endif
}
static byte [] _serializedV11_MS = {
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewTest.cs
index 19c191499d0..46adeaaccb4 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ListViewTest.cs
@@ -57,10 +57,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (View.LargeIcon, mylistview.View, "#29");
mylistview.View = View.List;
Assert.AreEqual (false, mylistview.TopItem.Checked, "#30");
-#if NET_2_0
Assert.AreEqual (false, mylistview.ShowItemToolTips, "#31");
Assert.AreEqual (false, mylistview.HotTracking, "#31");
-#endif
}
[Test]
@@ -351,7 +349,6 @@ namespace MonoTests.System.Windows.Forms
form.Dispose ();
}
-#if NET_2_0
[Test]
public void TopItem ()
{
@@ -408,7 +405,6 @@ namespace MonoTests.System.Windows.Forms
} catch (InvalidOperationException) {
}
}
-#endif
[Test]
public void Selected ()
@@ -435,7 +431,6 @@ namespace MonoTests.System.Windows.Forms
form.Dispose ();
}
-#if NET_2_0
[Test]
public void FindItemWithText ()
{
@@ -772,7 +767,6 @@ namespace MonoTests.System.Windows.Forms
} catch (ArgumentException) {
}
}
-#endif
[Test]
public void Sort_Details_Checked ()
@@ -870,7 +864,6 @@ namespace MonoTests.System.Windows.Forms
AssertSort_Selected (View.SmallIcon);
}
-#if NET_2_0
[Test]
[ExpectedException (typeof (NotSupportedException))]
public void Sort_Tile_Checked ()
@@ -895,7 +888,6 @@ namespace MonoTests.System.Windows.Forms
{
AssertSort_Selected (View.Tile);
}
-#endif
private void AssertSortIcon_Created (View view)
{
@@ -928,45 +920,21 @@ namespace MonoTests.System.Windows.Forms
lvw.Sorting = SortOrder.Ascending;
Assert.IsNotNull (lvw.ListViewItemSorter, "#E1");
-#if NET_2_0
Assert.AreEqual ("A", lvw.Items [0].Text, "#E2");
Assert.AreEqual ("B", lvw.Items [1].Text, "#E3");
Assert.AreEqual ("C", lvw.Items [2].Text, "#E4");
-#else
- // in .NET 1.1, changing Sorting does not have any effect for
- // SmallIcon and LargeIcon view if no custom comparer is used
- Assert.AreEqual ("C", lvw.Items [0].Text, "#E2");
- Assert.AreEqual ("B", lvw.Items [1].Text, "#E3");
- Assert.AreEqual ("A", lvw.Items [2].Text, "#E4");
-#endif
lvw.Sorting = SortOrder.None;
Assert.IsNotNull (lvw.ListViewItemSorter, "#F1");
-#if NET_2_0
Assert.AreEqual ("A", lvw.Items [0].Text, "#F2");
Assert.AreEqual ("B", lvw.Items [1].Text, "#F3");
Assert.AreEqual ("C", lvw.Items [2].Text, "#F4");
-#else
- // in .NET 1.1, changing Sorting does not have any effect for
- // SmallIcon and LargeIcon view if no custom comparer is used
- Assert.AreEqual ("C", lvw.Items [0].Text, "#E2");
- Assert.AreEqual ("B", lvw.Items [1].Text, "#E3");
- Assert.AreEqual ("A", lvw.Items [2].Text, "#E4");
-#endif
lvw.Sorting = SortOrder.Ascending;
Assert.IsNotNull (lvw.ListViewItemSorter, "#G1");
-#if NET_2_0
Assert.AreEqual ("A", lvw.Items [0].Text, "#G2");
Assert.AreEqual ("B", lvw.Items [1].Text, "#G3");
Assert.AreEqual ("C", lvw.Items [2].Text, "#G4");
-#else
- // in .NET 1.1, changing Sorting does not have any effect for
- // SmallIcon and LargeIcon view if no custom comparer is used
- Assert.AreEqual ("C", lvw.Items [0].Text, "#G2");
- Assert.AreEqual ("B", lvw.Items [1].Text, "#G3");
- Assert.AreEqual ("A", lvw.Items [2].Text, "#G4");
-#endif
lvw.Sorting = SortOrder.Descending;
Assert.IsNotNull (lvw.ListViewItemSorter, "#G1");
@@ -991,39 +959,20 @@ namespace MonoTests.System.Windows.Forms
lvw.Sorting = SortOrder.Ascending;
Assert.IsNotNull (lvw.ListViewItemSorter, "#J1");
-#if NET_2_0
Assert.AreEqual ("A", lvw.Items [0].Text, "#J2");
Assert.AreEqual ("B", lvw.Items [1].Text, "#J3");
Assert.AreEqual ("BB", lvw.Items [2].Text, "#J4");
Assert.AreEqual ("C", lvw.Items [3].Text, "#J5");
-#else
- // in .NET 1.1, changing Sorting does not have any effect for
- // SmallIcon and LargeIcon view if no custom comparer is used
- Assert.AreEqual ("C", lvw.Items [0].Text, "#J2");
- Assert.AreEqual ("BB", lvw.Items [1].Text, "#J3");
- Assert.AreEqual ("B", lvw.Items [2].Text, "#J4");
- Assert.AreEqual ("A", lvw.Items [3].Text, "#J5");
-#endif
// when Sorting is not None and a new item is added, the
// collection is re-sorted automatically
lvw.Items.Add ("BA");
Assert.IsNotNull (lvw.ListViewItemSorter, "#K1");
-#if NET_2_0
Assert.AreEqual ("A", lvw.Items [0].Text, "#K2");
Assert.AreEqual ("B", lvw.Items [1].Text, "#K3");
Assert.AreEqual ("BA", lvw.Items [2].Text, "#K4");
Assert.AreEqual ("BB", lvw.Items [3].Text, "#K5");
Assert.AreEqual ("C", lvw.Items [4].Text, "#K6");
-#else
- // in .NET 1.1, changing Sorting does not have any effect for
- // SmallIcon and LargeIcon view if no custom comparer is used
- Assert.AreEqual ("C", lvw.Items [0].Text, "#K2");
- Assert.AreEqual ("BB", lvw.Items [1].Text, "#K3");
- Assert.AreEqual ("BA", lvw.Items [2].Text, "#K4");
- Assert.AreEqual ("B", lvw.Items [3].Text, "#K5");
- Assert.AreEqual ("A", lvw.Items [4].Text, "#K6");
-#endif
// assign a custom comparer
MockComparer mc = new MockComparer (false);
@@ -1505,12 +1454,7 @@ namespace MonoTests.System.Windows.Forms
// the ListViewItemSorter
lvw.Sorting = SortOrder.None;
Assert.AreEqual (compareCount, mc.CompareCount, "#P1");
-#if NET_2_0
Assert.IsNull (lvw.ListViewItemSorter, "#P2");
-#else
- Assert.IsNotNull (lvw.ListViewItemSorter, "#P2a");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#P2b");
-#endif
Assert.AreEqual ("C", lvw.Items [0].Text, "#P3");
Assert.AreEqual ("BC", lvw.Items [1].Text, "#P4");
Assert.AreEqual ("BB", lvw.Items [2].Text, "#P5");
@@ -1520,7 +1464,6 @@ namespace MonoTests.System.Windows.Forms
lvw.ListViewItemSorter = mc;
-#if NET_2_0
// assigning the previous custom IComparer again results in a
// re-sort
Assert.IsTrue (mc.CompareCount > compareCount, "#Q1");
@@ -1532,17 +1475,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("BB", lvw.Items [3].Text, "#Q7");
Assert.AreEqual ("BC", lvw.Items [4].Text, "#Q8");
Assert.AreEqual ("C", lvw.Items [5].Text, "#Q9");
-#else
- Assert.AreEqual (compareCount, mc.CompareCount, "#Q1");
- Assert.IsNotNull (lvw.ListViewItemSorter, "#Q2");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#Q3");
- Assert.AreEqual ("C", lvw.Items [0].Text, "#Q4");
- Assert.AreEqual ("BC", lvw.Items [1].Text, "#Q5");
- Assert.AreEqual ("BB", lvw.Items [2].Text, "#Q6");
- Assert.AreEqual ("BA", lvw.Items [3].Text, "#Q7");
- Assert.AreEqual ("B", lvw.Items [4].Text, "#Q8");
- Assert.AreEqual ("A", lvw.Items [5].Text, "#Q9");
-#endif
// record compare count
compareCount = mc.CompareCount;
@@ -1566,12 +1498,7 @@ namespace MonoTests.System.Windows.Forms
lvw.Sorting = SortOrder.None;
Assert.AreEqual (compareCount, mc.CompareCount, "#S1");
-#if NET_2_0
Assert.IsNull (lvw.ListViewItemSorter, "#S2");
-#else
- Assert.IsNotNull (lvw.ListViewItemSorter, "#S2a");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#S2b");
-#endif
Assert.AreEqual ("C", lvw.Items [0].Text, "#S3");
Assert.AreEqual ("BC", lvw.Items [1].Text, "#S4");
Assert.AreEqual ("BB", lvw.Items [2].Text, "#S5");
@@ -1583,7 +1510,6 @@ namespace MonoTests.System.Windows.Forms
compareCount = mc.CompareCount;
lvw.Items.Add ("BD");
-#if NET_2_0
// adding an item when Sorting is None does not cause a re-sort
Assert.AreEqual (compareCount, mc.CompareCount, "#T1");
Assert.IsNull (lvw.ListViewItemSorter, "#T2");
@@ -1594,25 +1520,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("B", lvw.Items [4].Text, "#T7");
Assert.AreEqual ("A", lvw.Items [5].Text, "#T8");
Assert.AreEqual ("BD", lvw.Items [6].Text, "#T9");
-#else
- // adding an item when Sorting is None results in a re-sort
- Assert.IsTrue (mc.CompareCount > compareCount, "#T1");
- Assert.IsNotNull (lvw.ListViewItemSorter, "#T2");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#T3");
- Assert.AreEqual ("A", lvw.Items [0].Text, "#T4");
- Assert.AreEqual ("B", lvw.Items [1].Text, "#T5");
- Assert.AreEqual ("BA", lvw.Items [2].Text, "#T6");
- Assert.AreEqual ("BB", lvw.Items [3].Text, "#T7");
- Assert.AreEqual ("BC", lvw.Items [4].Text, "#T8");
- Assert.AreEqual ("BD", lvw.Items [5].Text, "#T9");
- Assert.AreEqual ("C", lvw.Items [6].Text, "#T10");
-#endif
// record compare count
compareCount = mc.CompareCount;
lvw.Sort ();
-#if NET_2_0
// explicitly calling Sort when Sorting is None does nothing
Assert.AreEqual (compareCount, mc.CompareCount, "#U1");
Assert.IsNull (lvw.ListViewItemSorter, "#U2");
@@ -1623,25 +1535,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("B", lvw.Items [4].Text, "#U7");
Assert.AreEqual ("A", lvw.Items [5].Text, "#U8");
Assert.AreEqual ("BD", lvw.Items [6].Text, "#U9");
-#else
- // explicitly calling Sort when Sorting is None results in a re-sort
- Assert.IsTrue (mc.CompareCount > compareCount, "#U1");
- Assert.IsNotNull (lvw.ListViewItemSorter, "#U2");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#U3");
- Assert.AreEqual ("A", lvw.Items [0].Text, "#U4");
- Assert.AreEqual ("B", lvw.Items [1].Text, "#U5");
- Assert.AreEqual ("BA", lvw.Items [2].Text, "#U6");
- Assert.AreEqual ("BB", lvw.Items [3].Text, "#U7");
- Assert.AreEqual ("BC", lvw.Items [4].Text, "#U8");
- Assert.AreEqual ("BD", lvw.Items [5].Text, "#U9");
- Assert.AreEqual ("C", lvw.Items [6].Text, "#U10");
-#endif
// record compare count
compareCount = mc.CompareCount;
lvw.Sorting = SortOrder.Ascending;
-#if NET_2_0
// setting Sorting again, does not reinstate the custom IComparer
// but sorting is actually performed using an internal non-visible
// comparer
@@ -1654,25 +1552,11 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("BC", lvw.Items [4].Text, "#V7");
Assert.AreEqual ("BD", lvw.Items [5].Text, "#V8");
Assert.AreEqual ("C", lvw.Items [6].Text, "#V9");
-#else
- // setting Sorting again, uses the custom IComparer to sort the items
- Assert.IsTrue (mc.CompareCount > compareCount, "#V1");
- Assert.IsNotNull (lvw.ListViewItemSorter, "#V2");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#V3");
- Assert.AreEqual ("C", lvw.Items [0].Text, "#V4");
- Assert.AreEqual ("BD", lvw.Items [1].Text, "#V5");
- Assert.AreEqual ("BC", lvw.Items [2].Text, "#V6");
- Assert.AreEqual ("BB", lvw.Items [3].Text, "#V7");
- Assert.AreEqual ("BA", lvw.Items [4].Text, "#V8");
- Assert.AreEqual ("B", lvw.Items [5].Text, "#V9");
- Assert.AreEqual ("A", lvw.Items [6].Text, "#V10");
-#endif
// record compare count
compareCount = mc.CompareCount;
lvw.Sort ();
-#if NET_2_0
// explicitly calling Sort, does not reinstate the custom IComparer
// but sorting is actually performed using an internal non-visible
// comparer
@@ -1685,19 +1569,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("BC", lvw.Items [4].Text, "#W7");
Assert.AreEqual ("BD", lvw.Items [5].Text, "#W8");
Assert.AreEqual ("C", lvw.Items [6].Text, "#W9");
-#else
- // setting Sorting again, uses the custom IComparer to sort the items
- Assert.IsTrue (mc.CompareCount > compareCount, "#W1");
- Assert.IsNotNull (lvw.ListViewItemSorter, "#W2");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#W3");
- Assert.AreEqual ("C", lvw.Items [0].Text, "#W4");
- Assert.AreEqual ("BD", lvw.Items [1].Text, "#W5");
- Assert.AreEqual ("BC", lvw.Items [2].Text, "#W6");
- Assert.AreEqual ("BB", lvw.Items [3].Text, "#W7");
- Assert.AreEqual ("BA", lvw.Items [4].Text, "#W8");
- Assert.AreEqual ("B", lvw.Items [5].Text, "#W9");
- Assert.AreEqual ("A", lvw.Items [6].Text, "#W10");
-#endif
// record compare count
compareCount = mc.CompareCount;
@@ -1803,15 +1674,9 @@ namespace MonoTests.System.Windows.Forms
lvw.Sorting = SortOrder.None;
Assert.AreEqual (0, mc.CompareCount, "#L1");
-#if NET_2_0
// setting Sorting to None does not perform a sort and resets the
// ListViewItemSorter
Assert.IsNull (lvw.ListViewItemSorter, "#L2");
-#else
- // setting Sorting to None does not perform a sort
- Assert.IsNotNull (lvw.ListViewItemSorter, "#L2a");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#L2b");
-#endif
Assert.AreEqual ("B", lvw.Items [0].Text, "#L3");
Assert.AreEqual ("A", lvw.Items [1].Text, "#L4");
Assert.AreEqual ("C", lvw.Items [2].Text, "#L5");
@@ -1820,12 +1685,7 @@ namespace MonoTests.System.Windows.Forms
// explicitly calling Sort when Sorting is None does nothing
lvw.Sort ();
Assert.AreEqual (0, mc.CompareCount, "#M1");
-#if NET_2_0
Assert.IsNull (lvw.ListViewItemSorter, "#M2");
-#else
- Assert.IsNotNull (lvw.ListViewItemSorter, "#M2a");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#M2b");
-#endif
Assert.AreEqual ("B", lvw.Items [0].Text, "#M3");
Assert.AreEqual ("A", lvw.Items [1].Text, "#M4");
Assert.AreEqual ("C", lvw.Items [2].Text, "#M5");
@@ -1833,12 +1693,7 @@ namespace MonoTests.System.Windows.Forms
lvw.Sorting = SortOrder.Ascending;
Assert.AreEqual (0, mc.CompareCount, "#N1");
-#if NET_2_0
Assert.IsNull (lvw.ListViewItemSorter, "#N2");
-#else
- Assert.IsNotNull (lvw.ListViewItemSorter, "#N2a");
- Assert.AreSame (mc, lvw.ListViewItemSorter, "#N2b");
-#endif
Assert.AreEqual ("B", lvw.Items [0].Text, "#N3");
Assert.AreEqual ("A", lvw.Items [1].Text, "#N4");
Assert.AreEqual ("C", lvw.Items [2].Text, "#N5");
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MaskedTextBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MaskedTextBoxTest.cs
index 1c0303f2f4b..cad0285caac 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MaskedTextBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MaskedTextBoxTest.cs
@@ -5,7 +5,6 @@
// Rolf Bjarne Kvinge (RKvinge@novell.com)
//
-#if NET_2_0
using System;
using System.Collections;
@@ -969,4 +968,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormHandleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormHandleTest.cs
index 45b41d7ca14..2f5ea16b6e6 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormHandleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormHandleTest.cs
@@ -109,18 +109,16 @@ namespace MonoTests.System.Windows.Forms
o = child1.Anchor;
child1.Anchor = AnchorStyles.Right;
Assert.IsFalse (child1.IsHandleCreated, "A6");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
o = child1.AutoScrollOffset;
child1.AutoScrollOffset = new Point (40, 40);
Assert.IsFalse (child1.IsHandleCreated, "A7");
#endif
-#if NET_2_0
SetUp ();
o = child1.AutoSize;
child1.AutoSize = true;
Assert.IsFalse (child1.IsHandleCreated, "A8");
-#endif
// A - Form
SetUp ();
@@ -142,7 +140,6 @@ namespace MonoTests.System.Windows.Forms
child1.AllowTransparency = !child1.AllowTransparency;
Assert.IsFalse (child1.IsHandleCreated, "FA4");
-#if NET_2_0
SetUp ();
o = child1.AutoScaleDimensions;
child1.AutoScaleDimensions = SizeF.Empty;
@@ -152,7 +149,6 @@ namespace MonoTests.System.Windows.Forms
o = child1.AutoScaleMode;
child1.AutoScaleMode = AutoScaleMode.Dpi;
Assert.IsFalse (child1.IsHandleCreated, "FA6");
-#endif
SetUp ();
o = child1.AutoScroll;
child1.AutoScroll = !child1.AutoScroll;
@@ -168,7 +164,7 @@ namespace MonoTests.System.Windows.Forms
child1.AutoScrollMinSize = new Size (child1.AutoScrollMinSize.Width + 1, child1.AutoScrollMinSize.Height + 1);
Assert.IsFalse (child1.IsHandleCreated, "FA9");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
SetUp ();
o = child1.AutoScrollOffset;
child1.AutoScrollOffset = new Point (child1.AutoScrollOffset.X + 1, child1.AutoScrollOffset.Y + 1);
@@ -179,7 +175,6 @@ namespace MonoTests.System.Windows.Forms
o = child1.AutoScrollPosition;
child1.AutoScrollPosition = new Point (child1.AutoScrollPosition.X + 1, child1.AutoScrollPosition.Y + 1);
Assert.IsFalse (child1.IsHandleCreated, "FA11");
-#if NET_2_0
SetUp ();
o = child1.AutoSize;
@@ -196,7 +191,6 @@ namespace MonoTests.System.Windows.Forms
child1.AutoValidate = AutoValidate.EnableAllowFocusChange;
Assert.IsFalse (child1.IsHandleCreated, "FA14");
-#endif
// B
SetUp ();
o = child1.BackColor;
@@ -207,12 +201,10 @@ namespace MonoTests.System.Windows.Forms
o = child1.BackgroundImage;
child1.BackgroundImage = new Bitmap (1, 1);
Assert.IsFalse (child1.IsHandleCreated, "A10");
-#if NET_2_0
SetUp ();
o = child1.BackgroundImageLayout;
child1.BackgroundImageLayout = ImageLayout.Stretch;
Assert.IsFalse (child1.IsHandleCreated, "A11");
-#endif
SetUp ();
o = child1.BindingContext;
child1.BindingContext = new BindingContext ();
@@ -282,12 +274,10 @@ namespace MonoTests.System.Windows.Forms
child1.ContextMenu = new ContextMenu ();
Assert.IsFalse (child1.IsHandleCreated, "A24");
-#if NET_2_0
SetUp ();
o = child1.ContextMenuStrip;
child1.ContextMenuStrip = new ContextMenuStrip ();
Assert.IsFalse (child1.IsHandleCreated, "A25");
-#endif
SetUp ();
o = child1.Controls;
Assert.IsFalse (child1.IsHandleCreated, "A26");
@@ -320,12 +310,10 @@ namespace MonoTests.System.Windows.Forms
o = child1.ControlBox;
child1.ControlBox = !child1.ControlBox;
Assert.IsFalse (child1.IsHandleCreated, "FC4");
-#if NET_2_0
SetUp ();
o = child1.CurrentAutoScaleDimensions;
Assert.IsFalse (child1.IsHandleCreated, "FC5");
-#endif
// D
SetUp ();
@@ -422,7 +410,7 @@ namespace MonoTests.System.Windows.Forms
child1.HelpButton = !child1.HelpButton;
Assert.IsFalse (child1.IsHandleCreated, "FH1");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
SetUp ();
o = child1.HorizontalScroll;
Assert.IsFalse (child1.IsHandleCreated, "FH2");
@@ -443,16 +431,14 @@ namespace MonoTests.System.Windows.Forms
SetUp ();
o = child1.IsDisposed;
Assert.IsFalse (child1.IsHandleCreated, "A43");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
o = child1.IsMirrored;
Assert.IsFalse (child1.IsHandleCreated, "A44");
#endif
-#if NET_2_0
SetUp ();
o = child1.LayoutEngine;
Assert.IsFalse (child1.IsHandleCreated, "A45");
-#endif
SetUp ();
o = child1.Left;
child1.Left = 15;
@@ -495,7 +481,6 @@ namespace MonoTests.System.Windows.Forms
// M - N
-#if NET_2_0
SetUp ();
o = child1.Margin;
child1.Margin = new Padding (6);
@@ -510,19 +495,16 @@ namespace MonoTests.System.Windows.Forms
o = child1.MinimumSize;
child1.MinimumSize = new Size (100, 100);
Assert.IsFalse (child1.IsHandleCreated, "A50");
-#endif
SetUp ();
o = child1.Name;
child1.Name = "web";
Assert.IsFalse (child1.IsHandleCreated, "A51");
-#if NET_2_0
// M - O - Form
SetUp ();
o = child1.MainMenuStrip;
child1.MainMenuStrip = null;
Assert.IsFalse (child1.IsHandleCreated, "FM1");
-#endif
SetUp ();
o = child1.MaximizeBox;
@@ -581,12 +563,10 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (child1.IsHandleCreated, "FO3");
// P - R
-#if NET_2_0
SetUp ();
o = child1.Padding;
child1.Padding = new Padding (4);
Assert.IsFalse (child1.IsHandleCreated, "A52");
-#endif
try {
SetUp ();
o = child1.Parent;
@@ -600,11 +580,9 @@ namespace MonoTests.System.Windows.Forms
} finally {
Assert.IsFalse (child1.IsHandleCreated, "A53");
}
-#if NET_2_0
SetUp ();
o = child1.PreferredSize;
Assert.IsFalse (child1.IsHandleCreated, "A54");
-#endif
SetUp ();
o = child1.ProductName;
Assert.IsFalse (child1.IsHandleCreated, "A55");
@@ -636,7 +614,7 @@ namespace MonoTests.System.Windows.Forms
o = child1.ParentForm;
Assert.IsFalse (child1.IsHandleCreated, "FP1");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
SetUp ();
o = child1.RestoreBounds;
Assert.IsFalse (child1.IsHandleCreated, "FR1");
@@ -676,7 +654,7 @@ namespace MonoTests.System.Windows.Forms
SetUp ();
o = child1.TopLevelControl;
Assert.IsFalse (child1.IsHandleCreated, "A67");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
o = child1.UseWaitCursor;
child1.UseWaitCursor = true;
@@ -701,12 +679,10 @@ namespace MonoTests.System.Windows.Forms
// S - W - Form
-#if NET_2_0
SetUp ();
o = child1.ShowIcon;
child1.ShowIcon = !child1.ShowIcon;
Assert.IsFalse (child1.IsHandleCreated, "FS1");
-#endif
SetUp ();
o = child1.ShowInTaskbar;
@@ -756,7 +732,7 @@ namespace MonoTests.System.Windows.Forms
child1.TransparencyKey = Color.BurlyWood;
Assert.IsFalse (child1.IsHandleCreated, "FT4");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
SetUp ();
o = child1.VerticalScroll;
Assert.IsFalse (child1.IsHandleCreated, "FV1");
@@ -776,7 +752,7 @@ namespace MonoTests.System.Windows.Forms
// Not a surprise, but none of these cause handle creation.
// Included just to absolutely certain.
object o;
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
o = child1.PublicCanRaiseEvents;
Assert.IsFalse (child1.IsHandleCreated, "A1");
@@ -784,15 +760,12 @@ namespace MonoTests.System.Windows.Forms
SetUp ();
o = child1.PublicCreateParams;
Assert.IsFalse (child1.IsHandleCreated, "A2");
-#if NET_2_0
SetUp ();
o = child1.PublicDefaultCursor;
Assert.IsFalse (child1.IsHandleCreated, "A3");
-#endif
SetUp ();
o = child1.PublicDefaultImeMode;
Assert.IsFalse (child1.IsHandleCreated, "A4");
-#if NET_2_0
SetUp ();
o = child1.PublicDefaultMargin;
Assert.IsFalse (child1.IsHandleCreated, "A5");
@@ -817,7 +790,6 @@ namespace MonoTests.System.Windows.Forms
o = child1.PublicDoubleBuffered;
child1.PublicDoubleBuffered = !child1.PublicDoubleBuffered;
Assert.IsFalse (child1.IsHandleCreated, "A10");
-#endif
SetUp ();
o = child1.PublicFontHeight;
child1.PublicFontHeight = child1.PublicFontHeight + 1;
@@ -831,7 +803,7 @@ namespace MonoTests.System.Windows.Forms
o = child1.PublicResizeRedraw;
child1.PublicResizeRedraw = !child1.PublicResizeRedraw;
Assert.IsFalse (child1.IsHandleCreated, "A13");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
o = child1.PublicScaleChildren;
Assert.IsFalse (child1.IsHandleCreated, "A14");
@@ -844,11 +816,9 @@ namespace MonoTests.System.Windows.Forms
o = child1.PublicShowKeyboardCues;
Assert.IsFalse (child1.IsHandleCreated, "A16");
-#if NET_2_0
SetUp ();
o = child1.PublicAutoScaleFactor;
Assert.IsFalse (child1.IsHandleCreated, "F1");
-#endif
SetUp ();
o = child1.PublicDesignMode;
Assert.IsFalse (child1.IsHandleCreated, "F2");
@@ -867,11 +837,9 @@ namespace MonoTests.System.Windows.Forms
child1.PublicMaximizedBounds = new Rectangle (1, 1, 1, 1);
Assert.IsFalse (child1.IsHandleCreated, "F5");
-#if NET_2_0
SetUp ();
o = child1.PublicShowWithoutActivation;
Assert.IsFalse (child1.IsHandleCreated, "F6");
-#endif
SetUp ();
o = child1.PublicVScroll;
child1.PublicVScroll = !child1.PublicVScroll;
@@ -944,11 +912,9 @@ namespace MonoTests.System.Windows.Forms
SetUp ();
child1.GetNextControl (new Control (), true);
Assert.IsFalse (child1.IsHandleCreated, "A12");
-#if NET_2_0
SetUp ();
child1.GetPreferredSize (Size.Empty);
Assert.IsFalse (child1.IsHandleCreated, "A13");
-#endif
SetUp ();
child1.Hide ();
Assert.IsFalse (child1.IsHandleCreated, "A14");
@@ -1026,11 +992,9 @@ namespace MonoTests.System.Windows.Forms
child1.ResumeLayout ();
Assert.IsFalse (child1.IsHandleCreated, "A32");
-#if NET_2_0
SetUp ();
child1.Scale (new SizeF (1.5f, 1.5f));
Assert.IsFalse (child1.IsHandleCreated, "A33");
-#endif
SetUp ();
child1.Select ();
Assert.IsTrue (child1.IsHandleCreated, "A34");
@@ -1069,7 +1033,7 @@ namespace MonoTests.System.Windows.Forms
child1.LayoutMdi (MdiLayout.Cascade);
Assert.IsFalse (child1.IsHandleCreated, "F5");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
SetUp ();
child1.PerformAutoScale ();
Assert.IsFalse (child1.IsHandleCreated, "F6");
@@ -1100,7 +1064,6 @@ namespace MonoTests.System.Windows.Forms
child1.SetDesktopLocation (7, 13);
Assert.IsFalse (child1.IsHandleCreated, "F12");
-#if NET_2_0
try {
SetUp ();
child1.Show (null);
@@ -1112,7 +1075,6 @@ namespace MonoTests.System.Windows.Forms
} finally {
Assert.IsFalse (child1.IsHandleCreated, "F13");
}
-#endif
//c.ShowDialog ()
@@ -1124,7 +1086,7 @@ namespace MonoTests.System.Windows.Forms
child1.Validate ();
Assert.IsFalse (child1.IsHandleCreated, "F15");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
SetUp ();
child1.ValidateChildren ();
Assert.IsFalse (child1.IsHandleCreated, "F16");
@@ -1163,11 +1125,7 @@ namespace MonoTests.System.Windows.Forms
SetUp ();
child1.PublicAccessibilityNotifyClients (AccessibleEvents.Focus, 0);
-#if NET_2_0
Assert.IsFalse (child1.IsHandleCreated, "A1");
-#else
- Assert.IsTrue (child1.IsHandleCreated, "A1");
-#endif
child1.PublicCreateAccessibilityInstance ();
Assert.IsTrue (child1.IsHandleCreated, "A2");
@@ -1183,12 +1141,10 @@ namespace MonoTests.System.Windows.Forms
child1.PublicDestroyHandle ();
Assert.IsFalse (child1.IsHandleCreated, "A5");
-#if NET_2_0
SetUp ();
child1.PublicGetAccessibilityObjectById (0);
Assert.IsFalse (child1.IsHandleCreated, "A6");
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
child1.PublicGetAutoSizeMode ();
Assert.IsFalse (child1.IsHandleCreated, "A7");
@@ -1284,7 +1240,7 @@ namespace MonoTests.System.Windows.Forms
SetUp ();
child1.PublicRtlTranslateLeftRight (LeftRightAlignment.Left);
Assert.IsFalse (child1.IsHandleCreated, "A30");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
child1.PublicScaleControl (new SizeF (1.5f, 1.5f), BoundsSpecified.All);
Assert.IsFalse (child1.IsHandleCreated, "A31");
@@ -1297,7 +1253,7 @@ namespace MonoTests.System.Windows.Forms
child1.PublicSelect ();
Assert.IsTrue (child1.IsHandleCreated, "A33");
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
SetUp ();
child1.PublicSetAutoSizeMode (AutoSizeMode.GrowAndShrink);
Assert.IsFalse (child1.IsHandleCreated, "A34");
@@ -1329,11 +1285,9 @@ namespace MonoTests.System.Windows.Forms
SetUp ();
child1.PublicSetVisibleCore (true);
Assert.IsTrue (child1.IsHandleCreated, "A39");
-#if NET_2_0
SetUp ();
child1.PublicSizeFromClientSize (new Size (160, 160));
Assert.IsFalse (child1.IsHandleCreated, "A40");
-#endif
SetUp ();
child1.PublicUpdateBounds ();
@@ -1409,7 +1363,7 @@ namespace MonoTests.System.Windows.Forms
child1.PublicProcessTabKey (true);
Assert.IsFalse (child1.IsHandleCreated, "F14");
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
SetUp ();
child1.Controls.Add (new Control ());
child1.PublicScrollToControl (child1.Controls [0]);
@@ -1436,42 +1390,32 @@ namespace MonoTests.System.Windows.Forms
private class ProtectedForm : Form
{
// Properties
-#if NET_2_0
public SizeF PublicAutoScaleFactor { get { return base.AutoScaleFactor; } }
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public bool PublicCanRaiseEvents { get { return base.CanRaiseEvents; } }
#endif
public CreateParams PublicCreateParams { get { return base.CreateParams; } }
-#if NET_2_0
public Cursor PublicDefaultCursor { get { return base.DefaultCursor; } }
-#endif
public ImeMode PublicDefaultImeMode { get { return base.DefaultImeMode; } }
-#if NET_2_0
public Padding PublicDefaultMargin { get { return base.DefaultMargin; } }
public Size PublicDefaultMaximumSize { get { return base.DefaultMaximumSize; } }
public Size PublicDefaultMinimumSize { get { return base.DefaultMinimumSize; } }
public Padding PublicDefaultPadding { get { return base.DefaultPadding; } }
public Size PublicDefaultSize { get { return base.DefaultSize; } }
-#endif
public bool PublicDesignMode { get {return base.DesignMode; } }
-#if NET_2_0
public bool PublicDoubleBuffered { get { return base.DoubleBuffered; } set { base.DoubleBuffered = value; } }
-#endif
public EventHandlerList PublicEvents { get {return base.Events; } }
public int PublicFontHeight { get { return base.FontHeight; } set { base.FontHeight = value; } }
public bool PublicHScroll { get {return base.HScroll; } set { base.HScroll = value;} }
public Rectangle PublicMaximizedBounds { get {return base.MaximizedBounds; } set { base.MaximizedBounds = value; }}
public bool PublicRenderRightToLeft { get { return base.RenderRightToLeft; } }
public bool PublicResizeRedraw { get { return base.ResizeRedraw; } set { base.ResizeRedraw = value; } }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public bool PublicScaleChildren { get { return base.ScaleChildren; } }
#endif
public bool PublicShowFocusCues { get { return base.ShowFocusCues; } }
public bool PublicShowKeyboardCues { get { return base.ShowKeyboardCues; } }
-#if NET_2_0
public bool PublicShowWithoutActivation { get { return base.ShowWithoutActivation; } }
-#endif
public bool PublicVScroll { get { return base.VScroll; } set { base.VScroll = value; } }
@@ -1485,10 +1429,8 @@ namespace MonoTests.System.Windows.Forms
public void PublicCreateControlsInstance () { base.CreateControlsInstance (); }
public void PublicCreateHandle () { base.CreateHandle (); }
public void PublicDestroyHandle () { base.DestroyHandle (); }
-#if NET_2_0
public AccessibleObject PublicGetAccessibilityObjectById (int objectId) { return base.GetAccessibilityObjectById (objectId); }
-#endif
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public AutoSizeMode PublicGetAutoSizeMode () { return base.GetAutoSizeMode (); }
public Rectangle PublicGetScaledBounds (Rectangle bounds, SizeF factor, BoundsSpecified specified) { return base.GetScaledBounds (bounds, factor, specified); }
#endif
@@ -1524,17 +1466,17 @@ namespace MonoTests.System.Windows.Forms
public ContentAlignment PublicRtlTranslateContent (ContentAlignment align) { return base.RtlTranslateContent (align); }
public HorizontalAlignment PublicRtlTranslateHorizontal (HorizontalAlignment align) { return base.RtlTranslateHorizontal (align); }
public LeftRightAlignment PublicRtlTranslateLeftRight (LeftRightAlignment align) { return base.RtlTranslateLeftRight (align); }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public void PublicScaleControl (SizeF factor, BoundsSpecified specified) { base.ScaleControl (factor, specified); }
#endif
public void PublicScaleCore (float dx, float dy) { base.ScaleCore (dx, dy); }
-#if NET_2_0 && !__MonoCS__
+#if !__MonoCS__
public void PublicScrollToControl (Control activeControl) { base.ScrollToControl (activeControl); }
#endif
public void PublicSelect () { base.Select (); }
public void PublicSelect (bool directed, bool forward) { base.Select (directed, forward); }
-#if !__MonoCS__ && NET_2_0
+#if !__MonoCS__
public void PublicSetAutoSizeMode (AutoSizeMode mode) { base.SetAutoSizeMode (mode); }
#endif
public void PublicSetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified) { base.SetBoundsCore (x, y, width, height, specified); }
@@ -1544,9 +1486,7 @@ namespace MonoTests.System.Windows.Forms
public void PublicSetStyle (ControlStyles flag, bool value) { base.SetStyle (flag, value); }
public void PublicSetTopLevel (bool value) { base.SetTopLevel (value); }
public void PublicSetVisibleCore (bool value) { base.SetVisibleCore (value); }
-#if NET_2_0
public Size PublicSizeFromClientSize (Size clientSize) { return base.SizeFromClientSize (clientSize); }
-#endif
public void PublicUpdateBounds () { base.UpdateBounds (); }
public void PublicUpdateDefaultButton (int bit, bool value) { base.UpdateDefaultButton (); }
public void PublicUpdateStyles () { base.UpdateStyles (); }
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs
index 660844da5fd..017d9fe732e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MdiFormTest.cs
@@ -241,12 +241,9 @@ namespace MonoTests.System.Windows.Forms
{
Closed += new EventHandler (ChildForm_Closed);
Closing += new CancelEventHandler (ChildForm_Closing);
-#if NET_2_0
FormClosed += new FormClosedEventHandler (ChildForm_FormClosed);
FormClosing += new FormClosingEventHandler (ChildForm_FormClosing);
-#endif
}
-#if NET_2_0
void ChildForm_FormClosing (object sender, FormClosingEventArgs e)
{
Assert.IsNotNull (MdiParent, "ChildForm_FormClosing");
@@ -256,7 +253,6 @@ namespace MonoTests.System.Windows.Forms
{
Assert.IsNotNull (MdiParent, "ChildForm_FormClosed");
}
-#endif
void ChildForm_Closing (object sender, CancelEventArgs e)
{
Assert.IsNotNull (MdiParent, "ChildForm_Closing");
@@ -373,7 +369,6 @@ namespace MonoTests.System.Windows.Forms
parent.Dispose ();
}
-#if NET_2_0
[Test]
public void RestoreWithMainMenuStrip ()
{
@@ -404,7 +399,6 @@ namespace MonoTests.System.Windows.Forms
parent.Dispose ();
}
-#endif
/* These tests are all failing on WinXP with XP Theme.
* offset seems to be 22,22 normally, and 22,29 with XP theme.
@@ -1216,11 +1210,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreSame (child2, main.ActiveMdiChild, "#4");
main.Visible = false;
-#if NET_2_0
Assert.IsNull (main.ActiveMdiChild, "#5");
-#else
- Assert.AreSame (child2, main.ActiveMdiChild, "#5");
-#endif
child2.Dispose ();
child1.Dispose ();
@@ -1521,12 +1511,10 @@ namespace MonoTests.System.Windows.Forms
mdi.Closing += new CancelEventHandler (mdi_Closing);
mdi.Closed += new EventHandler (mdi_Closed);
-#if NET_2_0
f.FormClosing += new FormClosingEventHandler (f_FormClosing);
f.FormClosed += new FormClosedEventHandler (f_FormClosed);
mdi.FormClosing += new FormClosingEventHandler (mdi_FormClosing);
mdi.FormClosed += new FormClosedEventHandler (mdi_FormClosed);
-#endif
f.Show ();
mdi.Show ();
@@ -1535,26 +1523,17 @@ namespace MonoTests.System.Windows.Forms
f.Close ();
-#if NET_2_0
Assert.AreEqual ("Child.Closing: True, Child.FormClosing: True, Parent.Closing: True, Parent.FormClosing: True, ", events_fired, "A1-2.0");
-#else
- Assert.AreEqual ("Child.Closing: True, Parent.Closing: True, ", events_fired, "A1-1.1");
-#endif
events_fired = string.Empty;
mdi.can_close = true;
f.Close ();
-#if NET_2_0
Assert.AreEqual ("Child.Closing: False, Child.FormClosing: False, Parent.Closing: False, Parent.FormClosing: False, Child.Closed, Child.FormClosed, Parent.Closed, Parent.FormClosed, ", events_fired, "A2-2.0");
-#else
- Assert.AreEqual ("Child.Closing: False, Parent.Closing: False, Child.Closed, Parent.Closed, ", events_fired, "A2-1.1");
-#endif
f.Dispose ();
}
-#if NET_2_0
void mdi_FormClosed (object sender, FormClosedEventArgs e)
{
events_fired += "Child.FormClosed, ";
@@ -1574,7 +1553,6 @@ namespace MonoTests.System.Windows.Forms
{
events_fired += string.Format ("Parent.FormClosing: {0}, ", e.Cancel);
}
-#endif
void mdi_Closed (object sender, EventArgs e)
{
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuItemTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuItemTest.cs
index 1c13a296e82..7c13926785b 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuItemTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuItemTest.cs
@@ -234,10 +234,8 @@ namespace MonoTests.System.Windows.Forms
mi1.ShowShortcut = true;
mi1.Text = "text1";
mi1.Visible = true;
-#if NET_2_0
mi1.Name = "name1";
mi1.Tag = "tag1";
-#endif
mi2 = mi1.CloneMenu();
@@ -255,10 +253,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual(mi1.Text, mi2.Text, "Text #1");
Assert.AreEqual(mi1.Visible, mi2.Visible, "Visible #1");
-#if NET_2_0
Assert.AreEqual(mi1.Name, mi2.Name, "Name #1");
Assert.AreEqual(mi1.Tag, mi2.Tag, "Tag #1");
-#endif
mi1.BarBreak = false;
mi1.Break = false;
@@ -274,10 +270,8 @@ namespace MonoTests.System.Windows.Forms
mi1.Text = "text2";
mi1.Visible = false;
-#if NET_2_0
mi1.Name = "name2";
mi1.Tag = "tag2";
-#endif
mi2 = mi1.CloneMenu();
@@ -294,10 +288,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual(mi1.ShowShortcut, mi2.ShowShortcut, "ShowShortcut #2");
Assert.AreEqual(mi1.Text, mi2.Text, "Text #2");
Assert.AreEqual(mi1.Visible, mi2.Visible, "Visible #2");
-#if NET_2_0
Assert.AreEqual(mi1.Name, mi2.Name, "Name #2");
Assert.AreEqual(mi1.Tag, mi2.Tag, "Tag #2");
-#endif
}
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuStripTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuStripTest.cs
index f8d8e5b0278..56d4c524557 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuStripTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MenuStripTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -216,4 +215,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
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 d51f023c363..d3ac453dd85 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
@@ -33,9 +33,7 @@ namespace MonoTests.System.Windows.Forms
MainMenu mymainmenu = new MainMenu ();
Assert.AreEqual (RightToLeft.Inherit, mymainmenu.RightToLeft,"#6");
-#if NET_2_0
Assert.IsNull (mymenu.Tag);
-#endif
}
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MessageTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MessageTest.cs
index 782c5724795..74f287cd0d6 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MessageTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MessageTest.cs
@@ -29,7 +29,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("msg=0x2 (WM_DESTROY) hwnd=0x7b wparam=0xea lparam=0x159 result=0x2", msg.ToString ());
}
-#if NET_2_0
[Test]
public void Equality ()
{
@@ -69,6 +68,5 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (msg1 != msg4, "A3");
Assert.IsFalse (msg1 != msg5, "A4");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MonthCalendarTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MonthCalendarTest.cs
index c6ecbe32dc0..50c2a71ea03 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MonthCalendarTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/MonthCalendarTest.cs
@@ -50,13 +50,11 @@ namespace MonoTests.System.Windows.Forms
clickRaised = true;
}
-#if NET_2_0
[Test]
public void DefaultMarginTest ()
{
Assert.AreEqual (DefaultMargin.All, 9, "#01");
}
-#endif
}
[TestFixture]
@@ -140,7 +138,6 @@ namespace MonoTests.System.Windows.Forms
try {
myMonthCal1.MaxSelectionCount = 0; // value is less than 1
Assert.Fail ("#A1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNotNull (ex.Message, "#A3");
@@ -148,14 +145,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("MaxSelectionCount", ex.ParamName, "#A5");
Assert.IsNull (ex.InnerException, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNotNull (ex.Message, "#A3");
- Assert.IsNull (ex.ParamName, "#A4");
- Assert.IsNull (ex.InnerException, "#A5");
- }
-#endif
}
[Test]
@@ -166,7 +155,6 @@ namespace MonoTests.System.Windows.Forms
try {
myMonthCal1.MaxDate = new DateTime (1752, 1, 1, 0, 0, 0, 0); // value is less than min date (01/01/1753)
Assert.Fail ("#A1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNotNull (ex.Message, "#A3");
@@ -174,14 +162,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("MaxDate", ex.ParamName, "#A5");
Assert.IsNull (ex.InnerException, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNotNull (ex.Message, "#A3");
- Assert.IsNull (ex.ParamName, "#A4");
- Assert.IsNull (ex.InnerException, "#A5");
- }
-#endif
}
[Test]
@@ -192,7 +172,6 @@ namespace MonoTests.System.Windows.Forms
try {
myMonthCal1.MinDate = new DateTime (1752, 1, 1, 0, 0, 0, 0); // Date earlier than 01/01/1753
Assert.Fail ("#A1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNotNull (ex.Message, "#A3");
@@ -200,19 +179,10 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("MinDate", ex.ParamName, "#A5");
Assert.IsNull (ex.InnerException, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNotNull (ex.Message, "#A3");
- Assert.IsNull (ex.ParamName, "#A4");
- Assert.IsNull (ex.InnerException, "#A5");
- }
-#endif
try {
myMonthCal1.MinDate = new DateTime (9999, 12, 31, 0, 0, 0, 0); // Date greater than max date
Assert.Fail ("#B1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNotNull (ex.Message, "#B3");
@@ -220,14 +190,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("MinDate", ex.ParamName, "#B5");
Assert.IsNull (ex.InnerException, "#B6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.Message, "#B3");
- Assert.IsNull (ex.ParamName, "#B4");
- Assert.IsNull (ex.InnerException, "#B5");
- }
-#endif
}
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NotifyIconTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NotifyIconTest.cs
index a85edf59615..e99ae188a53 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NotifyIconTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/NotifyIconTest.cs
@@ -9,7 +9,6 @@ namespace MonoTests.System.Windows.Forms
[TestFixture]
public class NotifyIconTest : TestHelper
{
-#if NET_2_0
[Test]
public void PropertyTag ()
{
@@ -46,6 +45,5 @@ namespace MonoTests.System.Windows.Forms
ni.Visible = true;
ni.ShowBalloonTip (1);
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingConverterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingConverterTest.cs
index 5a92732399e..59ef7040450 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingConverterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingConverterTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2006 Novell, Inc.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -285,4 +284,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingTest.cs
index 0b7e2c9d217..e466cfed1e5 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaddingTest.cs
@@ -25,7 +25,6 @@
// Author:
// Daniel Nauck (dna(at)mono-project(dot)de)
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -116,4 +115,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaintEventArgsTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaintEventArgsTest.cs
index 622adbdf90a..41a84c3e4af 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaintEventArgsTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PaintEventArgsTest.cs
@@ -48,22 +48,12 @@ namespace MonoTests.System.Windows.Forms {
default_rect = new Rectangle (Int32.MinValue, Int32.MinValue, Int32.MaxValue, Int32.MaxValue);
}
-#if NET_2_0
[Test]
[ExpectedException (typeof (ArgumentNullException))]
public void Constructor_NullGraphics ()
{
new PaintEventArgs (null, default_rect);
}
-#else
- [Test]
- public void Constructor_NullGraphics ()
- {
- PaintEventArgs pea = new PaintEventArgs (null, default_rect);
- Assert.IsNull (pea.Graphics, "Graphics");
- Assert.AreEqual (default_rect, pea.ClipRectangle);
- }
-#endif
[Test]
public void Constructor ()
{
@@ -118,10 +108,8 @@ namespace MonoTests.System.Windows.Forms {
}
[Test]
-#if NET_2_0
// under MS runtime it throws an exception under nunit-console, but not when running under NUnit GUI
[Category ("NotDotNet")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void Dispose_True ()
{
@@ -136,10 +124,8 @@ namespace MonoTests.System.Windows.Forms {
}
[Test]
-#if NET_2_0
// under MS runtime it throws an exception under nunit-console, but not when running under NUnit GUI
[Category ("NotDotNet")]
-#endif
[ExpectedException (typeof (ArgumentException))]
public void Dispose_False ()
{
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PanelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PanelTest.cs
index fa44c08f22f..1f02ccb96a3 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PanelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PanelTest.cs
@@ -23,16 +23,13 @@ namespace MonoTests.System.Windows.Forms
{
Panel p = new Panel ();
-#if NET_2_0
Assert.AreEqual (false, p.AutoSize, "A1");
Assert.AreEqual (AutoSizeMode.GrowOnly, p.AutoSizeMode, "A2");
-#endif
Assert.AreEqual (BorderStyle.None, p.BorderStyle, "A3");
Assert.AreEqual (false, p.TabStop, "A4");
Assert.AreEqual (string.Empty, p.Text, "A5");
}
-#if NET_2_0
[Test]
public void AutoSize ()
{
@@ -59,6 +56,5 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (new Size (0, 0), p.ClientSize, "A3");
f.Dispose ();
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PictureBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PictureBoxTest.cs
index 41e9290942e..708721573cd 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PictureBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PictureBoxTest.cs
@@ -42,7 +42,6 @@ namespace MonoTests.System.Windows.Forms
myForm.Dispose ();
}
-#if NET_2_0
[Test]
[Category ("NotWorking")]
public void ImageLocation_Async ()
@@ -236,7 +235,6 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#endif
[Test]
public void ImagePropertyTest ()
@@ -255,7 +253,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNull (myPicBox.Image, "#6");
}
-#if NET_2_0
[Test] // Load ()
public void Load_ImageLocation_Empty ()
{
@@ -387,7 +384,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNotNull (ex.Message, "#4");
}
}
-#endif
[Test]
public void ToStringMethodTest ()
@@ -396,7 +392,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("System.Windows.Forms.PictureBox, SizeMode: Normal", myPicBox.ToString (), "#T1");
}
-#if NET_2_0
[Test]
public void Defaults ()
{
@@ -410,7 +405,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (true, pb.AutoSize, "A4");
}
-#endif
[TestFixture]
public class PictureBoxSizeModeEventClass : TestHelper
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PrintDialogTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PrintDialogTest.cs
index dc1c7c6e612..d19859024b4 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PrintDialogTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PrintDialogTest.cs
@@ -48,11 +48,7 @@ namespace MonoTests.System.Windows.Forms
Assert.IsFalse (pd.AllowSelection, "#2");
Assert.IsFalse (pd.AllowSomePages, "#3");
Assert.IsNull (pd.Document, "#4");
-#if NET_2_0
Assert.IsNotNull (pd.PrinterSettings, "#5");
-#else
- Assert.IsNull (pd.PrinterSettings, "#5");
-#endif
Assert.IsFalse (pd.PrintToFile, "#6");
Assert.IsFalse (pd.ShowHelp, "#7");
Assert.IsTrue (pd.ShowNetwork, "#8");
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs
index e65c1cfa8f5..62c7f37d0c8 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ProgressBarTest.cs
@@ -60,11 +60,7 @@ namespace MonoTests.System.Windows.Forms
public void ForeColorTest ()
{
ProgressBar progressBar = new ProgressBar ();
-#if NET_2_0
Assert.AreEqual (SystemColors.Highlight, progressBar.ForeColor, "#A1");
-#else
- Assert.AreEqual (SystemColors.ControlText, progressBar.ForeColor, "#A1");
-#endif
progressBar.ForeColor = Color.Red;
Assert.AreEqual (Color.Red, progressBar.ForeColor, "#A2");
progressBar.ForeColor = Color.White;
@@ -92,19 +88,11 @@ namespace MonoTests.System.Windows.Forms
ProgressBar progressBar = new ProgressBar ();
progressBar.ForeColor = Color.Red;
progressBar.ResetForeColor ();
-#if NET_2_0
Assert.AreEqual (SystemColors.Highlight, progressBar.ForeColor);
-#else
- Assert.AreEqual (SystemColors.ControlText, progressBar.ForeColor);
-#endif
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void ValueTest ()
{
ProgressBar myProgressBar = new ProgressBar ();
@@ -116,11 +104,7 @@ namespace MonoTests.System.Windows.Forms
public void MinMax()
{
Type expectedArgExType;
-#if NET_2_0
expectedArgExType = typeof (ArgumentOutOfRangeException);
-#else
- expectedArgExType = typeof (ArgumentException);
-#endif
//
ProgressBar c = new ProgressBar ();
Assert.AreEqual (0, c.Minimum, "default_min");
@@ -134,18 +118,14 @@ namespace MonoTests.System.Windows.Forms
// MSDN says ArgumentException, but really its *subtype* ArgumentOutOfRangeException.
// Actually it changed in FX2.
Assert.AreEqual (expectedArgExType, ex.GetType (), "Typeof Min-1");
-#if NET_2_0
Assert.AreEqual ("Minimum", ex.ParamName, "ParamName Min-1"); // (culture insensitive).
-#endif
}
try {
c.Maximum = -1;
Assert.Fail ("should have thrown -- Max-1");
} catch (ArgumentException ex) {
Assert.AreEqual (expectedArgExType, ex.GetType (), "Typeof Max-1");
-#if NET_2_0
Assert.AreEqual ("Maximum", ex.ParamName, "ParamName Max-1"); // (culture insensitive).
-#endif
}
Assert.AreEqual (0, c.Minimum, "after Min/Max-1_min");
Assert.AreEqual (100, c.Maximum, "after Min/Max-1_max");
@@ -179,9 +159,7 @@ namespace MonoTests.System.Windows.Forms
Assert.Fail ("should have thrown -- 29");
} catch (ArgumentException ex) {
Assert.AreEqual (expectedArgExType, ex.GetType (), "Typeof 29");
-#if NET_2_0
Assert.AreEqual ("Value", ex.ParamName, "ParamName 29");
-#endif
}
Assert.AreEqual (45, c.Value, "after 29_value");
try {
@@ -189,9 +167,7 @@ namespace MonoTests.System.Windows.Forms
Assert.Fail ("should have thrown -- 51");
} catch (ArgumentException ex) {
Assert.AreEqual (expectedArgExType, ex.GetType (), "Typeof 51");
-#if NET_2_0
Assert.AreEqual ("Value", ex.ParamName, "ParamName 151");
-#endif
}
Assert.AreEqual (45, c.Value, "after 51_value");
}
@@ -254,7 +230,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (100, c.Value, "Increment30_4x");
}
-#if NET_2_0
[Test]
public void Styles ()
{
@@ -298,7 +273,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("value", ex.ParamName, "ParamName bad style 99");
}
}
-#endif
[Test]
public void ToStringMethodTest ()
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PropertyGridTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PropertyGridTest.cs
index ded2486b051..af1c5b40f22 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PropertyGridTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/PropertyGridTest.cs
@@ -32,44 +32,24 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (0, eventLogger.EventsRaised, "#A2");
pg.PropertySort = PropertySort.Alphabetical;
Assert.AreEqual (PropertySort.Alphabetical, pg.PropertySort, "#A3");
-#if NET_2_0
Assert.AreEqual (1, eventLogger.EventsRaised, "#A4");
Assert.AreEqual (1, eventLogger.CountEvents ("PropertySortChanged"), "#A5");
-#else
- Assert.AreEqual (0, eventLogger.EventsRaised, "#A4");
-#endif
pg.PropertySort = PropertySort.NoSort;
Assert.AreEqual (PropertySort.NoSort, pg.PropertySort, "#A6");
-#if NET_2_0
Assert.AreEqual (2, eventLogger.EventsRaised, "#A7");
Assert.AreEqual (2, eventLogger.CountEvents ("PropertySortChanged"), "#A8");
-#else
- Assert.AreEqual (0, eventLogger.EventsRaised, "#A7");
-#endif
pg.PropertySort = PropertySort.NoSort;
Assert.AreEqual (PropertySort.NoSort, pg.PropertySort, "#A9");
-#if NET_2_0
Assert.AreEqual (2, eventLogger.EventsRaised, "#A10");
Assert.AreEqual (2, eventLogger.CountEvents ("PropertySortChanged"), "#A11");
-#else
- Assert.AreEqual (0, eventLogger.EventsRaised, "#A10");
-#endif
pg.PropertySort = PropertySort.CategorizedAlphabetical;
Assert.AreEqual (PropertySort.CategorizedAlphabetical, pg.PropertySort, "#A12");
-#if NET_2_0
Assert.AreEqual (3, eventLogger.EventsRaised, "#A13");
Assert.AreEqual (3, eventLogger.CountEvents ("PropertySortChanged"), "#A14");
-#else
- Assert.AreEqual (0, eventLogger.EventsRaised, "#A13");
-#endif
pg.PropertySort = PropertySort.Categorized;
Assert.AreEqual (PropertySort.Categorized, pg.PropertySort, "#A14");
-#if NET_2_0
Assert.AreEqual (3, eventLogger.EventsRaised, "#A15");
Assert.AreEqual (3, eventLogger.CountEvents ("PropertySortChanged"), "#A16");
-#else
- Assert.AreEqual (0, eventLogger.EventsRaised, "#A17");
-#endif
pg = new PropertyGrid ();
eventLogger = new EventLogger (pg);
@@ -78,54 +58,26 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#B2");
pg.PropertySort = PropertySort.Alphabetical;
Assert.AreEqual (PropertySort.Alphabetical, pg.PropertySort, "#B3");
-#if NET_2_0
Assert.AreEqual (1, eventLogger.CountEvents ("PropertySortChanged"), "#B4");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#B4");
-#endif
pg.PropertySort = PropertySort.NoSort;
Assert.AreEqual (PropertySort.NoSort, pg.PropertySort, "#B5");
-#if NET_2_0
Assert.AreEqual (2, eventLogger.CountEvents ("PropertySortChanged"), "#B6");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#B6");
-#endif
pg.PropertySort = PropertySort.CategorizedAlphabetical;
Assert.AreEqual (PropertySort.CategorizedAlphabetical, pg.PropertySort, "#B7");
-#if NET_2_0
Assert.AreEqual (3, eventLogger.CountEvents ("PropertySortChanged"), "#B8");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#B8");
-#endif
pg.PropertySort = PropertySort.CategorizedAlphabetical;
Assert.AreEqual (PropertySort.CategorizedAlphabetical, pg.PropertySort, "#B9");
-#if NET_2_0
Assert.AreEqual (3, eventLogger.CountEvents ("PropertySortChanged"), "#B10");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#B10");
-#endif
pg.SelectedObject = null;
Assert.AreEqual (PropertySort.CategorizedAlphabetical, pg.PropertySort, "#C1");
-#if NET_2_0
Assert.AreEqual (3, eventLogger.CountEvents ("PropertySortChanged"), "#C2");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#C2");
-#endif
pg.PropertySort = PropertySort.Alphabetical;
Assert.AreEqual (PropertySort.Alphabetical, pg.PropertySort, "#C3");
-#if NET_2_0
Assert.AreEqual (4, eventLogger.CountEvents ("PropertySortChanged"), "#C4");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#C4");
-#endif
pg.PropertySort = PropertySort.NoSort;
Assert.AreEqual (PropertySort.NoSort, pg.PropertySort, "#C5");
-#if NET_2_0
Assert.AreEqual (5, eventLogger.CountEvents ("PropertySortChanged"), "#C6");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#C6");
-#endif
pg.SelectedObject = new Button ();
@@ -135,32 +87,16 @@ namespace MonoTests.System.Windows.Forms
form.Show ();
Assert.AreEqual (PropertySort.NoSort, pg.PropertySort, "#D1");
-#if NET_2_0
Assert.AreEqual (5, eventLogger.CountEvents ("PropertySortChanged"), "#D2");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#D2");
-#endif
pg.PropertySort = PropertySort.Alphabetical;
Assert.AreEqual (PropertySort.Alphabetical, pg.PropertySort, "#D3");
-#if NET_2_0
Assert.AreEqual (6, eventLogger.CountEvents ("PropertySortChanged"), "#D4");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#D4");
-#endif
pg.PropertySort = PropertySort.Categorized;
Assert.AreEqual (PropertySort.Categorized, pg.PropertySort, "#D5");
-#if NET_2_0
Assert.AreEqual (7, eventLogger.CountEvents ("PropertySortChanged"), "#D6");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#D6");
-#endif
pg.PropertySort = PropertySort.CategorizedAlphabetical;
Assert.AreEqual (PropertySort.CategorizedAlphabetical, pg.PropertySort, "#D7");
-#if NET_2_0
Assert.AreEqual (7, eventLogger.CountEvents ("PropertySortChanged"), "#D8");
-#else
- Assert.AreEqual (0, eventLogger.CountEvents ("PropertySortChanged"), "#D8");
-#endif
form.Dispose ();
}
@@ -169,7 +105,6 @@ namespace MonoTests.System.Windows.Forms
public void PropertySort_Invalid ()
{
PropertyGrid pg = new PropertyGrid ();
-#if NET_2_0
EventLogger eventLogger = new EventLogger (pg);
try {
pg.PropertySort = (PropertySort) 666;
@@ -188,10 +123,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (0, eventLogger.EventsRaised, "#10");
}
-#else
- pg.PropertySort = (PropertySort) 666;
- Assert.AreEqual ((PropertySort) 666, pg.PropertySort);
-#endif
}
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RadioButtonTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RadioButtonTest.cs
index cc8e1dfb23f..6becdb1a93c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RadioButtonTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RadioButtonTest.cs
@@ -106,7 +106,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("System.Windows.Forms.RadioButton, Checked: False" , rButton1.ToString (), "#9");
}
-#if NET_2_0
[Test]
public void AutoSizeText ()
{
@@ -125,7 +124,6 @@ namespace MonoTests.System.Windows.Forms
if (rb.Width == width)
Assert.Fail ("RadioButton did not autosize, actual: {0}", rb.Width);
}
-#endif
}
[TestFixture]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
index d4bee63603c..6d3f1adfb73 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RichTextBoxTest.cs
@@ -227,11 +227,7 @@ namespace MonoTests.System.Windows.Forms
RichTextBox rtb = new RichTextBox ();
rtb.ReadOnly = true;
Assert.IsTrue (rtb.ReadOnly, "#A1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, rtb.BackColor, "#A2");
-#else
- Assert.AreEqual (SystemColors.Window, rtb.BackColor, "#A2");
-#endif
Form form = new Form ();
form.ShowInTaskbar = false;
@@ -239,19 +235,11 @@ namespace MonoTests.System.Windows.Forms
form.Show ();
Assert.IsTrue (rtb.ReadOnly, "#B1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, rtb.BackColor, "#B2");
-#else
- Assert.AreEqual (SystemColors.Window, rtb.BackColor, "#B2");
-#endif
rtb.ResetBackColor ();
Assert.IsTrue (rtb.ReadOnly, "#C1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, rtb.BackColor, "#C2");
-#else
- Assert.AreEqual (SystemColors.Window, rtb.BackColor, "#C2");
-#endif
rtb.ReadOnly = false;
Assert.IsFalse (rtb.ReadOnly, "#D1");
@@ -259,11 +247,7 @@ namespace MonoTests.System.Windows.Forms
rtb.ReadOnly = true;
Assert.IsTrue (rtb.ReadOnly, "#E1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, rtb.BackColor, "#E2");
-#else
- Assert.AreEqual (SystemColors.Window, rtb.BackColor, "#E2");
-#endif
rtb.BackColor = Color.Red;
Assert.IsTrue (rtb.ReadOnly, "#F1");
@@ -279,11 +263,7 @@ namespace MonoTests.System.Windows.Forms
rtb.ResetBackColor ();
Assert.IsTrue (rtb.ReadOnly, "#I1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, rtb.BackColor, "#I2");
-#else
- Assert.AreEqual (SystemColors.Window, rtb.BackColor, "#I2");
-#endif
form.Close ();
}
@@ -340,11 +320,7 @@ namespace MonoTests.System.Windows.Forms
rtb.ReadOnly = true;
rtb.ResetBackColor ();
Assert.IsTrue (rtb.ReadOnly, "#G1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, rtb.BackColor, "#G2");
-#else
- Assert.AreEqual (SystemColors.Window, rtb.BackColor, "#G2");
-#endif
form.Dispose ();
@@ -410,7 +386,6 @@ namespace MonoTests.System.Windows.Forms
try {
rtb.SelectionLength = -1;
Assert.Fail ("#1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
@@ -418,14 +393,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNotNull (ex.ParamName, "#5");
Assert.AreEqual ("SelectionLength", ex.ParamName, "#6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- Assert.IsNull (ex.ParamName, "#5");
- }
-#endif
}
[Test]
@@ -435,7 +402,6 @@ namespace MonoTests.System.Windows.Forms
try {
rtb.SelectionStart = -1;
Assert.Fail ("#1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
@@ -443,14 +409,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNotNull (ex.ParamName, "#5");
Assert.AreEqual ("SelectionStart", ex.ParamName, "#6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- Assert.IsNull (ex.ParamName, "#5");
- }
-#endif
}
RichTextBox rtb;
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RowStyleTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RowStyleTest.cs
index 08aa46318db..3478f632a6a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RowStyleTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/RowStyleTest.cs
@@ -21,7 +21,6 @@
// (C) 2006 Novell, Inc.
//
-#if NET_2_0
using System;
using System.Windows.Forms;
@@ -86,4 +85,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SaveFileDialogTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SaveFileDialogTest.cs
index 59250310251..3cde97308fa 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SaveFileDialogTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SaveFileDialogTest.cs
@@ -144,21 +144,8 @@ namespace MonoTests.System.Windows.Forms
{
SaveFileDialog sfd = new SaveFileDialog ();
sfd.FileName = Path.InvalidPathChars [0] + "file";
-#if NET_2_0
Assert.IsNotNull (sfd.FileName, "#1");
Assert.AreEqual (Path.InvalidPathChars [0] + "file", sfd.FileName, "#2");
-#else
- try {
- string fileName = sfd.FileName;
- Assert.Fail ("#1: " + fileName);
- } catch (ArgumentException ex) {
- // The path contains illegal characters
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- //Assert.IsNull (ex.ParamName, "#5");
- }
-#endif
}
[Test]
@@ -183,22 +170,9 @@ namespace MonoTests.System.Windows.Forms
{
SaveFileDialog sfd = new SaveFileDialog ();
sfd.FileName = Path.InvalidPathChars [0] + "file";
-#if NET_2_0
Assert.IsNotNull (sfd.FileNames, "#1");
Assert.AreEqual (1, sfd.FileNames.Length, "#2");
Assert.AreEqual (Path.InvalidPathChars [0] + "file", sfd.FileNames [0], "#3");
-#else
- try {
- string [] fileNames = sfd.FileNames;
- Assert.Fail ("#1: " + fileNames.Length);
- } catch (ArgumentException ex) {
- // The path contains illegal characters
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- //Assert.IsNull (ex.ParamName, "#5");
- }
-#endif
}
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
index cfc9ac988f5..c07388d612e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollBarTest.cs
@@ -22,9 +22,7 @@ public class MyScrollBar : HScrollBar
public MyScrollBar () : base ()
{}
-#if NET_2_0
public Padding PublicDefaultMargin { get { return base.DefaultMargin; } }
-#endif
protected override void OnBackColorChanged (EventArgs e)
{
@@ -329,11 +327,7 @@ public class MyScrollBar : HScrollBar
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void ExceptionValueTest ()
{
MyScrollBar myscrlbar = new MyScrollBar ();
@@ -344,11 +338,7 @@ public class MyScrollBar : HScrollBar
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void ExceptionSmallChangeTest ()
{
MyScrollBar myscrlbar = new MyScrollBar ();
@@ -356,11 +346,7 @@ public class MyScrollBar : HScrollBar
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void ExceptionLargeChangeTest ()
{
MyScrollBar myscrlbar = new MyScrollBar ();
@@ -376,7 +362,6 @@ public class MyScrollBar : HScrollBar
myscrlbar.ToString (), "T5");
}
-#if NET_2_0
[Test]
public void DefaultMarginTest ()
{
@@ -467,7 +452,6 @@ public class MyScrollBar : HScrollBar
Assert.AreEqual (0, s.Maximum, "A2");
Assert.AreEqual (0, s.Value, "A3");
}
-#endif
[Test]
public void LargeSmallerThanSmallChange ()
@@ -1655,7 +1639,6 @@ public class MyScrollBar2 : HScrollBar
}
}
-#if NET_2_0
[TestFixture]
public class ScrollEventArgsTest : TestHelper
{
@@ -1691,5 +1674,4 @@ public class MyScrollBar2 : HScrollBar
Assert.AreEqual (ScrollEventType.EndScroll, e.Type, "A16");
}
}
-#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollableControlTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollableControlTest.cs
index 300263c3d19..57a8298ed0e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollableControlTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ScrollableControlTest.cs
@@ -222,7 +222,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (sc.AutoScroll, "#J2");
}
-#if NET_2_0
[Test]
public void MethodScrollToControl ()
{
@@ -343,7 +342,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (true, scrollable.VerticalScroll.Visible, "#C0");
}
-#endif
// Tests Xamarin-2562
[Test]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SelectionRangeTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SelectionRangeTest.cs
index 01435fb05fa..a61d73b921a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SelectionRangeTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SelectionRangeTest.cs
@@ -43,10 +43,8 @@ namespace MonoTests.System.Windows.Forms
// "9999-12-31 00:00:00", note not 23:59:59.
Assert.AreEqual (DateTime.MaxValue.Date, sr.End, "End");
-#if NET_2_0
Assert.AreEqual (DateTimeKind.Unspecified, sr.Start.Kind, "Start Kind");
Assert.AreEqual (DateTimeKind.Unspecified, sr.End.Kind, "End Kind");
-#endif
}
[Test]
@@ -90,13 +88,10 @@ namespace MonoTests.System.Windows.Forms
SelectionRange sr = new SelectionRange (new DateTime (2001, 1, 11), new DateTime (2008, 2, 17, 1, 2, 3));
Assert.AreEqual (new DateTime (2001, 1, 11), sr.Start, "Start");
Assert.AreEqual (new DateTime (2008, 2, 17), sr.End, "End");
-#if NET_2_0
Assert.AreEqual (DateTimeKind.Unspecified, sr.Start.Kind, "Start Kind");
Assert.AreEqual (DateTimeKind.Unspecified, sr.End.Kind, "End Kind");
-#endif
}
-#if NET_2_0
[Test]
public void TwoDatesConstructor_WithTimeWithKindLocal ()
{
@@ -134,7 +129,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (DateTimeKind.Utc, sr.Start.Kind, "Start Kind");
Assert.AreEqual (DateTimeKind.Local, sr.End.Kind, "End Kind");
}
-#endif
}
} \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs
index c33a15bba3f..642e7e6cd2b 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitContainerTests.cs
@@ -1,4 +1,3 @@
-#if NET_2_0
using System;
using NUnit.Framework;
using System.Windows.Forms;
@@ -309,4 +308,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitterTest.cs
index 4cf5e8284dd..c004d96cb71 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/SplitterTest.cs
@@ -43,7 +43,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (Splitter.SplitPosition, position_with_capture, "1");
}
-#if NET_2_0
[Test]
public void DefaultCursor ()
{
@@ -56,6 +55,5 @@ namespace MonoTests.System.Windows.Forms
{
public Cursor PublicDefaultCursor { get { return base.DefaultCursor; } }
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs
index 6dc94fe37ad..2725f0c83ae 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarPanelTest.cs
@@ -56,11 +56,7 @@ namespace MonoTests.System.Windows.Forms
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException(typeof(ArgumentException))]
-#endif
public void MinimumWidth4 ()
{
StatusBarPanel p = new StatusBarPanel ();
@@ -126,7 +122,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (width + 21, _myComputerPanel.Width, "#01");
}
}
-#if NET_2_0
[Test]
public void TagTest ()
{
@@ -149,7 +144,6 @@ namespace MonoTests.System.Windows.Forms
p.Name = null;
Assert.AreEqual ("", p.Name, "#3");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarTest.cs
index 256e59bd3e9..cb27b91d6c1 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusBarTest.cs
@@ -142,7 +142,6 @@ namespace MonoTests.System.Windows.Forms
}
-#if NET_2_0
[Test]
public void ItemByKeyTest ()
{
@@ -382,7 +381,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, c.IndexOfKey ("p3"), "#7");
Assert.AreEqual (-1, c.IndexOfKey ("p"), "#8");
}
-#endif
[Test]
public void PanelParentAlwaysSet()
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs
index d059cb23c00..eed45f2822a 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/StatusStripTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -206,4 +205,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
index 14a7790c0c7..97c3c3ae88c 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TabControlTest.cs
@@ -248,68 +248,36 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (2, tab.SelectedIndex, "#B1");
Assert.AreEqual (1, _selected_index_changed, "#B2");
tab.Controls.RemoveAt (2);
-#if NET_2_0
Assert.AreEqual (0, tab.SelectedIndex, "#B3");
-#else
- Assert.AreEqual (1, tab.SelectedIndex, "#B3");
-#endif
Assert.AreEqual (5, tab.TabPages.Count, "#B4");
Assert.AreEqual (2, _selected_index_changed, "#B5");
// remove not-selected tab
-#if NET_2_0
Assert.AreEqual (0, tab.SelectedIndex, "#C1");
-#else
- Assert.AreEqual (1, tab.SelectedIndex, "#C1");
-#endif
Assert.AreEqual (2, _selected_index_changed, "#C2");
tab.Controls.RemoveAt (3);
-#if NET_2_0
Assert.AreEqual (0, tab.SelectedIndex, "#C3");
-#else
- Assert.AreEqual (2, tab.SelectedIndex, "#C3");
-#endif
Assert.AreEqual (4, tab.TabPages.Count, "#C4");
-#if NET_2_0
Assert.AreEqual (2, _selected_index_changed, "#C5");
-#else
- Assert.AreEqual (3, _selected_index_changed, "#C5");
-#endif
// remove last tab
tab.Controls.RemoveAt (3);
-#if NET_2_0
Assert.AreEqual (0, tab.SelectedIndex, "#D1");
-#else
- Assert.AreEqual (2, tab.SelectedIndex, "#D1");
-#endif
Assert.AreEqual (3, tab.TabPages.Count, "#D2");
-#if NET_2_0
Assert.AreEqual (2, _selected_index_changed, "#D3");
-#else
- Assert.AreEqual (3, _selected_index_changed, "#D3");
-#endif
// remove first tab
tab.Controls.RemoveAt (0);
Assert.AreEqual (0, tab.SelectedIndex, "#E1");
Assert.AreEqual (2, tab.TabPages.Count, "#E2");
-#if NET_2_0
Assert.AreEqual (3, _selected_index_changed, "#E3");
-#else
- Assert.AreEqual (4, _selected_index_changed, "#E3");
-#endif
// remove remaining tabs
tab.Controls.RemoveAt (1);
tab.Controls.RemoveAt (0);
Assert.AreEqual (-1, tab.SelectedIndex, "#F1");
Assert.AreEqual (0, tab.TabPages.Count, "#F2");
-#if NET_2_0
Assert.AreEqual (4, _selected_index_changed, "#F3");
-#else
- Assert.AreEqual (5, _selected_index_changed, "#F3");
-#endif
}
[Test]
@@ -332,72 +300,36 @@ namespace MonoTests.System.Windows.Forms
// remove selected tab
tab.SelectedIndex = 2;
Assert.AreEqual (2, tab.SelectedIndex, "#B1");
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#B2");
-#else
- Assert.AreEqual (1, _selected_index_changed, "#B2");
-#endif
tab.Controls.RemoveAt (2);
-#if NET_2_0
Assert.AreEqual (0, tab.SelectedIndex, "#B3");
-#else
- Assert.AreEqual (1, tab.SelectedIndex, "#B3");
-#endif
Assert.AreEqual (5, tab.TabPages.Count, "#B4");
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#B5");
-#else
- Assert.AreEqual (2, _selected_index_changed, "#B5");
-#endif
// remove not-selected tab
tab.Controls.RemoveAt (3);
-#if NET_2_0
Assert.AreEqual (0, tab.SelectedIndex, "#C3");
-#else
- Assert.AreEqual (2, tab.SelectedIndex, "#C3");
-#endif
Assert.AreEqual (4, tab.TabPages.Count, "#C4");
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#C5");
-#else
- Assert.AreEqual (3, _selected_index_changed, "#C5");
-#endif
// remove last tab
tab.Controls.RemoveAt (3);
-#if NET_2_0
Assert.AreEqual (0, tab.SelectedIndex, "#D1");
-#else
- Assert.AreEqual (2, tab.SelectedIndex, "#D1");
-#endif
Assert.AreEqual (3, tab.TabPages.Count, "#D2");
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#D3");
-#else
- Assert.AreEqual (3, _selected_index_changed, "#D3");
-#endif
// remove first tab
tab.Controls.RemoveAt (0);
Assert.AreEqual (0, tab.SelectedIndex, "#E1");
Assert.AreEqual (2, tab.TabPages.Count, "#E2");
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#E3");
-#else
- Assert.AreEqual (4, _selected_index_changed, "#E3");
-#endif
// remove remaining tabs
tab.Controls.RemoveAt (1);
tab.Controls.RemoveAt (0);
Assert.AreEqual (0, tab.SelectedIndex, "#F1");
Assert.AreEqual (0, tab.TabPages.Count, "#F2");
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#F3");
-#else
- Assert.AreEqual (4, _selected_index_changed, "#F3");
-#endif
Form form = new Form ();
form.ShowInTaskbar = false;
@@ -405,11 +337,7 @@ namespace MonoTests.System.Windows.Forms
form.Show ();
Assert.AreEqual (-1, tab.SelectedIndex, "#G1");
Assert.AreEqual (0, tab.TabPages.Count, "#G2");
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#G3");
-#else
- Assert.AreEqual (4, _selected_index_changed, "#G3");
-#endif
}
[Test]
@@ -421,52 +349,28 @@ namespace MonoTests.System.Windows.Forms
tab.Controls.Add (new TabPage ());
tab.SelectedIndex = 0;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#A1");
-#else
- Assert.AreEqual (1, _selected_index_changed, "#A1");
-#endif
Assert.AreEqual (0, tab.SelectedIndex, "#A2");
tab.SelectedIndex = -1;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#B1");
-#else
- Assert.AreEqual (2, _selected_index_changed, "#B1");
-#endif
Assert.AreEqual (-1, tab.SelectedIndex, "#B2");
tab.SelectedIndex = 1;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#C1");
-#else
- Assert.AreEqual (3, _selected_index_changed, "#C1");
-#endif
Assert.AreEqual (1, tab.SelectedIndex, "#C2");
tab.SelectedIndex = 1;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#D1");
-#else
- Assert.AreEqual (3, _selected_index_changed, "#D1");
-#endif
Assert.AreEqual (1, tab.SelectedIndex, "#D2");
tab.SelectedIndex = 6;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#E1");
-#else
- Assert.AreEqual (4, _selected_index_changed, "#E1");
-#endif
Assert.AreEqual (6, tab.SelectedIndex, "#E2");
tab.SelectedIndex = 6;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#E31");
-#else
- Assert.AreEqual (4, _selected_index_changed, "#E3");
-#endif
Assert.AreEqual (6, tab.SelectedIndex, "#E4");
Form form = new Form ();
@@ -478,35 +382,19 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (0, tab.SelectedIndex, "#E5");
tab.SelectedIndex = 0;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#F1");
-#else
- Assert.AreEqual (4, _selected_index_changed, "#F1");
-#endif
Assert.AreEqual (0, tab.SelectedIndex, "#F2");
tab.SelectedIndex = -1;
-#if NET_2_0
Assert.AreEqual (1, _selected_index_changed, "#G1");
-#else
- Assert.AreEqual (5, _selected_index_changed, "#G1");
-#endif
Assert.AreEqual (-1, tab.SelectedIndex, "#G2");
tab.SelectedIndex = 1;
-#if NET_2_0
Assert.AreEqual (2, _selected_index_changed, "#H1");
-#else
- Assert.AreEqual (6, _selected_index_changed, "#H1");
-#endif
Assert.AreEqual (1, tab.SelectedIndex, "#H2");
tab.SelectedIndex = 1;
-#if NET_2_0
Assert.AreEqual (2, _selected_index_changed, "#I1");
-#else
- Assert.AreEqual (6, _selected_index_changed, "#I1");
-#endif
Assert.AreEqual (1, tab.SelectedIndex, "#I2");
form.Dispose ();
@@ -518,11 +406,7 @@ namespace MonoTests.System.Windows.Forms
TabControl c = new TabControl ();
c.SelectedIndexChanged += new EventHandler (SelectedIndexChanged);
c.SelectedIndex = 0;
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#1");
-#else
- Assert.AreEqual (1, _selected_index_changed, "#1");
-#endif
c.TabPages.Add (new TabPage ());
c.TabPages.Add (new TabPage ());
@@ -531,17 +415,9 @@ namespace MonoTests.System.Windows.Forms
f.ShowInTaskbar = false;
f.Controls.Add (c);
f.Show ();
-#if NET_2_0
Assert.AreEqual (0, _selected_index_changed, "#3");
-#else
- Assert.AreEqual (1, _selected_index_changed, "#3");
-#endif
c.SelectedIndex = 2; // beyond the pages - ignored
-#if NET_2_0
Assert.AreEqual (1, _selected_index_changed, "#4");
-#else
- Assert.AreEqual (2, _selected_index_changed, "#4");
-#endif
Assert.AreEqual (0, c.SelectedIndex, "#4");
f.Dispose ();
}
@@ -563,7 +439,6 @@ namespace MonoTests.System.Windows.Forms
try {
tab.SelectedIndex = -2;
Assert.Fail ("#B1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNotNull (ex.Message, "#B3");
@@ -573,16 +448,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNotNull (ex.ParamName, "#B7");
Assert.AreEqual ("SelectedIndex", ex.ParamName, "#B8");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.Message, "#B3");
- Assert.IsTrue (ex.Message.IndexOf ("'-2'") != -1, "#B4");
- Assert.IsTrue (ex.Message.IndexOf ("'value'") != -1, "#B5");
- Assert.IsTrue (ex.Message.IndexOf ("-1") != -1, "#B6");
- Assert.IsNull (ex.ParamName, "#B7");
- }
-#endif
Assert.AreEqual (0, _selected_index_changed, "#C1");
Assert.AreEqual (-1, tab.SelectedIndex, "#C2");
@@ -593,7 +458,6 @@ namespace MonoTests.System.Windows.Forms
try {
tab.SelectedIndex = -5;
Assert.Fail ("#D1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#D2");
Assert.IsNotNull (ex.Message, "#D3");
@@ -603,16 +467,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNotNull (ex.ParamName, "#D7");
Assert.AreEqual ("SelectedIndex", ex.ParamName, "#D8");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#D2");
- Assert.IsNotNull (ex.Message, "#D3");
- Assert.IsTrue (ex.Message.IndexOf ("'-5'") != -1, "#D4");
- Assert.IsTrue (ex.Message.IndexOf ("'value'") != -1, "#D5");
- Assert.IsTrue (ex.Message.IndexOf ("-1") != -1, "#D6");
- Assert.IsNull (ex.ParamName, "#D7");
- }
-#endif
Assert.AreEqual (-1, tab.SelectedIndex, "#E1");
tab.SelectedIndex = -1;
@@ -711,7 +565,6 @@ namespace MonoTests.System.Windows.Forms
_selected_index_changed++;
}
-#if NET_2_0
[Test]
public void MethodSelectTab ()
{
@@ -897,7 +750,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, tc.SelectedIndex, "#A0");
}
-#endif
}
[TestFixture]
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
index 2d5ad06b067..acade5f6933 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TableLayoutTest.cs
@@ -26,7 +26,6 @@
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Drawing;
using System.IO;
@@ -1723,4 +1722,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TestHelper.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TestHelper.cs
index 55f8dcf2c2f..0d11647eaac 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TestHelper.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TestHelper.cs
@@ -29,7 +29,6 @@ namespace MonoTests.System.Windows.Forms
[TearDown]
protected virtual void TearDown () {
-#if NET_2_0
int c = Application.OpenForms.Count;
if (c > 0) {
Console.WriteLine ("HEY! You created " + c.ToString () + " form(s) and you didn't dispose of them!");
@@ -38,7 +37,6 @@ namespace MonoTests.System.Windows.Forms
for (int i = Application.OpenForms.Count - 1; i >= 0; i--) {
Application.OpenForms[i].Dispose ();
}
-#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
index 272e713b0b3..c2f6b7b3492 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TextBoxTest.cs
@@ -91,23 +91,16 @@ namespace MonoTests.System.Windows.Forms
textBox.PasswordChar = '*';
Assert.AreEqual ('*', textBox.PasswordChar, "#23b");
Assert.AreEqual (ScrollBars.None, textBox.ScrollBars, "#24");
-#if NET_2_0
Assert.AreEqual (0, textBox.SelectionLength, "#25-NET20");
-#else
- Assert.AreEqual (-1, textBox.SelectionLength, "#25-NET11");
-#endif
Assert.AreEqual (HorizontalAlignment.Left , textBox.TextAlign, "#26");
-#if NET_2_0
Assert.AreEqual (true, textBox.AutoCompleteCustomSource != null, "#27");
Assert.AreEqual (AutoCompleteMode.None, textBox.AutoCompleteMode, "#28");
Assert.AreEqual (AutoCompleteSource.None, textBox.AutoCompleteSource, "#29");
textBox.AutoCompleteCustomSource = null;
Assert.AreEqual (true, textBox.AutoCompleteCustomSource != null, "#30");
-#endif
}
-#if NET_2_0
[Test]
public void UseSystemPasswordCharDefault()
{
@@ -121,7 +114,6 @@ namespace MonoTests.System.Windows.Forms
textBox.UseSystemPasswordChar = true;
Assert.AreEqual('*', textBox.PasswordChar);
}
-#endif
[Test]
public void AppendTextTest ()
@@ -388,13 +380,8 @@ namespace MonoTests.System.Windows.Forms
textBoxB.TabIndex = 1;
form.Controls.Add (textBoxB);
-#if NET_2_0
Assert.AreEqual (String.Empty, textBoxA.SelectedText, "#A1 (2.0)");
Assert.AreEqual (String.Empty, textBoxB.SelectedText, "#A2 (2.0)");
-#else
- Assert.IsNull (textBoxA.SelectedText, "#A1");
- Assert.IsNull (textBoxB.SelectedText, "#A2");
-#endif
form.Show ();
@@ -466,11 +453,7 @@ namespace MonoTests.System.Windows.Forms
{
textBox.ReadOnly = true;
Assert.IsTrue (textBox.ReadOnly, "#A1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, textBox.BackColor, "#A2");
-#else
- Assert.AreEqual (SystemColors.Window, textBox.BackColor, "#A2");
-#endif
Form form = new Form ();
form.ShowInTaskbar = false;
@@ -478,19 +461,11 @@ namespace MonoTests.System.Windows.Forms
form.Show ();
Assert.IsTrue (textBox.ReadOnly, "#B1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, textBox.BackColor, "#B2");
-#else
- Assert.AreEqual (SystemColors.Window, textBox.BackColor, "#B2");
-#endif
textBox.ResetBackColor ();
Assert.IsTrue (textBox.ReadOnly, "#C1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, textBox.BackColor, "#C2");
-#else
- Assert.AreEqual (SystemColors.Window, textBox.BackColor, "#C2");
-#endif
textBox.ReadOnly = false;
Assert.IsFalse (textBox.ReadOnly, "#D1");
@@ -498,11 +473,7 @@ namespace MonoTests.System.Windows.Forms
textBox.ReadOnly = true;
Assert.IsTrue (textBox.ReadOnly, "#E1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, textBox.BackColor, "#E2");
-#else
- Assert.AreEqual (SystemColors.Window, textBox.BackColor, "#E2");
-#endif
textBox.BackColor = Color.Red;
Assert.IsTrue (textBox.ReadOnly, "#F1");
@@ -518,11 +489,7 @@ namespace MonoTests.System.Windows.Forms
textBox.ResetBackColor ();
Assert.IsTrue (textBox.ReadOnly, "#I1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, textBox.BackColor, "#I2");
-#else
- Assert.AreEqual (SystemColors.Window, textBox.BackColor, "#I2");
-#endif
form.Close ();
}
@@ -562,11 +529,7 @@ namespace MonoTests.System.Windows.Forms
textBox.ReadOnly = true;
textBox.ResetBackColor ();
Assert.IsTrue (textBox.ReadOnly, "#G1");
-#if NET_2_0
Assert.AreEqual (SystemColors.Control, textBox.BackColor, "#G2");
-#else
- Assert.AreEqual (SystemColors.Window, textBox.BackColor, "#G2");
-#endif
form.Dispose ();
@@ -681,13 +644,8 @@ namespace MonoTests.System.Windows.Forms
TextBox tb = new TextBox ();
RichTextBox rtb = new RichTextBox ();
-#if NET_2_0
Assert.AreEqual (0, tb.SelectionLength, "#1");
Assert.AreEqual (0, rtb.SelectionLength, "#2");
-#else
- Assert.AreEqual (-1, tb.SelectionLength, "#1");
- Assert.AreEqual (-1, rtb.SelectionLength, "#2");
-#endif
IntPtr i = tb.Handle;
i = rtb.Handle;
@@ -703,7 +661,6 @@ namespace MonoTests.System.Windows.Forms
try {
tb.SelectionLength = -1;
Assert.Fail ("#1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
@@ -711,14 +668,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNotNull (ex.ParamName, "#5");
Assert.AreEqual ("SelectionLength", ex.ParamName, "#6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- Assert.IsNull (ex.ParamName, "#5");
- }
-#endif
}
[Test]
@@ -728,7 +677,6 @@ namespace MonoTests.System.Windows.Forms
try {
tb.SelectionStart = -1;
Assert.Fail ("#1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
@@ -736,14 +684,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsNotNull (ex.ParamName, "#5");
Assert.AreEqual ("SelectionStart", ex.ParamName, "#6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- Assert.IsNull (ex.ParamName, "#5");
- }
-#endif
}
[Test]
@@ -923,7 +863,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[TestFixture]
public class TextBoxAutoCompleteSourceConverterTest : TestHelper
{
@@ -953,5 +892,4 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs
index 2e5781a198b..110dc71a664 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TimerTest.cs
@@ -23,11 +23,7 @@ namespace MonoTests.System.Windows.Forms
bool Ticked;
[Test ()]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void IntervalException1 ()
{
Timer timer = new Timer ();
@@ -35,11 +31,7 @@ namespace MonoTests.System.Windows.Forms
}
[Test ()]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException), "'-1' is not a valid value for Interval. Interval must be greater than 0.")]
-#endif
public void IntervalException2 ()
{
Timer timer = new Timer ();
@@ -54,11 +46,7 @@ namespace MonoTests.System.Windows.Forms
}
[Test ()]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException), "'-2147483648' is not a valid value for Interval. Interval must be greater than 0.")]
-#endif
public void IntervalException4 ()
{
Timer timer = new Timer ();
@@ -99,7 +87,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test]
public void TagTest ()
{
@@ -107,7 +94,6 @@ namespace MonoTests.System.Windows.Forms
timer.Tag = "a";
Assert.AreEqual ("a", timer.Tag, "1");
}
-#endif
/* Application.DoEvents and Sleep are not guarenteed on Linux
[Test]
@@ -150,9 +136,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (false, timer.Enabled, "E1");
Assert.AreEqual (100, timer.Interval, "I1");
Assert.AreEqual (null, timer.Site, "S1");
-#if NET_2_0
Assert.AreEqual (null, timer.Tag, "T1");
-#endif
}
[Test] // bug #325033
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarButtonTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarButtonTest.cs
index adc5f0dd6d8..0a96d5a04a0 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarButtonTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolBarButtonTest.cs
@@ -78,7 +78,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("", tbb.Text, "A3");
}
-#if NET_2_0
[Test]
public void Name ()
{
@@ -110,7 +109,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, b.ImageIndex, "D5");
Assert.AreEqual ("test", b.ImageKey, "D6");
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripButtonTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripButtonTest.cs
index fd398063ea2..ed58a7253be 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripButtonTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripButtonTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -447,4 +446,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripComboBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripComboBoxTest.cs
index 67d75278aee..cb97f03f9a2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripComboBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripComboBoxTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -376,4 +375,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs
index f56ec190114..9b00bd693cf 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContainerTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -141,4 +140,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs
index a717a7dc7d3..668b2db6376 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripContentPanelTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -120,4 +119,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripControlHostTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripControlHostTest.cs
index c5028d20534..895e3732b1f 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripControlHostTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripControlHostTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -531,4 +530,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownItemTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownItemTest.cs
index 2cd3dbb836f..231df27aa2f 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownItemTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownItemTest.cs
@@ -26,7 +26,6 @@
// Carlos Alberto Cortez <calberto.cortez@gmail.com>
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -64,5 +63,4 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs
index 3c3f73ff424..20856807e65 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripDropDownTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -172,4 +171,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemCollectionTest.cs
index 2424f3305be..db53ecf2332 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemCollectionTest.cs
@@ -26,7 +26,6 @@
// Gert Driesen (drieseng@users.sourceforge.net)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Windows.Forms;
@@ -484,4 +483,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemTest.cs
index 60d02920bf1..b19514164b5 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripItemTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -1275,4 +1274,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripLabelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripLabelTest.cs
index ebf9a45064d..561c4b52973 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripLabelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripLabelTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -414,4 +413,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs
index 0620fc5bf17..c9a11bc9bea 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripManagerTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -919,4 +918,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
index c917b0361f1..36bd0f5a5d9 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripMenuItemTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -325,4 +324,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs
index 94b220495ce..f387a9c3307 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowButtonTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -142,4 +141,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs
index 8518ad009f8..3ef7a589f0e 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripOverflowTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -48,4 +47,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs
index 281dea908f0..5bd49622ba9 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripPanelTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -210,4 +209,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripProgressBarTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripProgressBarTest.cs
index 0f24f9b3a6d..082667a34de 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripProgressBarTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripProgressBarTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -322,4 +321,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripSeparatorTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripSeparatorTest.cs
index 9458d5dbf89..3deececdd11 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripSeparatorTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripSeparatorTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -105,4 +104,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs
index 495dd68e6f7..1d47f060954 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripStatusLabelTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -204,4 +203,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTest.cs
index 67ecf6250ed..cdf1f0dfc71 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTest.cs
@@ -26,7 +26,6 @@
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -857,4 +856,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTextBoxTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTextBoxTest.cs
index f8c16eb1399..9e937fd5df4 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTextBoxTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ToolStripTextBoxTest.cs
@@ -25,7 +25,6 @@
// Authors:
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using System.Collections.Generic;
using System.Text;
@@ -388,4 +387,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs
index fbb61684abe..71995cc9788 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TrackBarTest.cs
@@ -51,11 +51,7 @@ namespace MonoTests.System.Windows.Forms
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void LargeChangeTest ()
{
TrackBar myTrackBar = new TrackBar ();
@@ -63,11 +59,7 @@ namespace MonoTests.System.Windows.Forms
}
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void SmallChangeTest ()
{
TrackBar myTrackBar = new TrackBar ();
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeCollectionTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeCollectionTest.cs
index 6d07b32c341..5feec9ecb6f 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeCollectionTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeCollectionTest.cs
@@ -22,26 +22,19 @@ namespace MonoTests.System.Windows.Forms
tv.Nodes.Add("text");
Assert.AreEqual(1, tv.Nodes.Count, "#A1");
Assert.AreEqual("text", tv.Nodes[0].Text, "#A2");
-#if NET_2_0
Assert.AreEqual("", tv.Nodes[0].Name, "#A3");
-#endif
tv.Nodes.Clear();
tv.Nodes.Add(new TreeNode());
Assert.AreEqual("", tv.Nodes[0].Text, "#B1");
-#if NET_2_0
Assert.AreEqual("", tv.Nodes[0].Name, "#B2");
-#endif
-#if NET_2_0
tv.Nodes.Clear();
tv.Nodes.Add("key", "text");
Assert.AreEqual("text", tv.Nodes[0].Text, "#C1");
Assert.AreEqual("key", tv.Nodes[0].Name, "#C2");
-#endif
-#if NET_2_0
tv.Nodes.Clear();
imglist = new ImageList();
imglist.Images.Add("image key", new Bitmap(16, 16));
@@ -51,9 +44,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual("key", tv.Nodes[0].Name, "#D2");
Assert.AreEqual(0, tv.Nodes[0].ImageIndex, "#D3");
Assert.AreEqual("", tv.Nodes[0].ImageKey, "#D4");
-#endif
-#if NET_2_0
tv.Nodes.Clear();
imglist = new ImageList();
imglist.Images.Add("image key", new Bitmap(16, 16));
@@ -63,9 +54,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual("key", tv.Nodes[0].Name, "#E2");
Assert.AreEqual(-1, tv.Nodes[0].ImageIndex, "#E3");
Assert.AreEqual("image key", tv.Nodes[0].ImageKey, "#E4");
-#endif
-#if NET_2_0
tv.Nodes.Clear();
imglist = new ImageList();
imglist.Images.Add("image key", new Bitmap(16, 16));
@@ -78,9 +67,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual("", tv.Nodes[0].ImageKey, "#F4");
Assert.AreEqual(1, tv.Nodes[0].SelectedImageIndex, "#F5");
Assert.AreEqual("", tv.Nodes[0].SelectedImageKey, "#F6");
-#endif
-#if NET_2_0
tv.Nodes.Clear();
imglist = new ImageList();
imglist.Images.Add("image key", new Bitmap(16, 16));
@@ -93,9 +80,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual("image key", tv.Nodes[0].ImageKey, "#G4");
Assert.AreEqual(-1, tv.Nodes[0].SelectedImageIndex, "#G5");
Assert.AreEqual("selected image key", tv.Nodes[0].SelectedImageKey, "#G6");
-#endif
-#if NET_2_0
tv.Nodes.Clear();
tv.Nodes.Add("key", "text");
tv.Nodes.Add("key", "text 2");
@@ -107,7 +92,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue(tv.Nodes.ContainsKey("key"), "#I1");
Assert.AreEqual(0, tv.Nodes.IndexOfKey("key"), "#I2");
-#endif
}
[Test]
@@ -415,9 +399,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNull (ex.ActualValue, "#B3");
Assert.IsNull (ex.InnerException, "#B4");
-#if NET_2_0
Assert.AreEqual ("index", ex.ParamName, "#B5");
-#endif
}
try {
@@ -427,9 +409,7 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
Assert.IsNull (ex.ActualValue, "#C3");
Assert.IsNull (ex.InnerException, "#C4");
-#if NET_2_0
Assert.AreEqual ("index", ex.ParamName, "#C5");
-#endif
}
try {
@@ -439,9 +419,7 @@ namespace MonoTests.System.Windows.Forms
// Parameter must be of type TreeNode
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#D2");
Assert.IsNull (ex.InnerException, "#D3");
-#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#D4");
-#endif
}
try {
@@ -451,13 +429,10 @@ namespace MonoTests.System.Windows.Forms
// Parameter must be of type TreeNode
Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#E2");
Assert.IsNull (ex.InnerException, "#E3");
-#if NET_2_0
Assert.AreEqual ("value", ex.ParamName, "#E4");
-#endif
}
}
-#if NET_2_0
[Test]
public void ContainsKey ()
{
@@ -491,7 +466,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (-1, tv.Nodes.IndexOfKey ("42"), "#KI2");
}
-#endif
[Test]
public void Bug408999 ()
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeTest.cs
index 731e2cbc5ba..0b6aa93267d 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeNodeTest.cs
@@ -123,19 +123,11 @@ namespace MonoTests.System.Windows.Forms {
// due to previous statement throwing an
// exception
Console.WriteLine (s);
-#if NET_2_0
} catch (InvalidOperationException ex) {
Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2");
Assert.IsNotNull (ex.Message, "#3");
Assert.IsNull (ex.InnerException, "#4");
}
-#else
- } catch (Exception ex) {
- Assert.AreEqual (typeof (Exception), ex.GetType (), "#2");
- Assert.IsNotNull (ex.Message, "#3");
- Assert.IsNull (ex.InnerException, "#4");
- }
-#endif
}
[Test]
@@ -285,7 +277,6 @@ namespace MonoTests.System.Windows.Forms {
f.Dispose ();
}
-#if NET_2_0
[Test]
public void PropertyName ()
{
@@ -335,7 +326,6 @@ namespace MonoTests.System.Windows.Forms {
Assert.AreEqual ("Woo", tn.ToolTipText, "A2");
}
-#if NET_2_0
[Test]
public void ImageKeyIndex ()
{
@@ -359,7 +349,6 @@ namespace MonoTests.System.Windows.Forms {
Assert.AreEqual (2, tn.ImageIndex, "A7");
Assert.AreEqual (string.Empty, tn.ImageKey, "A8");
}
-#endif
//[Test]
//public void MethodSerialize ()
@@ -381,6 +370,5 @@ namespace MonoTests.System.Windows.Forms {
base.Serialize (si, context);
}
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewHitTestInfoTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewHitTestInfoTest.cs
index 4ef23f33c81..68f407144d2 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewHitTestInfoTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewHitTestInfoTest.cs
@@ -14,7 +14,6 @@ using System.Runtime.Remoting;
using NUnit.Framework;
-#if NET_2_0
namespace MonoTests.System.Windows.Forms {
[TestFixture]
@@ -51,4 +50,3 @@ namespace MonoTests.System.Windows.Forms {
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageIndexConverterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageIndexConverterTest.cs
index a91154dc0d5..070c0a19875 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageIndexConverterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageIndexConverterTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -81,4 +80,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageKeyConverterTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageKeyConverterTest.cs
index fdf58cf2c1e..fce88412bcc 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageKeyConverterTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewImageKeyConverterTest.cs
@@ -20,7 +20,6 @@
// Copyright (c) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.ComponentModel;
@@ -46,4 +45,3 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewTest.cs
index 27d4a267370..33b1a999873 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/TreeViewTest.cs
@@ -37,7 +37,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual (tv.SelectedNode, null, "#4");
}
-#if NET_2_0
[Test] // bug #81424
public void DoubleBuffered ()
{
@@ -56,7 +55,6 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (tv.GetControlStyle (ControlStyles.OptimizedDoubleBuffer), "#B4");
Assert.IsFalse (tv.GetControlStyle (ControlStyles.UserPaint), "#B5");
}
-#endif
[Test]
public void SimpleShowTest ()
@@ -240,13 +238,8 @@ namespace MonoTests.System.Windows.Forms
Assert.IsTrue (tv.Nodes [0].IsExpanded, "#E1");
Assert.IsTrue (tv.Nodes [99].IsExpanded, "#E2");
-#if NET_2_0
Assert.IsTrue (tv.Nodes [0].IsVisible, "#F1");
Assert.IsFalse (tv.Nodes [99].IsVisible, "#F2");
-#else
- Assert.IsFalse (tv.Nodes [0].IsVisible, "#F1");
- Assert.IsTrue (tv.Nodes [99].IsVisible, "#F2");
-#endif
form.Dispose ();
}
@@ -258,12 +251,10 @@ namespace MonoTests.System.Windows.Forms
return base.GetStyle (style);
}
-#if NET_2_0
public bool IsDoubleBuffered {
get { return DoubleBuffered; }
set { DoubleBuffered = value; }
}
-#endif
}
[Test]
@@ -287,7 +278,6 @@ namespace MonoTests.System.Windows.Forms
}
}
-#if NET_2_0
[Test]
public void SelectedNodeNullTest ()
{
@@ -346,7 +336,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("f", tv.Nodes [1].Text, "#A2");
Assert.AreEqual ("x", tv.Nodes [2].Text, "#A3");
}
-#endif
[Test]
public void MethodToString ()
@@ -621,7 +610,6 @@ namespace MonoTests.System.Windows.Forms
int afterSelect;
}
-#if NET_2_0
[TestFixture]
public class TreeViewNodeSorterTest : TestHelper {
static bool node_sorter_called;
@@ -821,5 +809,4 @@ namespace MonoTests.System.Windows.Forms
}
}
}
-#endif
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UpDownTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UpDownTest.cs
index f1e15738937..0a0083381f1 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UpDownTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UpDownTest.cs
@@ -389,7 +389,6 @@ namespace MonoTests.System.Windows.Forms
try {
nud.Value = 1000;
Assert.Fail ("#A1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNotNull (ex.Message, "#A3");
@@ -397,19 +396,10 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("Value", ex.ParamName, "#A5");
Assert.IsNull (ex.InnerException, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNotNull (ex.Message, "#A3");
- Assert.IsNull (ex.ParamName, "#A4");
- Assert.IsNull (ex.InnerException, "#A5");
- }
-#endif
try {
nud.Value = 1000;
Assert.Fail ("#B1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2");
Assert.IsNotNull (ex.Message, "#B3");
@@ -417,19 +407,10 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("Value", ex.ParamName, "#B5");
Assert.IsNull (ex.InnerException, "#B6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.Message, "#B3");
- Assert.IsNull (ex.ParamName, "#B4");
- Assert.IsNull (ex.InnerException, "#B5");
- }
-#endif
try {
nud.Value = -1000;
Assert.Fail ("#C1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2");
Assert.IsNotNull (ex.Message, "#C3");
@@ -437,14 +418,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("Value", ex.ParamName, "#C5");
Assert.IsNull (ex.InnerException, "#C6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#C2");
- Assert.IsNotNull (ex.Message, "#C3");
- Assert.IsNull (ex.ParamName, "#C4");
- Assert.IsNull (ex.InnerException, "#C5");
- }
-#endif
nud.BeginInit ();
@@ -458,7 +431,6 @@ namespace MonoTests.System.Windows.Forms
try {
nud.Value = -1000;
Assert.Fail ("#E1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#E2");
Assert.IsNotNull (ex.Message, "#E3");
@@ -466,14 +438,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("Value", ex.ParamName, "#E5");
Assert.IsNull (ex.InnerException, "#E6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#E2");
- Assert.IsNotNull (ex.Message, "#E3");
- Assert.IsNull (ex.ParamName, "#E4");
- Assert.IsNull (ex.InnerException, "#E5");
- }
-#endif
}
void NumericUpDown_TextChanged (object sender, EventArgs e)
@@ -900,7 +864,6 @@ namespace MonoTests.System.Windows.Forms
try {
dud.SelectedIndex = -2;
Assert.Fail ("#A1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNotNull (ex.Message, "#A3");
@@ -908,19 +871,10 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("SelectedIndex", ex.ParamName, "#A5");
Assert.IsNull (ex.InnerException, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2");
- Assert.IsNotNull (ex.Message, "#A3");
- Assert.IsNull (ex.ParamName, "#A4");
- Assert.IsNull (ex.InnerException, "#A5");
- }
-#endif
try {
dud.SelectedIndex = 1;
Assert.Fail ("#B1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2");
Assert.IsNotNull (ex.Message, "#A3");
@@ -928,14 +882,6 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual ("SelectedIndex", ex.ParamName, "#A5");
Assert.IsNull (ex.InnerException, "#A6");
}
-#else
- } catch (ArgumentException ex) {
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2");
- Assert.IsNotNull (ex.Message, "#B3");
- Assert.IsNull (ex.ParamName, "#B4");
- Assert.IsNull (ex.InnerException, "#B5");
- }
-#endif
}
[Test]
@@ -1048,7 +994,6 @@ namespace MonoTests.System.Windows.Forms
private readonly string _text;
}
-#if NET_2_0
[Test]
public void Defaults ()
{
@@ -1085,6 +1030,5 @@ namespace MonoTests.System.Windows.Forms
throw new Exception ("The method or operation is not implemented.");
}
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs
index d86ebc4eb7c..52b5ad8aaf9 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/UserControlTest.cs
@@ -52,7 +52,6 @@ namespace MonoTests.System.Windows.Forms
{
Assert.AreEqual(string.Empty, uc.Text, "#A1");
-#if NET_2_0
Assert.AreEqual(BorderStyle.None, uc.BorderStyle, "#A2");
uc.BorderStyle = BorderStyle.Fixed3D;
Assert.AreEqual(BorderStyle.Fixed3D, uc.BorderStyle, "#A3");
@@ -60,10 +59,8 @@ namespace MonoTests.System.Windows.Forms
Assert.AreEqual(BorderStyle.FixedSingle, uc.BorderStyle, "#A4");
uc.BorderStyle = BorderStyle.None;
Assert.AreEqual(BorderStyle.None, uc.BorderStyle, "#A5");
-#endif
}
-#if NET_2_0
[Test]
[ExpectedException(typeof(InvalidEnumArgumentException))]
public void BorderStyleInvalidEnumArgumentException()
@@ -172,6 +169,5 @@ namespace MonoTests.System.Windows.Forms
f.Dispose ();
}
-#endif
}
}
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/VScrollPropertiesTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/VScrollPropertiesTest.cs
index 5bf9a256c40..e21a8da7818 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/VScrollPropertiesTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/VScrollPropertiesTest.cs
@@ -26,7 +26,6 @@
// Jonathan Pobst (monkey@jpobst.com)
//
-#if NET_2_0
using System;
using NUnit.Framework;
using System.Drawing;
@@ -124,4 +123,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif \ No newline at end of file
diff --git a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/WebBrowserTest.cs b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/WebBrowserTest.cs
index 772df99b023..f9e582b53c3 100644
--- a/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/WebBrowserTest.cs
+++ b/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/WebBrowserTest.cs
@@ -23,7 +23,6 @@
// Andreia Gaita (avidigal@novell.com)
//
-#if NET_2_0
using System;
using System.Drawing;
@@ -134,4 +133,3 @@ namespace MonoTests.System.Windows.Forms
}
}
-#endif \ No newline at end of file