Merge pull request #1936 from esdrubal/DotNetRelativeOrAbsolute
[mono.git] / mcs / class / System / Test / System.ComponentModel / PropertyDescriptorTests.cs
index 25e29b1ff25736c61db664a567741f7ae9162880..f81baa6a984c5408debfe0a6da673e2dc2191bce 100644 (file)
@@ -372,9 +372,7 @@ namespace MonoTests.System.ComponentModel
 
                class DisplayName_test
                {
-#if NET_2_0
                        [DisplayName ("An explicit displayname")]
-#endif
                        public bool Explicit {
                                get { return false; }
                        }
@@ -402,10 +400,8 @@ namespace MonoTests.System.ComponentModel
 
 #if MOBILE
                        [TypeConverter("System.ComponentModel.CharConverter, System, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
-#elif NET_4_0
-                       [TypeConverter("System.ComponentModel.CharConverter, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
 #else
-                       [TypeConverter("System.ComponentModel.CharConverter, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+                       [TypeConverter("System.ComponentModel.CharConverter, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
 #endif
                        public virtual Version WithConverterNamedAssmQuald {
                                get { return null; }
@@ -732,11 +728,7 @@ namespace MonoTests.System.ComponentModel
                        PropertyDescriptor p = TypeDescriptor.GetProperties (typeof (CanResetNoSetter_test))["Prop"];
                        CanResetNoSetter_test test = new CanResetNoSetter_test ();
 
-#if NET_2_0
                        Assert.IsFalse (p.CanResetValue (test), "1");
-#else
-                       Assert.IsTrue (p.CanResetValue (test), "1");
-#endif
                        Assert.AreEqual (5, test.Prop, "2");
                        p.ResetValue (test);
                        Assert.AreEqual (10, test.Prop, "3");
@@ -789,11 +781,7 @@ namespace MonoTests.System.ComponentModel
                        PropertyDescriptor p1 = TypeDescriptor.GetProperties (typeof (DisplayName_test)) ["Explicit"];
                        PropertyDescriptor p2 = TypeDescriptor.GetProperties (typeof (DisplayName_test)) ["Implicit"];
 
-#if NET_2_0
                        Assert.AreEqual ("An explicit displayname", p1.DisplayName, "#1");
-#else
-                       Assert.AreEqual ("Explicit", p1.DisplayName, "#1");
-#endif
                        Assert.AreEqual ("Implicit", p2.DisplayName, "#2");
                }
 
@@ -860,7 +848,6 @@ namespace MonoTests.System.ComponentModel
                        }
                }
 
-#if NET_2_0
                [Test]
                public void GetInvocationTarget_Instance_Null ()
                {
@@ -969,7 +956,6 @@ namespace MonoTests.System.ComponentModel
                        Assert.AreEqual (handlerC, handler.GetInvocationList () [1], "#I4");
                        Assert.IsNull (pd.GetValueChangedHandler (compB), "#I5");
                }
-#endif
 
                [Test]
                public void RemoveValueChanged ()
@@ -1154,7 +1140,6 @@ namespace MonoTests.System.ComponentModel
                                base.OnValueChanged (component, e);
                        }
 
-#if NET_2_0
                        public new object GetInvocationTarget (Type type, object instance)
                        {
                                return base.GetInvocationTarget (type, instance);
@@ -1164,7 +1149,6 @@ namespace MonoTests.System.ComponentModel
                        {
                                return base.GetValueChangedHandler (component);
                        }
-#endif
                }
 
                [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property)]