diff options
Diffstat (limited to 'mcs')
1305 files changed, 142 insertions, 30251 deletions
diff --git a/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs b/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs index 274ee160adc..12a9d47bb62 100644 --- a/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs +++ b/mcs/class/I18N/CJK/Test/I18N.CJK.Test.cs @@ -214,18 +214,12 @@ namespace MonoTests.I18N.CJK } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // MS is buggy here -#endif public void CP50222_Encode () { AssertEncode ("Test/texts/japanese-utf8.txt", "Test/texts/japanese-50222.txt", 50222); } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // MS is buggy here -#endif public void CP50222_Decode () { AssertDecode ("Test/texts/japanese-utf8.txt", "Test/texts/japanese-50222.txt", 50222); @@ -252,9 +246,6 @@ namespace MonoTests.I18N.CJK } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // MS bug -#endif public void Bug77723 () { GetBytesAllSingleChars (51932); @@ -323,9 +314,6 @@ namespace MonoTests.I18N.CJK } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // MS bug -#endif public void Encoder54936Refresh () { Encoding e = Manager.GetEncoding ("gb18030"); @@ -355,7 +343,6 @@ namespace MonoTests.I18N.CJK Manager.GetEncoding (932).GetBytes ("\uFF02")); } -#if NET_2_0 [Test] public void Decoder932Refresh () { @@ -472,7 +459,6 @@ namespace MonoTests.I18N.CJK Assert.AreEqual (1, d.GetChars (new byte [] {0xF9}, 0, 1, chars, 0, true), "#5"); Assert.AreEqual (new char [] {'?'}, chars, "#6"); } -#endif [Test] diff --git a/mcs/class/I18N/MidEast/Test/I18N.MidEast.Test.cs b/mcs/class/I18N/MidEast/Test/I18N.MidEast.Test.cs index 50a0748d2c2..85b03b3be3e 100644 --- a/mcs/class/I18N/MidEast/Test/I18N.MidEast.Test.cs +++ b/mcs/class/I18N/MidEast/Test/I18N.MidEast.Test.cs @@ -45,14 +45,10 @@ namespace MonoTests.I18N.MidEast //Encoding enc = Manager.GetEncoding(codepage); Encoding enc; if (fallbackString != null) { -#if NET_2_0 enc = Encoding.GetEncoding(codepage, new System.Text.EncoderReplacementFallback(fallbackString), new System.Text.DecoderReplacementFallback("irrelevant") ); -#else - throw new InvalidOperationException("DotNet < 2.0 doesn't support encoder fallback"); -#endif } else { enc = Encoding.GetEncoding(codepage); } diff --git a/mcs/class/Mainsoft.Web/Tests/Mainsoft.Web.Security/MembershipTests.cs b/mcs/class/Mainsoft.Web/Tests/Mainsoft.Web.Security/MembershipTests.cs index e1574c0905e..b86fd8cfdfb 100644 --- a/mcs/class/Mainsoft.Web/Tests/Mainsoft.Web.Security/MembershipTests.cs +++ b/mcs/class/Mainsoft.Web/Tests/Mainsoft.Web.Security/MembershipTests.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.IO;
@@ -229,4 +228,3 @@ namespace Mainsoft.Web.Security.Tests }
}
-#endif
\ No newline at end of file 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 diff --git a/mcs/class/Mono.Data.Sqlite/Test/SqliteCommandUnitTests.cs b/mcs/class/Mono.Data.Sqlite/Test/SqliteCommandUnitTests.cs index e19f0c980f3..f10d6ec6fb3 100644 --- a/mcs/class/Mono.Data.Sqlite/Test/SqliteCommandUnitTests.cs +++ b/mcs/class/Mono.Data.Sqlite/Test/SqliteCommandUnitTests.cs @@ -168,11 +168,7 @@ namespace MonoTests.Mono.Data.Sqlite } [Test] -#if NET_2_0 [ExpectedException(typeof(SqliteException))] -#else - [ExpectedException(typeof(SqliteSyntaxException))] -#endif public void InsertWithFailingTransaction() { _conn.Open(); diff --git a/mcs/class/Mono.Data.Sqlite/Test/SqliteConnectionTest.cs b/mcs/class/Mono.Data.Sqlite/Test/SqliteConnectionTest.cs index 62bbcd7f1d4..d65ee3f9ae6 100644 --- a/mcs/class/Mono.Data.Sqlite/Test/SqliteConnectionTest.cs +++ b/mcs/class/Mono.Data.Sqlite/Test/SqliteConnectionTest.cs @@ -44,7 +44,6 @@ namespace MonoTests.Mono.Data.Sqlite readonly static string _connectionString = "URI=file://" + _uri + ", version=3"; SqliteConnection _conn = new SqliteConnection (); -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentNullException))] public void ConnectionStringTest_Null () @@ -65,29 +64,6 @@ namespace MonoTests.Mono.Data.Sqlite } } -#else - [Test] - [ExpectedException (typeof (InvalidOperationException))] - public void ConnectionStringTest_Empty () - { - _conn.ConnectionString = ""; - } - - [Test] - [ExpectedException (typeof (InvalidOperationException))] - public void ConnectionStringTest_NoURI () - { - _conn.ConnectionString = "version=3"; - } - - // In 2.0 _conn.Database always returns "main" - [Test] - public void ConnectionStringTest_IgnoreSpacesAndTrim () - { - _conn.ConnectionString = "URI=file://xyz , ,,, ,, version=3"; - Assert.AreEqual ("xyz", _conn.Database, "#1 file path is wrong"); - } -#endif // behavior has changed, I guess //[Test] [Ignore ("opening a connection should not create db! though, leave for now")] diff --git a/mcs/class/Mono.Data.Sqlite/Test/SqliteExceptionUnitTests.cs b/mcs/class/Mono.Data.Sqlite/Test/SqliteExceptionUnitTests.cs index fa766e915ea..6a7fdbc487a 100644 --- a/mcs/class/Mono.Data.Sqlite/Test/SqliteExceptionUnitTests.cs +++ b/mcs/class/Mono.Data.Sqlite/Test/SqliteExceptionUnitTests.cs @@ -24,11 +24,7 @@ namespace MonoTests.Mono.Data.Sqlite } [Test] -#if NET_2_0 [ExpectedException(typeof(SqliteException))] -#else - [ExpectedException(typeof(SqliteSyntaxException))] -#endif public void WrongSyntax() { SqliteCommand insertCmd = new SqliteCommand("INSERT INTO t1 VALUES (,')",_conn); diff --git a/mcs/class/Mono.Data.Sqlite/Test/SqliteParameterUnitTests.cs b/mcs/class/Mono.Data.Sqlite/Test/SqliteParameterUnitTests.cs index a177bfcc8b6..7f6af225caf 100644 --- a/mcs/class/Mono.Data.Sqlite/Test/SqliteParameterUnitTests.cs +++ b/mcs/class/Mono.Data.Sqlite/Test/SqliteParameterUnitTests.cs @@ -78,11 +78,9 @@ namespace MonoTests.Mono.Data.Sqlite Assert.AreEqual(reader["i"], integerP.Value); object compareValue; -#if NET_2_0 if (blobP.Value is byte[]) compareValue = System.Text.Encoding.UTF8.GetString ((byte[])blobP.Value); else -#endif compareValue = blobP.Value; Assert.AreEqual(reader["b"], compareValue); Assert.AreEqual(reader.Read(), false); diff --git a/mcs/class/Mono.Posix/Mono.Unix.Native/Stdlib.cs b/mcs/class/Mono.Posix/Mono.Unix.Native/Stdlib.cs index 400c8269a72..c2e50b8d259 100644 --- a/mcs/class/Mono.Posix/Mono.Unix.Native/Stdlib.cs +++ b/mcs/class/Mono.Posix/Mono.Unix.Native/Stdlib.cs @@ -303,7 +303,7 @@ namespace Mono.Unix.Native { // Right now using this attribute gives an assert because it // isn't implemented. // -#if NET_2_0 && UNMANAGED_FN_PTR_SUPPORT_FIXED +#if UNMANAGED_FN_PTR_SUPPORT_FIXED [UnmanagedFunctionPointer (CallingConvention.Cdecl)] #endif public delegate void SignalHandler (int signal); diff --git a/mcs/class/Mono.Posix/Test/Mono.Unix.Native/StdlibTest.cs b/mcs/class/Mono.Posix/Test/Mono.Unix.Native/StdlibTest.cs index e6743819a9d..1b7b77d5aca 100644 --- a/mcs/class/Mono.Posix/Test/Mono.Unix.Native/StdlibTest.cs +++ b/mcs/class/Mono.Posix/Test/Mono.Unix.Native/StdlibTest.cs @@ -30,14 +30,6 @@ namespace MonoTests.Mono.Unix.Native { } // [Test] -#if !NET_2_0 - // .NET 1.1 marshals delegates as Stdcall functions, while signal(3) - // expects a Cdecl function. Result: stack corruption. - // DO NOT USE Stdlib.signal under .NET 1.1! - // .NET 2.0 allows us to specify how delegates should be marshaled, so - // this isn't an issue there. - [Category ("NotDotNet")] -#endif public void Signal () { SignalTest st = new SignalTest (); diff --git a/mcs/class/Mono.Security/Test/Mono.Security/ASN1ConvertTest.cs b/mcs/class/Mono.Security/Test/Mono.Security/ASN1ConvertTest.cs index 07c6f68de7f..fb6dd9b6537 100644 --- a/mcs/class/Mono.Security/Test/Mono.Security/ASN1ConvertTest.cs +++ b/mcs/class/Mono.Security/Test/Mono.Security/ASN1ConvertTest.cs @@ -39,9 +39,7 @@ namespace MonoTests.Mono.Security { ASN1 dt = ASN1Convert.FromDateTime (expected); Assert.AreEqual (0x17, dt.Tag, "UTCTIME"); DateTime actual = ASN1Convert.ToDateTime (dt); -#if NET_2_0 Assert.AreEqual (DateTimeKind.Utc, actual.Kind, "Kind"); -#endif AssertDate (expected, actual.ToLocalTime(), "DateTime"); } @@ -52,9 +50,7 @@ namespace MonoTests.Mono.Security { ASN1 dt = ASN1Convert.FromDateTime (expected); Assert.AreEqual (0x17, dt.Tag, "UTCTIME"); DateTime actual = ASN1Convert.ToDateTime (dt); -#if NET_2_0 Assert.AreEqual (DateTimeKind.Utc, actual.Kind, "Kind"); -#endif AssertDate (expected, actual.ToLocalTime(), "DateTime"); } @@ -65,9 +61,7 @@ namespace MonoTests.Mono.Security { ASN1 dt = ASN1Convert.FromDateTime (expected); Assert.AreEqual (0x18, dt.Tag, "GENERALIZEDTIME"); DateTime actual = ASN1Convert.ToDateTime (dt); -#if NET_2_0 Assert.AreEqual (DateTimeKind.Utc, actual.Kind, "Kind"); -#endif AssertDate (expected, actual.ToLocalTime(), "DateTime"); } @@ -77,9 +71,7 @@ namespace MonoTests.Mono.Security { string nosecs = "9912312359Z"; ASN1 dt = new ASN1 (0x18, Encoding.ASCII.GetBytes (nosecs)); DateTime actual = ASN1Convert.ToDateTime (dt); -#if NET_2_0 Assert.AreEqual (DateTimeKind.Utc, actual.Kind, "Kind"); -#endif Assert.AreEqual (nosecs, actual.ToUniversalTime ().ToString ("yyMMddHHmm") + "Z", "DateTime"); } @@ -173,12 +165,10 @@ namespace MonoTests.Mono.Security { } [Test] -#if NET_2_0 // the large X test tries to encode an invalid OID (second part being > 40). // In 1.x CryptoConfig.EncodeOID just encoded the binary (so we copied the // *bad* behaviour) but 2.0 encode it differently (sigh) [Category ("NotDotNet")] -#endif public void ConvertOID_LargeX () { ASN1 asn = new ASN1 (0x06, new byte [] { 0xA8, 0x00, 0x00 }); diff --git a/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderBaseTest.cs b/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderBaseTest.cs index ccb2e368452..16f804856fa 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderBaseTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderBaseTest.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.Collections.Specialized; @@ -168,4 +167,3 @@ namespace MonoTests.System.Configuration.Provider } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderCollectionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderCollectionTest.cs index 9825e51cb06..14d48d9bd82 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderCollectionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration.Provider/ProviderCollectionTest.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.Text; @@ -178,4 +177,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/CallbackValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/CallbackValidatorTest.cs index 38ab8fec2db..36a5079e8f3 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/CallbackValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/CallbackValidatorTest.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.Configuration; @@ -106,4 +105,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionConverterTest.cs index 3f1940ae6be..46fb4700c8b 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionConverterTest.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.Configuration; @@ -121,4 +120,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionTest.cs index 22e95341a06..e43aefa3ff1 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/CommaDelimitedStringCollectionTest.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.Configuration; @@ -132,4 +131,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementCollectionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementCollectionTest.cs index 9e5211e7af1..a23e58e9e4f 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementCollectionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementCollectionTest.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.Configuration; @@ -79,4 +78,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementTest.cs index a9e313c3370..a9c08ffec62 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationElementTest.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.Configuration; @@ -49,4 +48,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationErrorsExceptionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationErrorsExceptionTest.cs index 24fd3cada10..cba92bd678d 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationErrorsExceptionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationErrorsExceptionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Configuration; @@ -635,4 +634,3 @@ namespace MonoTests.System.Configuration } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationLockCollectionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationLockCollectionTest.cs index 4235f97844f..104076dc7eb 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationLockCollectionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationLockCollectionTest.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.Configuration; @@ -176,4 +175,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPropertyTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPropertyTest.cs index 8aacacdcb78..2212555c324 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPropertyTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationPropertyTest.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.Configuration;
@@ -64,4 +63,3 @@ namespace MonoTests.System.Configuration { }
}
-#endif
\ No newline at end of file diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionGroupTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionGroupTest.cs index 92b5194d964..b6fba82cd17 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionGroupTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionGroupTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Configuration; @@ -60,4 +59,3 @@ namespace MonoTests.System.Configuration } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionTest.cs index fbd3f1ba531..9d55f5116d5 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConfigurationSectionTest.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.Configuration; @@ -120,4 +119,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ConnectionStringSettingsTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ConnectionStringSettingsTest.cs index ba3e904dee2..ba4b255bc04 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ConnectionStringSettingsTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ConnectionStringSettingsTest.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.Configuration; @@ -125,4 +124,3 @@ namespace MonoTests.System.Configuration } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/DefaultValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/DefaultValidatorTest.cs index 44a06eed23b..134ff41fc94 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/DefaultValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/DefaultValidatorTest.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.Configuration; @@ -60,4 +59,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/ExeConfigurationFileMapTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/ExeConfigurationFileMapTest.cs index ccc8756a004..8fcd5b7d3e4 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/ExeConfigurationFileMapTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/ExeConfigurationFileMapTest.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.Configuration; @@ -155,4 +154,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/GenericEnumConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/GenericEnumConverterTest.cs index 1d74eb976ee..4aa5b4f7039 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/GenericEnumConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/GenericEnumConverterTest.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.Configuration; @@ -151,4 +150,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/InfiniteIntConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/InfiniteIntConverterTest.cs index 34f9b58568d..7f57f1db48d 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/InfiniteIntConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/InfiniteIntConverterTest.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.Configuration; @@ -140,4 +139,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/InfiniteTimeSpanConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/InfiniteTimeSpanConverterTest.cs index 82d9dae37a0..22cf89675a3 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/InfiniteTimeSpanConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/InfiniteTimeSpanConverterTest.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.Configuration; @@ -129,4 +128,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/IntegerValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/IntegerValidatorTest.cs index 6af6099a979..c1398b9265c 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/IntegerValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/IntegerValidatorTest.cs @@ -29,7 +29,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Xml; @@ -177,4 +176,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationCollectionTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationCollectionTest.cs index 002cf937ef0..94832f45fef 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationCollectionTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationCollectionTest.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.Configuration; @@ -186,4 +185,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationElementTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationElementTest.cs index 088ba56a0f6..14b994bbb53 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationElementTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/KeyValueConfigurationElementTest.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.Configuration; @@ -98,4 +97,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/LongValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/LongValidatorTest.cs index 5d57a95e23a..75acd4f10c6 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/LongValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/LongValidatorTest.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.Configuration; @@ -108,4 +107,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/PositiveTimeSpanValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/PositiveTimeSpanValidatorTest.cs index 6644bffaf6d..dd07d8a8092 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/PositiveTimeSpanValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/PositiveTimeSpanValidatorTest.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.Configuration; @@ -72,4 +71,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/RegexStringValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/RegexStringValidatorTest.cs index 545771beca1..9dfac5b7935 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/RegexStringValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/RegexStringValidatorTest.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.Configuration; @@ -78,4 +77,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/StringValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/StringValidatorTest.cs index 833002a87f4..79b70ba222d 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/StringValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/StringValidatorTest.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.Configuration; @@ -139,4 +138,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/SubclassTypeValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/SubclassTypeValidatorTest.cs index 74d235ecc1a..e5d40741726 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/SubclassTypeValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/SubclassTypeValidatorTest.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.Configuration; @@ -71,4 +70,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesConverterTest.cs index 22e137b2eb3..dc439813cc0 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesConverterTest.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.Configuration; @@ -143,4 +142,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesOrInfiniteConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesOrInfiniteConverterTest.cs index 9239a637c68..e4a485b6d10 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesOrInfiniteConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanMinutesOrInfiniteConverterTest.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.Configuration; @@ -153,4 +152,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsConverterTest.cs index bcd29540cb2..f220b58831a 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsConverterTest.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.Configuration; @@ -143,4 +142,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsOrInfiniteConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsOrInfiniteConverterTest.cs index 81f0e3c75a4..9166959817c 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsOrInfiniteConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanSecondsOrInfiniteConverterTest.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.Configuration; @@ -150,4 +149,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanValidatorTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanValidatorTest.cs index 9a11141be1e..9e4aed30d82 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanValidatorTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/TimeSpanValidatorTest.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.Configuration; @@ -109,4 +108,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/TypeNameConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/TypeNameConverterTest.cs index e7c5d721764..3ebadd8ad27 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/TypeNameConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/TypeNameConverterTest.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.Configuration; @@ -109,4 +108,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Configuration/Test/System.Configuration/WhiteSpaceTrimStringConverterTest.cs b/mcs/class/System.Configuration/Test/System.Configuration/WhiteSpaceTrimStringConverterTest.cs index a19448cf357..f7520d8d797 100644 --- a/mcs/class/System.Configuration/Test/System.Configuration/WhiteSpaceTrimStringConverterTest.cs +++ b/mcs/class/System.Configuration/Test/System.Configuration/WhiteSpaceTrimStringConverterTest.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.Configuration; @@ -113,4 +112,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs b/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs index e9b0d6f1a8e..940b1290ea3 100644 --- a/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs +++ b/mcs/class/System.Core/Test/System/TimeZoneInfo.AdjustmentRuleTest.cs @@ -3,7 +3,6 @@ using System.IO; using System.Runtime.Serialization.Formatters.Binary; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System { public class TimeZoneInfo_AdjustmentRuleTest @@ -115,4 +114,3 @@ namespace MonoTests.System } } } -#endif diff --git a/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs b/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs index 38fdac70145..f9a006c6a50 100644 --- a/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs +++ b/mcs/class/System.Core/Test/System/TimeZoneInfo.TransitionTimeTest.cs @@ -4,7 +4,6 @@ using System.IO; using System.Runtime.Serialization.Formatters.Binary; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System { public class TimeZoneInfo_TransitionTimeTest @@ -139,4 +138,3 @@ namespace MonoTests.System } } } -#endif diff --git a/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs b/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs index 8f7564d5bf5..c0e031e7e8b 100644 --- a/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs +++ b/mcs/class/System.Core/Test/System/TimeZoneInfoTest.cs @@ -32,7 +32,6 @@ using System.Runtime.Serialization.Formatters.Binary; using System.Collections; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System { public class TimeZoneInfoTest @@ -957,4 +956,3 @@ namespace MonoTests.System } } } -#endif diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleCommandTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleCommandTest.cs index 7e4904d163b..9a33576df12 100644 --- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleCommandTest.cs +++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleCommandTest.cs @@ -62,9 +62,7 @@ namespace MonoTests.System.Data.OracleClient { OracleCommand cmd = new OracleCommand (); Assert.AreEqual (string.Empty, cmd.CommandText, "#1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#3"); Assert.IsNull (cmd.Connection, "#4"); Assert.IsNull (cmd.Container, "#5"); @@ -81,9 +79,7 @@ namespace MonoTests.System.Data.OracleClient { OracleCommand cmd = new OracleCommand (COMMAND_TEXT); Assert.AreEqual (COMMAND_TEXT, cmd.CommandText, "#A1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#A2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#A3"); Assert.IsNull (cmd.Connection, "#A4"); Assert.IsNull (cmd.Container, "#A5"); @@ -96,9 +92,7 @@ namespace MonoTests.System.Data.OracleClient cmd = new OracleCommand ((string) null); Assert.AreEqual (string.Empty, cmd.CommandText, "#B1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#B2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#B3"); Assert.IsNull (cmd.Connection, "#B4"); Assert.IsNull (cmd.Container, "#B5"); @@ -118,9 +112,7 @@ namespace MonoTests.System.Data.OracleClient cmd = new OracleCommand (COMMAND_TEXT, conn); Assert.AreEqual (COMMAND_TEXT, cmd.CommandText, "#A1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#A2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#A3"); Assert.AreSame (conn, cmd.Connection, "#A4"); Assert.IsNull (cmd.Container, "#A5"); @@ -133,9 +125,7 @@ namespace MonoTests.System.Data.OracleClient cmd = new OracleCommand ((string) null, conn); Assert.AreEqual (string.Empty, cmd.CommandText, "#B1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#B2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#B3"); Assert.AreSame (conn, cmd.Connection, "#B4"); Assert.IsNull (cmd.Container, "#B5"); @@ -148,9 +138,7 @@ namespace MonoTests.System.Data.OracleClient cmd = new OracleCommand (COMMAND_TEXT, (OracleConnection) null); Assert.AreEqual (COMMAND_TEXT, cmd.CommandText, "#C1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#C2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#C3"); Assert.IsNull (cmd.Connection, "#C4"); Assert.IsNull (cmd.Container, "#C5"); @@ -170,9 +158,7 @@ namespace MonoTests.System.Data.OracleClient cmd = new OracleCommand (COMMAND_TEXT, conn, (OracleTransaction) null); Assert.AreEqual (COMMAND_TEXT, cmd.CommandText, "#A1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#A2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#A3"); Assert.AreSame (conn, cmd.Connection, "#A4"); Assert.IsNull (cmd.Container, "#A5"); @@ -185,9 +171,7 @@ namespace MonoTests.System.Data.OracleClient cmd = new OracleCommand ((string) null, conn, (OracleTransaction) null); Assert.AreEqual (string.Empty, cmd.CommandText, "#B1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#B2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#B3"); Assert.AreSame (conn, cmd.Connection, "#B4"); Assert.IsNull (cmd.Container, "#B5"); @@ -200,9 +184,7 @@ namespace MonoTests.System.Data.OracleClient cmd = new OracleCommand (COMMAND_TEXT, (OracleConnection) null, (OracleTransaction) null); Assert.AreEqual (COMMAND_TEXT, cmd.CommandText, "#C1"); -#if NET_2_0 Assert.AreEqual (0, cmd.CommandTimeout, "#C2"); -#endif Assert.AreEqual (CommandType.Text, cmd.CommandType, "#C3"); Assert.IsNull (cmd.Connection, "#C4"); Assert.IsNull (cmd.Container, "#C5"); @@ -235,7 +217,6 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (string.Empty, cmd.CommandText, "#4"); } -#if NET_2_0 [Test] public void CommandTimeout () { @@ -247,7 +228,6 @@ namespace MonoTests.System.Data.OracleClient command.CommandTimeout = int.MinValue; Assert.AreEqual (0, command.CommandTimeout, "#4"); } -#endif [Test] public void ConnectionTimeout_IDbConnection () diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleConnectionTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleConnectionTest.cs index f46c4baec32..09759a52f27 100644 --- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleConnectionTest.cs +++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleConnectionTest.cs @@ -66,7 +66,6 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (string.Empty, connection.ConnectionString, "#3"); } -#if NET_2_0 [Test] public void ConnectionTimeout () { @@ -75,7 +74,6 @@ namespace MonoTests.System.Data.OracleClient connection.ConnectionString = "Data Source=Oracle8i;Integrated Security=yes"; Assert.AreEqual (0, connection.ConnectionTimeout, "#2"); } -#endif [Test] public void ConnectionTimeout_IDbConnection () diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleDataAdapterTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleDataAdapterTest.cs index 2f04a59cf59..a5967921fd4 100644 --- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleDataAdapterTest.cs +++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleDataAdapterTest.cs @@ -43,28 +43,20 @@ namespace MonoTests.System.Data.OracleClient { OracleDataAdapter da = new OracleDataAdapter (); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -74,29 +66,21 @@ namespace MonoTests.System.Data.OracleClient OracleCommand cmd = new OracleCommand (); OracleDataAdapter da = new OracleDataAdapter (cmd); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (cmd, da.SelectCommand, "#12"); Assert.IsNull (da.Site, "#13"); Assert.IsNotNull (da.TableMappings, "#14"); Assert.AreEqual (0, da.TableMappings.Count, "#15"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#16"); -#endif Assert.IsNull (da.UpdateCommand, "#17"); } @@ -106,28 +90,20 @@ namespace MonoTests.System.Data.OracleClient OracleDataAdapter da = new OracleDataAdapter ( (OracleCommand) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -140,30 +116,22 @@ namespace MonoTests.System.Data.OracleClient OracleDataAdapter da = new OracleDataAdapter ( selectCommandText, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.AreSame (selectConnection, da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -175,21 +143,15 @@ namespace MonoTests.System.Data.OracleClient OracleDataAdapter da = new OracleDataAdapter ( (string) null, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -197,9 +159,7 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -211,30 +171,22 @@ namespace MonoTests.System.Data.OracleClient OracleDataAdapter da = new OracleDataAdapter ( selectCommandText, (OracleConnection) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNull (da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -247,21 +199,15 @@ namespace MonoTests.System.Data.OracleClient OracleDataAdapter da = new OracleDataAdapter ( selectCommandText, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#13"); @@ -269,9 +215,7 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -283,21 +227,15 @@ namespace MonoTests.System.Data.OracleClient OracleDataAdapter da = new OracleDataAdapter ( (string) null, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -306,9 +244,7 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } @@ -320,21 +256,15 @@ namespace MonoTests.System.Data.OracleClient OracleDataAdapter da = new OracleDataAdapter ( selectCommandText, (string) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#14"); @@ -342,9 +272,7 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } @@ -483,7 +411,6 @@ namespace MonoTests.System.Data.OracleClient } } -#if NET_2_0 [Test] public void UpdateBatchSize () { @@ -511,7 +438,6 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual ("UpdateBatchSize", ex.ParamName, "#6"); } } -#endif [Test] public void UpdateCommand () diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterCollectionTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterCollectionTest.cs index 0b41f5e10e5..2353b4fdfc4 100644 --- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterCollectionTest.cs +++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterCollectionTest.cs @@ -120,10 +120,8 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); Assert.IsNotNull (ex.Message, "#A4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); -#endif Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); } @@ -138,11 +136,9 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); Assert.IsTrue (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); -#endif Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); } } @@ -154,7 +150,6 @@ namespace MonoTests.System.Data.OracleClient o.Add ((object) null); Assert.Fail ("#1"); } catch (ArgumentNullException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); @@ -163,15 +158,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); -#else - // Value cannot be null - Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); - Assert.AreEqual ("value", ex.ParamName, "#7"); -#endif } } @@ -226,7 +212,6 @@ namespace MonoTests.System.Data.OracleClient try { o.Add ((OracleParameter) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { // The OracleParameterCollection only accepts // non-null OracleParameter type objects @@ -237,13 +222,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); } -#else - } catch (NullReferenceException ex) { - Assert.AreEqual (typeof (NullReferenceException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - } -#endif } [Test] // Add (OracleParameter) @@ -291,7 +269,6 @@ namespace MonoTests.System.Data.OracleClient o2.Add (param); } -#if NET_2_0 [Test] // AddRange (Array) public void AddRange1 () { @@ -505,7 +482,6 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual ("values", ex.ParamName, "#5"); } } -#endif [Test] // Contains (Object) public void Contains1 () @@ -554,11 +530,9 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); Assert.IsNotNull (ex.Message, "#A4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); -#endif Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); } @@ -572,11 +546,9 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); Assert.IsTrue (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); -#endif Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); } } @@ -678,76 +650,48 @@ namespace MonoTests.System.Data.OracleClient o [1] = new OracleParameter (); Assert.Fail ("#A1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index 1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); Assert.IsNotNull (ex.Message, "#A4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); -#else - // Index 1 outside the scope of the parameter array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); -#endif } try { o [-1] = new OracleParameter (); Assert.Fail ("#B1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index -1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); -#else - // Index -1 outside the scope of the parameter array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); -#endif } try { object value = o [1]; Assert.Fail ("#C1:" + value); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index 1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#C2"); Assert.IsNull (ex.InnerException, "#C3"); Assert.IsNotNull (ex.Message, "#C4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#C5"); -#else - // Index 1 outside the scope of the parameter array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#C2"); - Assert.IsNull (ex.InnerException, "#C3"); - Assert.IsNotNull (ex.Message, "#C4"); -#endif } try { object value = o [-1]; Assert.Fail ("#D1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index -1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#D2"); Assert.IsNull (ex.InnerException, "#D3"); Assert.IsNotNull (ex.Message, "#D4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#D5"); -#else - // Index -1 outside the scope of the parameter array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#D2"); - Assert.IsNull (ex.InnerException, "#D3"); - Assert.IsNotNull (ex.Message, "#D4"); -#endif } } @@ -761,7 +705,6 @@ namespace MonoTests.System.Data.OracleClient o [0] = null; Assert.Fail ("#1"); } catch (ArgumentNullException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); @@ -770,15 +713,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); -#else - // Value cannot be null - Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); - Assert.AreEqual ("value", ex.ParamName, "#7"); -#endif } } @@ -852,13 +786,8 @@ namespace MonoTests.System.Data.OracleClient Assert.AreSame (paramA, o ["ParamI"], "#A1"); Assert.AreSame (paramB, o ["Parami"], "#A2"); -#if NET_2_0 Assert.AreSame (paramC, o ["paramI"], "#A3"); Assert.AreSame (paramD, o ["parami"], "#A4"); -#else - Assert.AreSame (paramA, o ["paramI"], "#A3"); - Assert.AreSame (paramB, o ["parami"], "#A4"); -#endif Assert.AreEqual (0, o.IndexOf (paramA), "#A5"); Assert.AreEqual (1, o.IndexOf (paramB), "#A6"); Assert.AreEqual (2, o.IndexOf (paramC), "#A7"); @@ -869,18 +798,10 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (-1, o.IndexOf (paramH), "#A12"); o ["ParamI"] = paramG; -#if NET_2_0 Assert.AreSame (paramE, o ["ParamI"], "#B1"); -#else - Assert.AreSame (paramC, o ["ParamI"], "#B1"); -#endif Assert.AreSame (paramB, o ["Parami"], "#B2"); Assert.AreSame (paramC, o ["paramI"], "#B3"); -#if NET_2_0 Assert.AreSame (paramD, o ["parami"], "#B4"); -#else - Assert.AreSame (paramB, o ["parami"], "#B4"); -#endif Assert.AreSame (paramG, o ["paramG"], "#B5"); Assert.AreEqual (-1, o.IndexOf (paramA), "#B6"); Assert.AreEqual (1, o.IndexOf (paramB), "#B7"); @@ -892,151 +813,68 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (-1, o.IndexOf (paramH), "#B13"); o ["ParamI"] = paramH; -#if NET_2_0 Assert.AreSame (paramC, o ["ParamI"], "#C1"); -#else - Assert.AreSame (paramE, o ["ParamI"], "#C1"); -#endif Assert.AreSame (paramB, o ["Parami"], "#C2"); -#if NET_2_0 Assert.AreSame (paramC, o ["paramI"], "#C3"); Assert.AreSame (paramD, o ["parami"], "#C4"); -#else - Assert.AreSame (paramE, o ["paramI"], "#C3"); - Assert.AreSame (paramB, o ["parami"], "#C4"); -#endif Assert.AreSame (paramG, o ["paramG"], "#C5"); Assert.AreSame (paramH, o ["paramH"], "#C6"); Assert.AreEqual (-1, o.IndexOf (paramA), "#C6"); Assert.AreEqual (1, o.IndexOf (paramB), "#C7"); -#if NET_2_0 Assert.AreEqual (2, o.IndexOf (paramC), "#C8"); -#else - Assert.AreEqual (-1, o.IndexOf (paramC), "#C8"); -#endif Assert.AreEqual (3, o.IndexOf (paramD), "#C9"); -#if NET_2_0 Assert.AreEqual (-1, o.IndexOf (paramE), "#C10"); -#else - Assert.AreEqual (4, o.IndexOf (paramE), "#C10"); -#endif Assert.AreEqual (5, o.IndexOf (paramF), "#C11"); Assert.AreEqual (0, o.IndexOf (paramG), "#C12"); -#if NET_2_0 Assert.AreEqual (4, o.IndexOf (paramH), "#C13"); -#else - Assert.AreEqual (2, o.IndexOf (paramH), "#C13"); -#endif o ["paramG"] = paramA; Assert.AreSame (paramA, o ["ParamI"], "#D1"); Assert.AreSame (paramB, o ["Parami"], "#D2"); -#if NET_2_0 Assert.AreSame (paramC, o ["paramI"], "#D3"); Assert.AreSame (paramD, o ["parami"], "#D4"); -#else - Assert.AreSame (paramA, o ["paramI"], "#D3"); - Assert.AreSame (paramB, o ["parami"], "#D4"); -#endif Assert.AreSame (paramH, o ["paramH"], "#D5"); Assert.AreEqual (0, o.IndexOf (paramA), "#D6"); Assert.AreEqual (1, o.IndexOf (paramB), "#D7"); -#if NET_2_0 Assert.AreEqual (2, o.IndexOf (paramC), "#D8"); -#else - Assert.AreEqual (-1, o.IndexOf (paramC), "#D8"); -#endif Assert.AreEqual (3, o.IndexOf (paramD), "#D9"); -#if NET_2_0 Assert.AreEqual (-1, o.IndexOf (paramE), "#D10"); -#else - Assert.AreEqual (4, o.IndexOf (paramE), "#D10"); -#endif Assert.AreEqual (5, o.IndexOf (paramF), "#D11"); Assert.AreEqual (-1, o.IndexOf (paramG), "#D12"); -#if NET_2_0 Assert.AreEqual (4, o.IndexOf (paramH), "#D13"); -#else - Assert.AreEqual (2, o.IndexOf (paramH), "#D13"); -#endif o ["ParamI"] = paramA; Assert.AreSame (paramA, o ["ParamI"], "#E1"); Assert.AreSame (paramB, o ["Parami"], "#E2"); -#if NET_2_0 Assert.AreSame (paramC, o ["paramI"], "#E3"); Assert.AreSame (paramD, o ["parami"], "#E4"); -#else - Assert.AreSame (paramA, o ["paramI"], "#E3"); - Assert.AreSame (paramB, o ["parami"], "#E4"); -#endif Assert.AreSame (paramH, o ["paramH"], "#E5"); Assert.AreEqual (0, o.IndexOf (paramA), "#E6"); Assert.AreEqual (1, o.IndexOf (paramB), "#E7"); -#if NET_2_0 Assert.AreEqual (2, o.IndexOf (paramC), "#E8"); -#else - Assert.AreEqual (-1, o.IndexOf (paramC), "#E8"); -#endif Assert.AreEqual (3, o.IndexOf (paramD), "#E9"); -#if NET_2_0 Assert.AreEqual (-1, o.IndexOf (paramE), "#E10"); -#else - Assert.AreEqual (4, o.IndexOf (paramE), "#E10"); -#endif Assert.AreEqual (5, o.IndexOf (paramF), "#E11"); Assert.AreEqual (-1, o.IndexOf (paramG), "#E12"); -#if NET_2_0 Assert.AreEqual (4, o.IndexOf (paramH), "#E13"); -#else - Assert.AreEqual (2, o.IndexOf (paramH), "#E13"); -#endif o ["paramI"] = paramC; -#if NET_2_0 Assert.AreSame (paramA, o ["ParamI"], "#F1"); -#else - Assert.AreSame (paramC, o ["ParamI"], "#F1"); -#endif Assert.AreSame (paramB, o ["Parami"], "#F2"); Assert.AreSame (paramC, o ["paramI"], "#F3"); -#if NET_2_0 Assert.AreSame (paramD, o ["parami"], "#F4"); -#else - Assert.AreSame (paramB, o ["parami"], "#F4"); -#endif Assert.AreSame (paramH, o ["paramH"], "#F5"); -#if NET_2_0 Assert.AreEqual (0, o.IndexOf (paramA), "#F6"); -#else - Assert.AreEqual (-1, o.IndexOf (paramA), "#F6"); -#endif Assert.AreEqual (1, o.IndexOf (paramB), "#F7"); -#if NET_2_0 Assert.AreEqual (2, o.IndexOf (paramC), "#F8"); -#else - Assert.AreEqual (0, o.IndexOf (paramC), "#F8"); -#endif Assert.AreEqual (3, o.IndexOf (paramD), "#F9"); -#if NET_2_0 Assert.AreEqual (-1, o.IndexOf (paramE), "#F10"); -#else - Assert.AreEqual (4, o.IndexOf (paramE), "#F10"); -#endif Assert.AreEqual (5, o.IndexOf (paramF), "#F11"); Assert.AreEqual (-1, o.IndexOf (paramG), "#F12"); -#if NET_2_0 Assert.AreEqual (4, o.IndexOf (paramH), "#F13"); -#else - Assert.AreEqual (2, o.IndexOf (paramH), "#F13"); -#endif OracleParameterCollection o2 = new OracleParameterCollection (); -#if NET_2_0 o2.Add (paramE); -#else - o2.Add (paramA); -#endif } [Test] // OracleParameter this [String] @@ -1049,7 +887,6 @@ namespace MonoTests.System.Data.OracleClient o ["NotFound"] = new OracleParameter (); Assert.Fail ("#A1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index -1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); @@ -1057,21 +894,12 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNotNull (ex.Message, "#A4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); Assert.IsFalse (ex.Message.IndexOf ("'NotFound'") != -1, "#A6"); -#else - // Parameter 'NotFound' not found - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); - Assert.IsTrue (ex.Message.IndexOf ("'NotFound'") != -1, "#A6"); -#endif } try { o [(string) null] = new OracleParameter (); Assert.Fail ("#B1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index -1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); @@ -1079,21 +907,12 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNotNull (ex.Message, "#B4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); Assert.IsFalse (ex.Message.IndexOf ("''") != -1, "#B6"); -#else - // Parameter '' not found - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); - Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#B6"); -#endif } try { object value = o ["NotFound"]; Assert.Fail ("#C1:" + value); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index -1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#C2"); @@ -1101,21 +920,12 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNotNull (ex.Message, "#C4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#C5"); Assert.IsFalse (ex.Message.IndexOf ("'NotFound'") != -1, "#C6"); -#else - // Parameter 'NotFound' not found - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#C2"); - Assert.IsNull (ex.InnerException, "#C3"); - Assert.IsNotNull (ex.Message, "#C4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#C5"); - Assert.IsTrue (ex.Message.IndexOf ("'NotFound'") != -1, "#C6"); -#endif } try { object value = o [(string) null]; Assert.Fail ("#D1:" + value); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index -1 for this OracleParameterCollection // with Count=1 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#D2"); @@ -1123,14 +933,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsNotNull (ex.Message, "#D4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#D5"); Assert.IsFalse (ex.Message.IndexOf ("''") != -1, "#D6"); -#else - // Parameter 'NotFound' not found - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#D2"); - Assert.IsNull (ex.InnerException, "#D3"); - Assert.IsNotNull (ex.Message, "#D4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#D5"); - Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#D6"); -#endif } } @@ -1144,7 +946,6 @@ namespace MonoTests.System.Data.OracleClient o ["ParamI"] = null; Assert.Fail ("#1"); } catch (ArgumentNullException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); @@ -1153,15 +954,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); -#else - // Value cannot be null - Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); - Assert.AreEqual ("value", ex.ParamName, "#7"); -#endif } } @@ -1174,18 +966,10 @@ namespace MonoTests.System.Data.OracleClient o.Add (paramA); o.Add (paramB); -#if !NET_2_0 - o.Add (paramC); - o ["paramI"] = paramA; -#endif // attempt to add same OracleParameter to collection twice try { -#if NET_2_0 o ["paramI"] = paramA; -#else - o ["Parami"] = paramA; -#endif Assert.Fail ("#A1"); } catch (ArgumentException ex) { // The OracleParameter is already contained by @@ -1262,7 +1046,6 @@ namespace MonoTests.System.Data.OracleClient o.IndexOf ((object) "ParamI"); Assert.Fail ("#A1"); } catch (InvalidCastException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects, not // String objects @@ -1273,23 +1056,12 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); -#else - // argument value must be of type System.Data.OracleClient.OracleParameter - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); - Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); - Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); -#endif } try { o.IndexOf ((object) 5); Assert.Fail ("#B1"); } catch (InvalidCastException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects, not // Int32 objects @@ -1300,16 +1072,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); Assert.IsTrue (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); -#else - // argument value must be of type System.Data.OracleClient.OracleParameter - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); - Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); - Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); -#endif } } @@ -1375,7 +1137,6 @@ namespace MonoTests.System.Data.OracleClient o.Insert (0, (object) "ParamI"); Assert.Fail ("#A1"); } catch (InvalidCastException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects, not // String objects @@ -1386,23 +1147,12 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); -#else - // argument value must be of type System.Data.OracleClient.OracleParameter - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); - Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); - Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); -#endif } try { o.Insert (0, (object) 5); Assert.Fail ("#B1"); } catch (InvalidCastException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects, not // Int32 objects @@ -1413,16 +1163,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); Assert.IsTrue (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); -#else - // argument value must be of type System.Data.OracleClient.OracleParameter - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); - Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); - Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); -#endif } } @@ -1433,7 +1173,6 @@ namespace MonoTests.System.Data.OracleClient o.Insert (0, (object) null); Assert.Fail ("#1"); } catch (ArgumentNullException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); @@ -1442,15 +1181,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); -#else - // Value cannot be null - Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); - Assert.AreEqual ("value", ex.ParamName, "#7"); -#endif } } @@ -1506,7 +1236,6 @@ namespace MonoTests.System.Data.OracleClient o.Insert (0, (OracleParameter) null); Assert.Fail ("#1"); } catch (ArgumentNullException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); @@ -1515,15 +1244,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); -#else - // Value cannot be null - Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); - Assert.AreEqual ("value", ex.ParamName, "#7"); -#endif } } @@ -1607,7 +1327,6 @@ namespace MonoTests.System.Data.OracleClient o.Remove ((object) "ParamI"); Assert.Fail ("#A1"); } catch (InvalidCastException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects, not // String objects @@ -1618,23 +1337,12 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); -#else - // argument value must be of type System.Data.OracleClient.OracleParameter - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#A6"); - Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#A7"); - Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A8"); -#endif } try { o.Remove ((object) 5); Assert.Fail ("#B1"); } catch (InvalidCastException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects, not // Int32 objects @@ -1645,16 +1353,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); Assert.IsTrue (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); -#else - // argument value must be of type System.Data.OracleClient.OracleParameter - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (string).Name) != -1, "#B6"); - Assert.IsFalse (ex.Message.IndexOf (typeof (int).Name) != -1, "#B7"); - Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B8"); -#endif } } @@ -1667,7 +1365,6 @@ namespace MonoTests.System.Data.OracleClient o.Remove ((object) paramA); Assert.Fail ("#1"); } catch (ArgumentException ex) { -#if NET_2_0 // Attempted to remove an OracleParameter that // is not contained by this OracleParameterCollection Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); @@ -1676,13 +1373,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B6"); Assert.IsNull (ex.ParamName, "#B7"); -#else - // Parameter not found - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsNull (ex.ParamName, "#B5"); -#endif } } @@ -1693,7 +1383,6 @@ namespace MonoTests.System.Data.OracleClient o.Remove ((object) null); Assert.Fail ("#1"); } catch (ArgumentNullException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); @@ -1702,15 +1391,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); -#else - // Value cannot be null - Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); - Assert.AreEqual ("value", ex.ParamName, "#7"); -#endif } } @@ -1751,7 +1431,6 @@ namespace MonoTests.System.Data.OracleClient o.Remove (paramA); Assert.Fail ("#1"); } catch (ArgumentException ex) { -#if NET_2_0 // Attempted to remove an OracleParameter that // is not contained by this OracleParameterCollection Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); @@ -1760,13 +1439,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.IsNull (ex.ParamName, "#7"); -#else - // Parameter not found - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); -#endif } } @@ -1777,7 +1449,6 @@ namespace MonoTests.System.Data.OracleClient o.Remove ((OracleParameter) null); Assert.Fail ("#1"); } catch (ArgumentNullException ex) { -#if NET_2_0 // The OracleParameterCollection only accepts // non-null OracleParameter type objects Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); @@ -1786,15 +1457,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); Assert.AreEqual ("value", ex.ParamName, "#7"); -#else - // Value cannot be null - Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#5"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#6"); - Assert.AreEqual ("value", ex.ParamName, "#7"); -#endif } } @@ -1841,38 +1503,24 @@ namespace MonoTests.System.Data.OracleClient o.RemoveAt (0); Assert.Fail ("#A1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index 0 for this OracleParameterCollection // with Count=0 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); Assert.IsNotNull (ex.Message, "#A4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A5"); -#else - // Index 0 outside the scope of the parameter array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); -#endif } try { o.RemoveAt (-1); Assert.Fail ("#B1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // Invalid index -1 for this OracleParameterCollection // with Count=0 Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B5"); -#else - // Index -1 outside the scope of the parameter array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); -#endif } } @@ -1893,62 +1541,33 @@ namespace MonoTests.System.Data.OracleClient o.RemoveAt ("paramI"); -#if NET_2_0 Assert.AreEqual (0, o.IndexOf (paramA), "#A1"); Assert.AreEqual (1, o.IndexOf (paramB), "#A2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#A3"); -#else - Assert.AreEqual (-1, o.IndexOf (paramA), "#A1"); - Assert.AreEqual (0, o.IndexOf (paramB), "#A2"); - Assert.AreEqual (1, o.IndexOf (paramC), "#A3"); -#endif Assert.AreEqual (2, o.IndexOf (paramD), "#A4"); Assert.AreEqual (3, o.IndexOf (paramE), "#A5"); o.RemoveAt ("parami"); -#if NET_2_0 Assert.AreEqual (0, o.IndexOf (paramA), "#B1"); Assert.AreEqual (1, o.IndexOf (paramB), "#B2"); Assert.AreEqual (-1, o.IndexOf (paramC), "#B3"); Assert.AreEqual (-1, o.IndexOf (paramD), "#B4"); -#else - Assert.AreEqual (-1, o.IndexOf (paramA), "#B1"); - Assert.AreEqual (-1, o.IndexOf (paramB), "#B2"); - Assert.AreEqual (0, o.IndexOf (paramC), "#B3"); - Assert.AreEqual (1, o.IndexOf (paramD), "#B4"); -#endif Assert.AreEqual (2, o.IndexOf (paramE), "#B5"); o.RemoveAt ("Parami"); -#if NET_2_0 Assert.AreEqual (0, o.IndexOf (paramA), "#C1"); -#else - Assert.AreEqual (-1, o.IndexOf (paramA), "#C1"); -#endif Assert.AreEqual (-1, o.IndexOf (paramB), "#C2"); -#if NET_2_0 Assert.AreEqual (-1, o.IndexOf (paramC), "#C3"); -#else - Assert.AreEqual (0, o.IndexOf (paramC), "#C3"); -#endif Assert.AreEqual (-1, o.IndexOf (paramD), "#C4"); Assert.AreEqual (1, o.IndexOf (paramE), "#C5"); o.RemoveAt ("Parami"); -#if NET_2_0 Assert.AreEqual (0, o.IndexOf (paramA), "#D1"); -#else - Assert.AreEqual (-1, o.IndexOf (paramA), "#D1"); -#endif Assert.AreEqual (-1, o.IndexOf (paramB), "#D2"); -#if NET_2_0 Assert.AreEqual (-1, o.IndexOf (paramC), "#D3"); -#else - Assert.AreEqual (0, o.IndexOf (paramC), "#D3"); -#endif Assert.AreEqual (-1, o.IndexOf (paramD), "#D4"); Assert.AreEqual (-1, o.IndexOf (paramE), "#D5"); @@ -1979,7 +1598,6 @@ namespace MonoTests.System.Data.OracleClient o.RemoveAt ("NotFound"); Assert.Fail ("#A1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // An OracleParameter with ParameterName 'NotFound' // is not contained by this OracleParameterCollection Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); @@ -1988,22 +1606,12 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A6"); Assert.IsTrue (ex.Message.IndexOf ("'NotFound'") != -1, "#A7"); -#else - // Parameter 'NotFound' not found - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#A5"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#A6"); - Assert.IsTrue (ex.Message.IndexOf ("'NotFound'") != -1, "#A7"); -#endif } try { o.RemoveAt ((string) null); Assert.Fail ("#B1"); } catch (IndexOutOfRangeException ex) { -#if NET_2_0 // An OracleParameter with ParameterName '' is // not contained by this OracleParameterCollection Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); @@ -2012,15 +1620,6 @@ namespace MonoTests.System.Data.OracleClient Assert.IsTrue (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B6"); Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#B7"); -#else - // Parameter '' not found - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsFalse (ex.Message.IndexOf (typeof (OracleParameter).Name) != -1, "#B5"); - Assert.IsFalse (ex.Message.IndexOf (o.GetType ().Name) != -1, "#B6"); - Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#B7"); -#endif } } } diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs index 540d11c42e0..d625b6bf129 100644 --- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs +++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs @@ -120,9 +120,7 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual ((byte) 0, param.Scale, "#7"); Assert.AreEqual (0, param.Size, "#8"); Assert.AreEqual (string.Empty, param.SourceColumn, "#9"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, "#10"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, "#11"); Assert.IsNull (param.Value, "#12"); } @@ -140,15 +138,9 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual ("firstName", param.ParameterName, "#A5"); Assert.AreEqual ((byte) 0, param.Precision, "#A6"); Assert.AreEqual ((byte) 0, param.Scale, "#A7"); -#if NET_2_0 Assert.AreEqual (6, param.Size, "#A8"); -#else - Assert.AreEqual (0, param.Size, "#A8"); -#endif Assert.AreEqual (string.Empty, param.SourceColumn, "#A9"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, "#A10"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, "#A11"); Assert.AreEqual ("Miguel", param.Value, "#A12"); @@ -160,15 +152,9 @@ namespace MonoTests.System.Data.OracleClient Assert.AreEqual (string.Empty, param.ParameterName, "#B5"); Assert.AreEqual ((byte) 0, param.Precision, "#B6"); Assert.AreEqual ((byte) 0, param.Scale, "#B7"); -#if NET_2_0 Assert.AreEqual (7, param.Size, "#B8"); -#else - Assert.AreEqual (0, param.Size, "#B8"); -#endif Assert.AreEqual (string.Empty, param.SourceColumn, "#B9"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, "#B10"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, "#B11"); Assert.AreEqual (new DateTime (2006, 1, 5), param.Value, "#B12"); } diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OraclePermissionAttributeTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OraclePermissionAttributeTest.cs index 863831d3fcb..24a89926869 100644 --- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OraclePermissionAttributeTest.cs +++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OraclePermissionAttributeTest.cs @@ -46,13 +46,11 @@ namespace MonoTests.System.Data.OracleClient { Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId"); Assert.IsFalse (a.Unrestricted, "Unrestricted"); Assert.IsFalse (a.AllowBlankPassword, "AllowBlankPassword"); -#if NET_2_0 Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString"); Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior"); Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions"); Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString"); Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString"); -#endif OraclePermission ocp = (OraclePermission)a.CreatePermission (); Assert.IsFalse (ocp.IsUnrestricted (), "IsUnrestricted"); } @@ -95,11 +93,9 @@ namespace MonoTests.System.Data.OracleClient { OraclePermission ocp = (OraclePermission)a.CreatePermission (); Assert.IsTrue (ocp.IsUnrestricted (), "IsUnrestricted"); Assert.IsFalse (a.AllowBlankPassword, "AllowBlankPassword"); -#if NET_2_0 Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString"); Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior"); Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions"); -#endif a.Unrestricted = false; ocp = (OraclePermission)a.CreatePermission (); Assert.IsFalse (ocp.IsUnrestricted (), "!IsUnrestricted"); @@ -116,7 +112,6 @@ namespace MonoTests.System.Data.OracleClient { Assert.IsFalse (a.AllowBlankPassword, "False"); } -#if NET_2_0 [Test] public void ConnectionString () { @@ -158,7 +153,6 @@ namespace MonoTests.System.Data.OracleClient { a.KeyRestrictions = null; Assert.AreEqual (String.Empty, a.KeyRestrictions, "Empty(null)"); } -#endif [Test] public void Attributes () { diff --git a/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionConfig.cs b/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionConfig.cs index 90784ae69de..759282b00ac 100644 --- a/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionConfig.cs +++ b/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionConfig.cs @@ -97,11 +97,7 @@ namespace MonoTests.System.Data if (engine == null) { string msg = string.Format (CultureInfo.InvariantCulture, "Engine '{0}' does not exist.", engineName); -#if NET_2_0 throw new ConfigurationErrorsException (msg, engineAttr); -#else - throw new ConfigurationException (msg, engineAttr); -#endif } return engine; } @@ -110,11 +106,7 @@ namespace MonoTests.System.Data { string msg = string.Format (CultureInfo.InvariantCulture, "Missing '{0}' attribute.", name); -#if NET_2_0 throw new ConfigurationErrorsException (msg, node); -#else - throw new ConfigurationException (msg, node); -#endif } } } diff --git a/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionManager.cs b/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionManager.cs index 1cc8d7a0ee5..6eba20ef22c 100644 --- a/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionManager.cs +++ b/mcs/class/System.Data/Test/ProviderTests/Common/ConnectionManager.cs @@ -31,9 +31,7 @@ using System; using System.Configuration; using System.Data; -#if NET_2_0 using System.Data.Common; -#endif #if ONLY_1_1 using Mono.Data; @@ -44,11 +42,7 @@ namespace MonoTests.System.Data public class ConnectionManager { private static ConnectionManager Instance; -#if NET_2_0 private DbConnection _connection; -#else - private IDbConnection _connection; -#endif private string _connectionString; private EngineConfig _engine; @@ -64,26 +58,16 @@ namespace MonoTests.System.Data throw new ArgumentException ("PROVIDER_TESTS_CONNECTION environment variable is not set."); ConnectionConfig [] connections = (ConnectionConfig []) -#if NET_2_0 ConfigurationManager.GetSection ("providerTests"); -#else - ConfigurationSettings.GetConfig ("providerTests"); -#endif foreach (ConnectionConfig connConfig in connections) { if (connConfig.Name != connection_name) continue; _connectionString = connConfig.ConnectionString; -#if NET_2_0 DbProviderFactory factory = DbProviderFactories.GetFactory ( connConfig.Factory); _connection = factory.CreateConnection (); _connection.ConnectionString = _connectionString; -#else - _connection = ProviderFactory.CreateConnection ( - string.Concat ("factory=", connConfig.Factory, - ";", _connectionString)); -#endif _connectionString = _connection.ConnectionString; _engine = connConfig.Engine; return; @@ -97,11 +81,7 @@ namespace MonoTests.System.Data } public -#if NET_2_0 DbConnection -#else - IDbConnection -#endif Connection { get {return _connection;} } diff --git a/mcs/class/System.Data/Test/ProviderTests/Common/EngineConfig.cs b/mcs/class/System.Data/Test/ProviderTests/Common/EngineConfig.cs index e6e9553026c..e7765c3450f 100644 --- a/mcs/class/System.Data/Test/ProviderTests/Common/EngineConfig.cs +++ b/mcs/class/System.Data/Test/ProviderTests/Common/EngineConfig.cs @@ -183,22 +183,14 @@ namespace MonoTests.System.Data string msg = string.Format (CultureInfo.InvariantCulture, "Invalid value '{0}' for attribute {1}.", value, name); -#if NET_2_0 throw new ConfigurationErrorsException (msg, cause, node); -#else - throw new ConfigurationException (msg, cause, node); -#endif } static Exception CreateAttributeMissingException (string name, XmlNode node) { string msg = string.Format (CultureInfo.InvariantCulture, "Missing '{0}' attribute.", name); -#if NET_2_0 throw new ConfigurationErrorsException (msg, node); -#else - throw new ConfigurationException (msg, node); -#endif } } } diff --git a/mcs/class/System.Data/Test/ProviderTests/Common/ProviderTestsConfigurationHandler.cs b/mcs/class/System.Data/Test/ProviderTests/Common/ProviderTestsConfigurationHandler.cs index 94db9facb0d..fd7c01383d3 100644 --- a/mcs/class/System.Data/Test/ProviderTests/Common/ProviderTestsConfigurationHandler.cs +++ b/mcs/class/System.Data/Test/ProviderTests/Common/ProviderTestsConfigurationHandler.cs @@ -48,11 +48,7 @@ namespace MonoTests.System.Data string msg = string.Format (CultureInfo.InvariantCulture, "A engine with name '{0}' already exists.", engine.Name); -#if NET_2_0 throw new ConfigurationErrorsException (msg, engineNode); -#else - throw new ConfigurationException (msg, engineNode); -#endif } engines.Add (engine.Name, engine); } @@ -65,11 +61,7 @@ namespace MonoTests.System.Data string msg = string.Format (CultureInfo.InvariantCulture, "A connection with name '{0}' already exists.", conn.Name); -#if NET_2_0 throw new ConfigurationErrorsException (msg, connNode); -#else - throw new ConfigurationException (msg, connNode); -#endif } connections.Add (conn.Name, conn); } diff --git a/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest.cs b/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest.cs index acb2d379c4b..54515b89319 100644 --- a/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DataReaderTest.cs @@ -2283,7 +2283,6 @@ namespace MonoTests.System.Data Assert.IsTrue (reader.Read (), "#D1"); if (conn is SqlConnection) { -#if NET_2_0 try { reader.GetBytes (0, 0, null, 0, 0); Assert.Fail ("#D2"); @@ -2295,9 +2294,6 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#D4"); Assert.IsNotNull (ex.Message, "#D5"); } -#else - Assert.AreEqual (0, reader.GetBytes (0, 0, null, 0, 0), "#D2"); -#endif } else { Assert.AreEqual (-1, reader.GetBytes (0, 0, null, 0, 0), "#D2"); } @@ -2315,7 +2311,6 @@ namespace MonoTests.System.Data Assert.IsTrue (reader.Read (), "#H1"); if (conn is SqlConnection) { -#if NET_2_0 try { reader.GetBytes (0, 5, null, 3, 4); Assert.Fail ("#H2"); @@ -2327,9 +2322,6 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#H4"); Assert.IsNotNull (ex.Message, "#H5"); } -#else - Assert.AreEqual (0, reader.GetBytes (0, 5, null, 3, 4), "#H2"); -#endif } else { Assert.AreEqual (-1, reader.GetBytes (0, 5, null, 3, 4), "#H2"); } diff --git a/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DbDataReaderTest.cs b/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DbDataReaderTest.cs index 21aaaab9eeb..65b0952b1fb 100644 --- a/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DbDataReaderTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/ProviderIndependant/DbDataReaderTest.cs @@ -26,7 +26,6 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#if NET_2_0 using System; using System.Data; @@ -121,4 +120,3 @@ namespace MonoTests.System.Data } } -#endif // NET_2_0 diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs index ed0d168a18c..a9a67fbd2a8 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandBuilderTest.cs @@ -59,13 +59,8 @@ namespace MonoTests.System.Data cb = new OdbcCommandBuilder (da); cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO employee (id, lname) VALUES (?, ?)", cmd.CommandText, "#A1"); -#else - Assert.AreEqual ("INSERT INTO employee( id , lname ) VALUES ( ? , ? )", - cmd.CommandText, "#A1"); -#endif Assert.AreSame (conn, cmd.Connection, "#A2"); AssertInsertParameters (cmd, "#A3:"); @@ -73,13 +68,8 @@ namespace MonoTests.System.Data cb.QuotePrefix = "\""; cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO \"employee (\"id, \"lname) VALUES (?, ?)", cmd.CommandText, "#B1"); -#else - Assert.AreEqual ("INSERT INTO \"employee( \"id , \"lname ) VALUES ( ? , ? )", - cmd.CommandText, "#B1"); -#endif Assert.AreSame (conn, cmd.Connection, "#B2"); AssertInsertParameters (cmd, "#B3:"); @@ -87,13 +77,8 @@ namespace MonoTests.System.Data cb.QuoteSuffix = "´"; cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO employee´ (id´, lname´) VALUES (?, ?)", cmd.CommandText, "#C1"); -#else - Assert.AreEqual ("INSERT INTO employee´( id´ , lname´ ) VALUES ( ? , ? )", - cmd.CommandText, "#C1"); -#endif Assert.AreSame (conn, cmd.Connection, "#C2"); AssertInsertParameters (cmd, "#C3:"); @@ -102,13 +87,8 @@ namespace MonoTests.System.Data cb.QuoteSuffix = "´"; cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO \"employee´ (\"id´, \"lname´) VALUES (?, ?)", cmd.CommandText, "#D1"); -#else - Assert.AreEqual ("INSERT INTO \"employee´( \"id´ , \"lname´ ) VALUES ( ? , ? )", - cmd.CommandText, "#D1"); -#endif Assert.AreSame (conn, cmd.Connection, "#D2"); AssertInsertParameters (cmd, "#D3:"); } finally { @@ -136,13 +116,8 @@ namespace MonoTests.System.Data OdbcCommandBuilder cb = new OdbcCommandBuilder (da); cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO employee (id, lname) VALUES (?, ?)", cmd.CommandText, "#1"); -#else - Assert.AreEqual ("INSERT INTO employee( id , lname ) VALUES ( ? , ? )", - cmd.CommandText, "#1"); -#endif Assert.AreSame (conn, cmd.Connection, "#2"); AssertInsertParameters (cmd, "#3:"); } finally { @@ -167,13 +142,8 @@ namespace MonoTests.System.Data OdbcCommandBuilder cb = new OdbcCommandBuilder (da); cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE employee SET id = ?, lname = ? WHERE ((id = ?) AND ((? = 1 AND lname IS NULL) OR (lname = ?)))", cmd.CommandText, "#A1"); -#else - Assert.AreEqual ("UPDATE employee SET id = ? , lname = ? WHERE ( (id = ?) AND ((? = 1 AND lname IS NULL) OR (lname = ?)) )", - cmd.CommandText, "#A1"); -#endif Assert.AreSame (conn, cmd.Connection, "#A2"); AssertUpdateParameters (cmd, "#A3:"); @@ -181,13 +151,8 @@ namespace MonoTests.System.Data cb.QuotePrefix = "\""; cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE \"employee SET \"id = ?, \"lname = ? WHERE ((\"id = ?) AND ((? = 1 AND \"lname IS NULL) OR (\"lname = ?)))", cmd.CommandText, "#B1"); -#else - Assert.AreEqual ("UPDATE \"employee SET \"id = ? , \"lname = ? WHERE ( (\"id = ?) AND ((? = 1 AND \"lname IS NULL) OR (\"lname = ?)) )", - cmd.CommandText, "#B1"); -#endif Assert.AreSame (conn, cmd.Connection, "#B2"); AssertUpdateParameters (cmd, "#B3:"); @@ -195,13 +160,8 @@ namespace MonoTests.System.Data cb.QuoteSuffix = "´"; cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE employee´ SET id´ = ?, lname´ = ? WHERE ((id´ = ?) AND ((? = 1 AND lname´ IS NULL) OR (lname´ = ?)))", cmd.CommandText, "#C1"); -#else - Assert.AreEqual ("UPDATE employee´ SET id´ = ? , lname´ = ? WHERE ( (id´ = ?) AND ((? = 1 AND lname´ IS NULL) OR (lname´ = ?)) )", - cmd.CommandText, "#C1"); -#endif Assert.AreSame (conn, cmd.Connection, "#C2"); AssertUpdateParameters (cmd, "#C3:"); @@ -210,13 +170,8 @@ namespace MonoTests.System.Data cb.QuoteSuffix = "´"; cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE \"employee´ SET \"id´ = ?, \"lname´ = ? WHERE ((\"id´ = ?) AND ((? = 1 AND \"lname´ IS NULL) OR (\"lname´ = ?)))", cmd.CommandText, "#D1"); -#else - Assert.AreEqual ("UPDATE \"employee´ SET \"id´ = ? , \"lname´ = ? WHERE ( (\"id´ = ?) AND ((? = 1 AND \"lname´ IS NULL) OR (\"lname´ = ?)) )", - cmd.CommandText, "#D1"); -#endif Assert.AreSame (conn, cmd.Connection, "#D2"); AssertUpdateParameters (cmd, "#D3:"); } finally { @@ -256,16 +211,13 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); Assert.AreSame (rows [0], ex.Row, "#5"); -#if NET_2_0 Assert.AreEqual (1, ex.RowCount, "#6"); -#endif } } finally { ConnectionManager.Singleton.CloseConnection (); } } -#if NET_2_0 [Test] public void GetInsertCommandTest_option_true () { @@ -397,7 +349,6 @@ namespace MonoTests.System.Data ConnectionManager.Singleton.CloseConnection (); } } -#endif [Test] public void GetDeleteCommandTest () @@ -415,13 +366,8 @@ namespace MonoTests.System.Data OdbcCommandBuilder cb = new OdbcCommandBuilder (da); cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM employee WHERE ((id = ?) AND ((? = 1 AND lname IS NULL) OR (lname = ?)))", cmd.CommandText, "#A1"); -#else - Assert.AreEqual ("DELETE FROM employee WHERE ( (id = ?) AND ((? = 1 AND lname IS NULL) OR (lname = ?)) )", - cmd.CommandText, "#A1"); -#endif Assert.AreSame (conn, cmd.Connection, "#A2"); AssertDeleteParameters (cmd, "#A3:"); @@ -429,13 +375,8 @@ namespace MonoTests.System.Data cb.QuotePrefix = "\""; cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM \"employee WHERE ((\"id = ?) AND ((? = 1 AND \"lname IS NULL) OR (\"lname = ?)))", cmd.CommandText, "#B1"); -#else - Assert.AreEqual ("DELETE FROM \"employee WHERE ( (\"id = ?) AND ((? = 1 AND \"lname IS NULL) OR (\"lname = ?)) )", - cmd.CommandText, "#B1"); -#endif Assert.AreSame (conn, cmd.Connection, "#B2"); AssertDeleteParameters (cmd, "#B3:"); @@ -443,13 +384,8 @@ namespace MonoTests.System.Data cb.QuoteSuffix = "´"; cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM employee´ WHERE ((id´ = ?) AND ((? = 1 AND lname´ IS NULL) OR (lname´ = ?)))", cmd.CommandText, "#C1"); -#else - Assert.AreEqual ("DELETE FROM employee´ WHERE ( (id´ = ?) AND ((? = 1 AND lname´ IS NULL) OR (lname´ = ?)) )", - cmd.CommandText, "#C1"); -#endif Assert.AreSame (conn, cmd.Connection, "#C2"); AssertDeleteParameters (cmd, "#C3:"); @@ -458,13 +394,8 @@ namespace MonoTests.System.Data cb.QuoteSuffix = "´"; cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM \"employee´ WHERE ((\"id´ = ?) AND ((? = 1 AND \"lname´ IS NULL) OR (\"lname´ = ?)))", cmd.CommandText, "#D1"); -#else - Assert.AreEqual ("DELETE FROM \"employee´ WHERE ( (\"id´ = ?) AND ((? = 1 AND \"lname´ IS NULL) OR (\"lname´ = ?)) )", - cmd.CommandText, "#D1"); -#endif Assert.AreSame (conn, cmd.Connection, "#D2"); AssertDeleteParameters (cmd, "#D3:"); } finally { @@ -475,9 +406,7 @@ namespace MonoTests.System.Data } [Test] -#if NET_2_0 [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")] -#endif public void QuotePrefix_DeleteCommand_Generated () { OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection; @@ -515,9 +444,7 @@ namespace MonoTests.System.Data } [Test] -#if NET_2_0 [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")] -#endif public void QuotePrefix_InsertCommand_Generated () { OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection; @@ -555,9 +482,7 @@ namespace MonoTests.System.Data } [Test] -#if NET_2_0 [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")] -#endif public void QuotePrefix_UpdateCommand_Generated () { OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection; @@ -595,9 +520,7 @@ namespace MonoTests.System.Data } [Test] -#if NET_2_0 [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")] -#endif public void QuoteSuffix_DeleteCommand_Generated () { OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection; @@ -635,9 +558,7 @@ namespace MonoTests.System.Data } [Test] -#if NET_2_0 [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")] -#endif public void QuoteSuffix_InsertCommand_Generated () { OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection; @@ -675,9 +596,7 @@ namespace MonoTests.System.Data } [Test] -#if NET_2_0 [Ignore ("QuoteSuffix and QuotePrefix are now in DbCommandBuilder, while commands are in implementation classes. Result: we cannot perform this check until we refactor this.")] -#endif public void QuoteSuffix_UpdateCommand_Generated () { OdbcConnection conn = (OdbcConnection) ConnectionManager.Singleton.Connection; @@ -714,7 +633,6 @@ namespace MonoTests.System.Data } } -#if NET_2_0 [Test] // QuoteIdentifier (String, OdbcConnection) public void QuoteIdentifier2 () { @@ -793,25 +711,16 @@ namespace MonoTests.System.Data ConnectionManager.Singleton.CloseConnection (); } } -#endif void AssertInsertParameters (OdbcCommand cmd, string prefix) { Assert.AreEqual (2, cmd.Parameters.Count, prefix + "Count"); Assert.AreEqual (DbType.Int32, cmd.Parameters [0].DbType, prefix + "DbType (0)"); -#if NET_2_0 Assert.AreEqual ("p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)"); -#else - Assert.AreEqual ("@p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)"); -#endif Assert.AreEqual ("id", cmd.Parameters [0].SourceColumn, prefix + "SourceColumn (0)"); Assert.IsNull (cmd.Parameters [0].Value, prefix + "Value (0)"); Assert.AreEqual (DbType.AnsiString, cmd.Parameters [1].DbType, prefix + "DbType (1)"); -#if NET_2_0 Assert.AreEqual ("p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)"); -#else - Assert.AreEqual ("@p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)"); -#endif Assert.AreEqual ("lname", cmd.Parameters [1].SourceColumn, prefix + "SourceColumn (1)"); Assert.IsNull (cmd.Parameters [1].Value, prefix + "Value (1)"); } @@ -820,44 +729,23 @@ namespace MonoTests.System.Data { Assert.AreEqual (5, cmd.Parameters.Count, prefix + "Count"); Assert.AreEqual (DbType.Int32, cmd.Parameters [0].DbType, prefix + "DbType (0)"); -#if NET_2_0 Assert.AreEqual ("p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)"); -#else - Assert.AreEqual ("@p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)"); -#endif Assert.AreEqual ("id", cmd.Parameters [0].SourceColumn, prefix + "SourceColumn (0)"); Assert.IsNull (cmd.Parameters [0].Value, prefix + "Value (0)"); Assert.AreEqual (DbType.AnsiString, cmd.Parameters [1].DbType, prefix + "DbType (1)"); -#if NET_2_0 Assert.AreEqual ("p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)"); -#else - Assert.AreEqual ("@p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)"); -#endif Assert.AreEqual ("lname", cmd.Parameters [1].SourceColumn, prefix + "SourceColumn (1)"); Assert.IsNull (cmd.Parameters [1].Value, prefix + "Value (1)"); Assert.AreEqual (DbType.Int32, cmd.Parameters [2].DbType, prefix + "DbType (2)"); -#if NET_2_0 Assert.AreEqual ("p3", cmd.Parameters [2].ParameterName, prefix + "ParameterName (2)"); -#else - Assert.AreEqual ("@p3", cmd.Parameters [2].ParameterName, prefix + "ParameterName (2)"); -#endif Assert.AreEqual ("id", cmd.Parameters [2].SourceColumn, prefix + "SourceColumn (2)"); Assert.IsNull (cmd.Parameters [2].Value, prefix + "Value (2)"); Assert.AreEqual (DbType.Int32, cmd.Parameters [3].DbType, prefix + "DbType (3)"); -#if NET_2_0 Assert.AreEqual ("p4", cmd.Parameters [3].ParameterName, prefix + "ParameterName (3)"); Assert.AreEqual ("lname", cmd.Parameters [3].SourceColumn, prefix + "SourceColumn (3)"); -#else - Assert.AreEqual ("@p4", cmd.Parameters [3].ParameterName, prefix + "ParameterName (3)"); - Assert.AreEqual (string.Empty, cmd.Parameters [3].SourceColumn, prefix + "SourceColumn (3)"); -#endif Assert.AreEqual (1, cmd.Parameters [3].Value, prefix + "Value (3)"); Assert.AreEqual (DbType.AnsiString, cmd.Parameters [4].DbType, prefix + "DbType (4)"); -#if NET_2_0 Assert.AreEqual ("p5", cmd.Parameters [4].ParameterName, prefix + "ParameterName (4)"); -#else - Assert.AreEqual ("@p5", cmd.Parameters [4].ParameterName, prefix + "ParameterName (4)"); -#endif Assert.AreEqual ("lname", cmd.Parameters [4].SourceColumn, prefix + "SourceColumn (4)"); Assert.IsNull (cmd.Parameters [4].Value, prefix + "Value (4)"); } @@ -866,28 +754,15 @@ namespace MonoTests.System.Data { Assert.AreEqual (3, cmd.Parameters.Count, prefix + "Count"); Assert.AreEqual (DbType.Int32, cmd.Parameters [0].DbType, prefix + "DbType (0)"); -#if NET_2_0 Assert.AreEqual ("p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)"); -#else - Assert.AreEqual ("@p1", cmd.Parameters [0].ParameterName, prefix + "ParameterName (0)"); -#endif Assert.AreEqual ("id", cmd.Parameters [0].SourceColumn, prefix + "SourceColumn (0)"); Assert.IsNull (cmd.Parameters [0].Value, prefix + "Value (0)"); Assert.AreEqual (DbType.Int32, cmd.Parameters [1].DbType, prefix + "DbType (1)"); -#if NET_2_0 Assert.AreEqual ("p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)"); Assert.AreEqual ("lname", cmd.Parameters [1].SourceColumn, prefix + "SourceColumn (1)"); -#else - Assert.AreEqual ("@p2", cmd.Parameters [1].ParameterName, prefix + "ParameterName (1)"); - Assert.AreEqual (string.Empty, cmd.Parameters [1].SourceColumn, prefix + "SourceColumn (1)"); -#endif Assert.AreEqual (1, cmd.Parameters [1].Value, prefix + "Value (1)"); Assert.AreEqual (DbType.AnsiString, cmd.Parameters [2].DbType, prefix + "DbType (2)"); -#if NET_2_0 Assert.AreEqual ("p3", cmd.Parameters [2].ParameterName, prefix + "ParameterName (2)"); -#else - Assert.AreEqual ("@p3", cmd.Parameters [2].ParameterName, prefix + "ParameterName (2)"); -#endif Assert.AreEqual ("lname", cmd.Parameters [2].SourceColumn, prefix + "SourceColumn (2)"); Assert.IsNull (cmd.Parameters [2].Value, prefix + "Value (2)"); } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandTest.cs index 3553ce09977..1a93a511d5f 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcCommandTest.cs @@ -94,7 +94,6 @@ namespace MonoTests.System.Data cmd.CommandText = "select id, small_id from " + tableName + " order by id asc"; reader = cmd.ExecuteReader (); -#if NET_2_0 Assert.IsTrue (reader.Read (), "#A1"); Assert.AreEqual (1, reader.GetValue (0), "#A2"); Assert.AreEqual (5, reader.GetValue (1), "#A3"); @@ -102,11 +101,6 @@ namespace MonoTests.System.Data Assert.AreEqual (2, reader.GetValue (0), "#A5"); Assert.AreEqual (6, reader.GetValue (1), "#A6"); Assert.IsFalse (reader.Read (), "#A7"); -#else - // in .NET 1.x, changing the CommandText - // does not reset prepared state - Assert.IsFalse (reader.Read (), "#A1"); -#endif reader.Close (); cmd.Dispose (); @@ -120,13 +114,7 @@ namespace MonoTests.System.Data Assert.IsTrue (reader.Read (), "#B4"); Assert.AreEqual (2, reader.GetValue (0), "#B5"); Assert.AreEqual (6, reader.GetValue (1), "#B6"); -#if NET_2_0 Assert.IsFalse (reader.Read (), "#B7"); -#else - Assert.IsTrue (reader.Read (), "#B7"); - Assert.AreEqual (2, reader.GetValue (0), "#B8"); - Assert.AreEqual (6, reader.GetValue (1), "#B9"); -#endif } finally { DBHelper.ExecuteNonQuery (conn, "DROP TABLE " + tableName); } @@ -162,7 +150,6 @@ namespace MonoTests.System.Data cmd.CommandText = "select count(*) from employee where id <= ?;"; cmd.Parameters.Add ("@un", OdbcType.Int).Value = 3; ret = cmd.ExecuteNonQuery (); -#if NET_2_0 switch (ConnectionManager.Singleton.Engine.Type) { case EngineType.SQLServer: Assert.AreEqual (-1, ret, "#1"); @@ -174,16 +161,12 @@ namespace MonoTests.System.Data Assert.Fail ("Engine type not supported."); break; } -#else - Assert.AreEqual (-1, ret, "#1"); -#endif cmd = conn.CreateCommand (); cmd.CommandType = CommandType.Text; cmd.CommandText = "select * from employee where id <= ?;"; cmd.Parameters.Add ("@un", OdbcType.Int).Value = 3; ret = cmd.ExecuteNonQuery (); -#if NET_2_0 switch (ConnectionManager.Singleton.Engine.Type) { case EngineType.SQLServer: Assert.AreEqual (-1, ret, "#2"); @@ -195,15 +178,11 @@ namespace MonoTests.System.Data Assert.Fail ("Engine type not supported."); break; } -#else - Assert.AreEqual (-1, ret, "#2"); -#endif cmd = conn.CreateCommand (); cmd.CommandType = CommandType.Text; cmd.CommandText = "select * from employee where id <= 3;"; ret = cmd.ExecuteNonQuery (); -#if NET_2_0 switch (ConnectionManager.Singleton.Engine.Type) { case EngineType.SQLServer: Assert.AreEqual (-1, ret, "#3"); @@ -215,9 +194,6 @@ namespace MonoTests.System.Data Assert.Fail ("Engine type not supported."); break; } -#else - Assert.AreEqual (-1, ret, "#3"); -#endif try { // insert @@ -292,11 +268,7 @@ namespace MonoTests.System.Data cmd.Dispose (); -#if NET_2_0 Assert.AreEqual (string.Empty, cmd.CommandText, "#1"); -#else - Assert.AreEqual ("SELECT 'a'", cmd.CommandText, "#1"); -#endif Assert.AreEqual (67, cmd.CommandTimeout, "#2"); Assert.AreEqual (CommandType.StoredProcedure, cmd.CommandType, "#3"); Assert.IsNull (cmd.Connection, "#4"); diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs index b4dbf031e8d..2ed2b23a4fd 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcDataReaderTest.cs @@ -179,7 +179,6 @@ namespace MonoTests.System.Data byte [] val = new byte [totalsize]; int buffer_offset = 1; -#if NET_2_0 long ret = reader.GetBytes (0, 0, val, buffer_offset, (int) totalsize); Assert.AreEqual (274, ret, "#B1"); Assert.AreEqual (0x00, val [0], "#B2"); @@ -187,19 +186,6 @@ namespace MonoTests.System.Data Assert.AreEqual (long_bytes [i], val [i + buffer_offset], "#B2:" + i); for (long i = (ret + buffer_offset); i < val.Length; i++) Assert.AreEqual (0x00, val [i], "#B3:" + i); -#else - try { - reader.GetBytes (0, 0, val, buffer_offset, (int) totalsize); - Assert.Fail ("#B1"); - } catch (ArgumentOutOfRangeException ex) { - // Requested range extends past the end - // of the array - Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsNull (ex.ParamName, "#B5"); - } -#endif } using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SingleResult | CommandBehavior.SequentialAccess)) { @@ -226,21 +212,12 @@ namespace MonoTests.System.Data try { reader.GetBytes (0, 0, null, -1, 0); Assert.Fail ("#2"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#3"); Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual ("bufferIndex", ex.ParamName, "#6"); } -#else - } catch (ArgumentException ex) { - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#3"); - Assert.IsNull (ex.InnerException, "#4"); - Assert.AreEqual ("bufferIndex", ex.Message, "#5"); - Assert.IsNull (ex.ParamName, "#6"); - } -#endif } } @@ -256,7 +233,6 @@ namespace MonoTests.System.Data using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SequentialAccess)) { Assert.IsTrue (reader.Read (), "#A1"); -#if NET_2_0 try { reader.GetBytes (0, -1L, null, 0, 0); Assert.Fail ("#A2"); @@ -266,32 +242,11 @@ namespace MonoTests.System.Data Assert.IsNotNull (ex.Message, "#A5"); Assert.AreEqual ("dataIndex", ex.ParamName, "#A6"); } -#else - long totalsize = reader.GetBytes (0, -1L, null, 0, 0); - Assert.AreEqual (5, totalsize, "#A2"); - - byte [] val = new byte [totalsize]; - try { - reader.GetBytes (0, -1L, val, 0, 3); - Assert.Fail ("#A3"); - } catch (InvalidOperationException ex) { - // Invalid GetBytes attempt at dataIndex '-1'. - // With CommandBehavior.SequentialAccess, you - // may only read from dataIndex '0' or greater - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A4"); - Assert.IsNull (ex.InnerException, "#A5"); - Assert.IsNotNull (ex.Message, "#A6"); - Assert.IsTrue (ex.Message.IndexOf ("CommandBehavior.SequentialAccess") != -1, "#A7:" + ex.Message); - Assert.IsTrue (ex.Message.IndexOf ("'" + (-1L).ToString (CultureInfo.InvariantCulture) + "'") != -1, "#A8:" + ex.Message); - Assert.IsTrue (ex.Message.IndexOf ("'" + 0L.ToString (CultureInfo.InvariantCulture) + "'") != -1, "#A9:" + ex.Message); - } -#endif } using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SingleResult)) { Assert.IsTrue (reader.Read (), "#B1"); -#if NET_2_0 try { reader.GetBytes (0, -1L, null, 0, 0); Assert.Fail ("#B2"); @@ -301,17 +256,6 @@ namespace MonoTests.System.Data Assert.IsNotNull (ex.Message, "#B5"); Assert.AreEqual ("dataIndex", ex.ParamName, "#B6"); } -#else - long totalsize = reader.GetBytes (0, -1L, null, 0, 0); - Assert.AreEqual (5, totalsize, "#B2"); - - byte [] val = new byte [totalsize]; - try { - reader.GetBytes (0, -1L, val, 0, 3); - Assert.Fail ("#B3"); - } catch (ArgumentOutOfRangeException) { - } -#endif } } @@ -326,21 +270,12 @@ namespace MonoTests.System.Data try { reader.GetBytes (0, 0, null, 0, -1); Assert.Fail ("#2"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#3"); Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual ("length", ex.ParamName, "#6"); } -#else - } catch (ArgumentException ex) { - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#3"); - Assert.IsNull (ex.InnerException, "#4"); - Assert.AreEqual ("length", ex.Message, "#5"); - Assert.IsNull (ex.ParamName, "#6"); - } -#endif } } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterCollectionTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterCollectionTest.cs index 4b086054229..f08c918974e 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterCollectionTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterCollectionTest.cs @@ -65,7 +65,6 @@ namespace MonoTests.System.Data.Odbc } } -#if NET_2_0 [Test] public void InsertTest () { @@ -1242,6 +1241,5 @@ namespace MonoTests.System.Data.Odbc ConnectionManager.Singleton.CloseConnection (); } } -#endif } } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterTest.cs index 55d3625ad2e..2abcc297f9a 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.Odbc/OdbcParameterTest.cs @@ -4250,11 +4250,7 @@ namespace MonoTests.System.Data DataSet Lector = new DataSet (); Adaptador.SelectCommand = new OdbcCommand ("SELECT ?;", (OdbcConnection) conn); -#if NET_2_0 Adaptador.SelectCommand.Parameters.AddWithValue("@un", DBNull.Value); -#else - Adaptador.SelectCommand.Parameters.Add ("@un", (object) DBNull.Value); -#endif Adaptador.Fill (Lector); Assert.AreEqual (Lector.Tables[0].Rows[0][0], DBNull.Value, "#1 DBNull parameter not passed correctly"); } finally { @@ -4305,9 +4301,7 @@ namespace MonoTests.System.Data Assert.AreEqual (0, p.Scale, "#A:Scale"); Assert.AreEqual (0, p.Size, "#A:Size"); Assert.AreEqual (String.Empty, p.SourceColumn, "#A:SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "#A:SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "#A:SourceVersion"); Assert.IsNull (p.Value, "#A:Value"); @@ -4321,9 +4315,7 @@ namespace MonoTests.System.Data Assert.AreEqual (0, p.Scale, "#B:Scale"); Assert.AreEqual (0, p.Size, "#B:Size"); Assert.AreEqual (String.Empty, p.SourceColumn, "#B:SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "#B:SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "#B:SourceVersion"); Assert.AreEqual (2, p.Value, "#B:Value"); @@ -4337,9 +4329,7 @@ namespace MonoTests.System.Data Assert.AreEqual (0, p.Scale, "#C:Scale"); Assert.AreEqual (0, p.Size, "#C:Size"); Assert.AreEqual (String.Empty, p.SourceColumn, "#C:SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "#C:SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "#C:SourceVersion"); Assert.AreEqual (2, p.Value, "#C:Value"); @@ -4353,9 +4343,7 @@ namespace MonoTests.System.Data Assert.AreEqual (0, p.Scale, "#D:Scale"); Assert.AreEqual (0, p.Size, "#D:Size"); Assert.AreEqual (String.Empty, p.SourceColumn, "#D:SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "#D:SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "#D:SourceVersion"); Assert.IsNull (p.Value, "#D:Value"); } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlClientFactoryTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlClientFactoryTest.cs index 3ada86e3a85..c76b2be7617 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlClientFactoryTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlClientFactoryTest.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.Data; @@ -56,4 +55,3 @@ namespace MonoTests.System.Data } } -#endif diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs index c60335dca27..6e97df0fe7a 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandBuilderTest.cs @@ -33,9 +33,7 @@ using System; using System.Data; using System.Data.Common; using System.Data.SqlClient; -#if NET_2_0 using System.Data.SqlTypes; -#endif using Mono.Data; using NUnit.Framework; @@ -90,15 +88,9 @@ namespace MonoTests.System.Data cb = new SqlCommandBuilder (da); cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO [employee] ([id], " + "[fname], [lname]) VALUES (@p1, @p2, @p3)", cmd.CommandText, "#A1"); -#else - Assert.AreEqual ("INSERT INTO employee( id , " + - "fname , lname ) VALUES ( @p1 , @p2 , @p3 )", - cmd.CommandText, "#A1"); -#endif Assert.AreSame (conn, cmd.Connection, "#A2"); AssertInsertParameters (cmd, false, "#A3:"); Assert.AreSame (cmd, cb.GetInsertCommand (), "#A4"); @@ -106,35 +98,19 @@ namespace MonoTests.System.Data cb.RefreshSchema (); cb.QuotePrefix = "\""; cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO \"employee] (\"id], " + "\"fname], \"lname]) VALUES (@p1, @p2, @p3)", cmd.CommandText, "#B1"); -#else - Assert.AreEqual ("INSERT INTO \"employee( \"id , " + - "\"fname , \"lname ) VALUES ( @p1 , @p2 , @p3 )", - cmd.CommandText, "#B1"); -#endif Assert.AreSame (conn, cmd.Connection, "#B2"); AssertInsertParameters (cmd, false, "#B3:"); Assert.AreSame (cmd, cb.GetInsertCommand (), "#B4"); cb.RefreshSchema (); -#if NET_2_0 cb.QuoteSuffix = "\""; -#else - cb.QuoteSuffix = "´"; -#endif cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO \"employee\" (\"id\", " + "\"fname\", \"lname\") VALUES (@p1, @p2, @p3)", cmd.CommandText, "#C1"); -#else - Assert.AreEqual ("INSERT INTO \"employee´( \"id´ , " + - "\"fname´ , \"lname´ ) VALUES ( @p1 , @p2 , @p3 )", - cmd.CommandText, "#C1"); -#endif Assert.AreSame (conn, cmd.Connection, "#C2"); AssertInsertParameters (cmd, false, "#C3"); Assert.AreSame (cmd, cb.GetInsertCommand (), "#C4"); @@ -160,15 +136,9 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("INSERT INTO [employee] " + "([id], [fname], [lname]) VALUES " + "(@p1, @p2, @p3)", cmd.CommandText, "#1"); -#else - Assert.AreEqual ("INSERT INTO employee( id , " + - "fname , lname ) VALUES ( @p1 , @p2 , " + - "@p3 )", cmd.CommandText, "#1"); -#endif Assert.AreSame (conn, cmd.Connection, "#2"); AssertInsertParameters (cmd, false, "#3:"); } finally { @@ -177,7 +147,6 @@ namespace MonoTests.System.Data } } -#if NET_2_0 [Test] // GetInsertCommand (Boolean) public void GetInsertCommand2 () { @@ -227,7 +196,6 @@ namespace MonoTests.System.Data cmd.Dispose (); } } -#endif [Test] // GetUpdateCommand () public void GetUpdateCommand1 () @@ -245,20 +213,11 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE [employee] SET [id] = @p1, " + "[fname] = @p2, [lname] = @p3 WHERE (([id] = @p4) " + "AND ([fname] = @p5) AND ((@p6 = 1 " + "AND [lname] IS NULL) OR ([lname] = @p7)))", cmd.CommandText, "#A1"); -#else - Assert.AreEqual ("UPDATE employee SET id = @p1 , " + - "fname = @p2 , lname = @p3 WHERE ( (id = @p4) " + - "AND ((@p5 = 1 AND fname IS NULL) OR " + - "(fname = @p6)) AND ((@p7 = 1 AND " + - "lname IS NULL) OR (lname = @p8)) )", - cmd.CommandText, "#A1"); -#endif Assert.AreSame (conn, cmd.Connection, "#A2"); AssertUpdateParameters (cmd, false, "#A3:"); Assert.AreSame (cmd, cb.GetUpdateCommand (), "#A4"); @@ -266,45 +225,23 @@ namespace MonoTests.System.Data cb.RefreshSchema (); cb.QuotePrefix = "\""; cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE \"employee] SET \"id] = @p1, " + "\"fname] = @p2, \"lname] = @p3 WHERE ((\"id] = @p4) " + "AND (\"fname] = @p5) AND ((@p6 = 1 " + "AND \"lname] IS NULL) OR (\"lname] = @p7)))", cmd.CommandText, "#B1"); -#else - Assert.AreEqual ("UPDATE \"employee SET \"id = @p1 , " + - "\"fname = @p2 , \"lname = @p3 WHERE ( (\"id = @p4) " + - "AND ((@p5 = 1 AND \"fname IS NULL) OR " + - "(\"fname = @p6)) AND ((@p7 = 1 AND " + - "\"lname IS NULL) OR (\"lname = @p8)) )", - cmd.CommandText, "#B1"); -#endif Assert.AreSame (conn, cmd.Connection, "#B2"); AssertUpdateParameters (cmd, false, "#B3:"); Assert.AreSame (cmd, cb.GetUpdateCommand (), "#B4"); cb.RefreshSchema (); -#if NET_2_0 cb.QuoteSuffix = "\""; -#else - cb.QuoteSuffix = "´"; -#endif cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE \"employee\" SET \"id\" = @p1, " + "\"fname\" = @p2, \"lname\" = @p3 WHERE ((\"id\" = @p4) " + "AND (\"fname\" = @p5) AND ((@p6 = 1 " + "AND \"lname\" IS NULL) OR (\"lname\" = @p7)))", cmd.CommandText, "#C1"); -#else - Assert.AreEqual ("UPDATE \"employee´ SET \"id´ = @p1 , " + - "\"fname´ = @p2 , \"lname´ = @p3 WHERE ( (\"id´ = @p4) " + - "AND ((@p5 = 1 AND \"fname´ IS NULL) OR " + - "(\"fname´ = @p6)) AND ((@p7 = 1 AND " + - "\"lname´ IS NULL) OR (\"lname´ = @p8)) )", - cmd.CommandText, "#C1"); -#endif Assert.AreSame (conn, cmd.Connection, "#C2"); AssertUpdateParameters (cmd, false, "#C3:"); Assert.AreSame (cmd, cb.GetUpdateCommand (), "#C4"); @@ -336,20 +273,11 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("UPDATE [#tmp_table] SET [id] = @p1, " + "[value] = @p2 WHERE (([id] = @p3) AND (" + "[counter] = @p4) AND ((@p5 = 1 AND [value] IS NULL) " + "OR ([value] = @p6)))", cmd.CommandText, "#1"); Assert.AreEqual (6, cmd.Parameters.Count, "#2"); -#else - Assert.AreEqual ("UPDATE #tmp_table SET id = @p1 , " + - "value = @p2 WHERE ( (id = @p3) AND (" + - "(@p4 = 1 AND counter IS NULL) OR (counter = @p5)) " + - "AND ((@p6 = 1 AND value IS NULL) OR (value = @p7)) )", - cmd.CommandText, "#1"); - Assert.AreEqual (7, cmd.Parameters.Count, "#2"); -#endif } finally { if (cmd != null) cmd.Dispose (); @@ -382,7 +310,6 @@ namespace MonoTests.System.Data } } -#if NET_2_0 [Test] // GetUpdateCommand (Boolean) public void GetUpdateCommand2 () { @@ -545,7 +472,6 @@ namespace MonoTests.System.Data cmd.Dispose (); } } -#endif [Test] public void GetUpdateCommandDBConcurrencyExceptionTest () @@ -573,9 +499,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreSame (rows [0], ex.Row, "#6"); -#if NET_2_0 Assert.AreEqual (1, ex.RowCount, "#7"); -#endif } } @@ -605,9 +529,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); Assert.AreSame (rows [0], ex.Row, "#5"); -#if NET_2_0 Assert.AreEqual (1, ex.RowCount, "#6"); -#endif } } @@ -627,18 +549,10 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM [employee] WHERE " + "(([id] = @p1) AND ([fname] = @p2) AND " + "((@p3 = 1 AND [lname] IS NULL) OR " + "([lname] = @p4)))", cmd.CommandText, "#A1"); -#else - Assert.AreEqual ("DELETE FROM employee WHERE ( " + - "(id = @p1) AND ((@p2 = 1 AND fname IS NULL) " + - "OR (fname = @p3)) AND ((@p4 = 1 AND " + - "lname IS NULL) OR (lname = @p5)) )", - cmd.CommandText, "#A1"); -#endif Assert.AreSame (conn, cmd.Connection, "#A2"); AssertDeleteParameters (cmd, false, "#A3:"); Assert.AreSame (cmd, cb.GetDeleteCommand (), "#A4"); @@ -647,42 +561,22 @@ namespace MonoTests.System.Data cb.QuotePrefix = "\""; cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM \"employee] WHERE " + "((\"id] = @p1) AND (\"fname] = @p2) AND " + "((@p3 = 1 AND \"lname] IS NULL) OR " + "(\"lname] = @p4)))", cmd.CommandText, "#B1"); -#else - Assert.AreEqual ("DELETE FROM \"employee WHERE ( " + - "(\"id = @p1) AND ((@p2 = 1 AND \"fname IS NULL) " + - "OR (\"fname = @p3)) AND ((@p4 = 1 AND " + - "\"lname IS NULL) OR (\"lname = @p5)) )", - cmd.CommandText, "#B1"); -#endif Assert.AreSame (conn, cmd.Connection, "#B2"); AssertDeleteParameters (cmd, false, "#B3:"); Assert.AreSame (cmd, cb.GetDeleteCommand (), "#B4"); cb.RefreshSchema (); -#if NET_2_0 cb.QuoteSuffix = "\""; -#else - cb.QuoteSuffix = "´"; -#endif cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM \"employee\" WHERE " + "((\"id\" = @p1) AND (\"fname\" = @p2) AND " + "((@p3 = 1 AND \"lname\" IS NULL) OR " + "(\"lname\" = @p4)))", cmd.CommandText, "#C1"); -#else - Assert.AreEqual ("DELETE FROM \"employee´ WHERE ( " + - "(\"id´ = @p1) AND ((@p2 = 1 AND \"fname´ IS NULL) " + - "OR (\"fname´ = @p3)) AND ((@p4 = 1 AND " + - "\"lname´ IS NULL) OR (\"lname´ = @p5)) )", - cmd.CommandText, "#C1"); -#endif Assert.AreSame (conn, cmd.Connection, "#C2"); AssertDeleteParameters (cmd, false, "#C3:"); Assert.AreSame (cmd, cb.GetDeleteCommand (), "#C4"); @@ -714,20 +608,11 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("DELETE FROM [#tmp_table] WHERE " + "(([id] = @p1) AND ([counter] = @p2) AND " + "((@p3 = 1 AND [value] IS NULL) OR ([value] = @p4)))", cmd.CommandText, "#1"); Assert.AreEqual (4, cmd.Parameters.Count, "#2"); -#else - Assert.AreEqual ("DELETE FROM #tmp_table WHERE ( " + - "(id = @p1) AND ((@p2 = 1 AND counter IS NULL) " + - "OR (counter = @p3)) AND ((@p4 = 1 AND value " + - "IS NULL) OR (value = @p5)) )", - cmd.CommandText, "#1"); - Assert.AreEqual (5, cmd.Parameters.Count, "#2"); -#endif } finally { if (cmd != null) cmd.Dispose (); @@ -755,7 +640,6 @@ namespace MonoTests.System.Data } } -#if NET_2_0 [Test] // GetDeleteCommand () public void GetDeleteCommand2 () { @@ -873,13 +757,11 @@ namespace MonoTests.System.Data cmd.Dispose (); } } -#endif [Test] public void DefaultProperties () { SqlCommandBuilder cb = new SqlCommandBuilder (); -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#5"); Assert.AreEqual ("]", cb.QuoteSuffix, "#6"); Assert.AreEqual (".", cb.CatalogSeparator, "#2"); @@ -889,12 +771,6 @@ namespace MonoTests.System.Data Assert.AreEqual ("[monotest]", cb.QuoteIdentifier ("monotest"), "#7"); Assert.AreEqual ("\"monotest\"", cb.UnquoteIdentifier ("\"monotest\""), "#8"); //Assert.AreEqual (cb.ConflictOption.CompareAllSearchableValues, cb.ConflictDetection); -#else - Assert.AreEqual ("", cb.QuotePrefix, "#5"); - Assert.AreEqual ("", cb.QuoteSuffix, "#6"); - //Assert.AreEqual ("\"monotest\"", cb.QuoteIdentifier ("monotest"), "#7"); - //Assert.AreEqual ("monotest", cb.UnquoteIdentifier ("\"monotest\""), "#8"); -#endif // FIXME: test SetAllValues } @@ -1027,11 +903,7 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#1"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#1"); -#endif try { cb.QuotePrefix = "\""; Assert.Fail ("#2"); @@ -1043,11 +915,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); } -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#6"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#6"); -#endif cb.RefreshSchema (); cb.QuotePrefix = "\""; } finally { @@ -1069,11 +937,7 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#1"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#1"); -#endif try { cb.QuotePrefix = "\""; Assert.Fail ("#2"); @@ -1085,11 +949,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); } -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#6"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#6"); -#endif cb.RefreshSchema (); cb.QuotePrefix = "\""; } finally { @@ -1111,11 +971,7 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#1"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#1"); -#endif try { cb.QuotePrefix = "\""; Assert.Fail ("#2"); @@ -1127,11 +983,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); } -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#6"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#6"); -#endif cb.RefreshSchema (); cb.QuotePrefix = "\""; } finally { @@ -1153,11 +1005,7 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetDeleteCommand (); -#if NET_2_0 Assert.AreEqual ("]", cb.QuoteSuffix, "#1"); -#else - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#1"); -#endif try { cb.QuoteSuffix = "\""; Assert.Fail ("#2"); @@ -1169,11 +1017,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); } -#if NET_2_0 Assert.AreEqual ("]", cb.QuoteSuffix, "#6"); -#else - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#6"); -#endif cb.RefreshSchema (); cb.QuoteSuffix = "\""; } finally { @@ -1195,11 +1039,7 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetInsertCommand (); -#if NET_2_0 Assert.AreEqual ("]", cb.QuoteSuffix, "#1"); -#else - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#1"); -#endif try { cb.QuoteSuffix = "\""; Assert.Fail ("#2"); @@ -1211,11 +1051,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); } -#if NET_2_0 Assert.AreEqual ("]", cb.QuoteSuffix, "#6"); -#else - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#6"); -#endif cb.RefreshSchema (); cb.QuoteSuffix = "\""; } finally { @@ -1237,11 +1073,7 @@ namespace MonoTests.System.Data SqlCommandBuilder cb = new SqlCommandBuilder (da); cmd = cb.GetUpdateCommand (); -#if NET_2_0 Assert.AreEqual ("]", cb.QuoteSuffix, "#1"); -#else - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#1"); -#endif try { cb.QuoteSuffix = "\""; Assert.Fail ("#2"); @@ -1253,11 +1085,7 @@ namespace MonoTests.System.Data Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); } -#if NET_2_0 Assert.AreEqual ("]", cb.QuoteSuffix, "#6"); -#else - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#6"); -#endif cb.RefreshSchema (); cb.QuoteSuffix = "\""; } finally { @@ -1270,11 +1098,7 @@ namespace MonoTests.System.Data { SqlParameter param; -#if NET_2_0 Assert.AreEqual (4, cmd.Parameters.Count, prefix + "Count"); -#else - Assert.AreEqual (5, cmd.Parameters.Count, prefix + "Count"); -#endif param = cmd.Parameters [0]; Assert.AreEqual (DbType.Int32, param.DbType, prefix + "DbType (0)"); @@ -1294,21 +1118,15 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (0)"); //Assert.AreEqual (0, param.Size, prefix + "Size (0)"); Assert.AreEqual ("id", param.SourceColumn, prefix + "SourceColumn (0)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (0)"); -#endif Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (0)"); Assert.AreEqual (SqlDbType.Int, param.SqlDbType, prefix + "SqlDbType (0)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (0)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (0)"); -#endif Assert.IsNull (param.Value, prefix + "Value (0)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (0)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (0)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (0)"); -#endif #if ONLY_1_1 param = cmd.Parameters [1]; @@ -1326,127 +1144,74 @@ namespace MonoTests.System.Data Assert.AreEqual (1, param.Value, prefix + "Value (1)"); #endif -#if NET_2_0 param = cmd.Parameters [1]; -#else - param = cmd.Parameters [2]; -#endif Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (2)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (2)"); Assert.IsFalse (param.IsNullable, prefix + "IsNullable (2)"); Assert.AreEqual (0, param.Offset, prefix + "Offset (2)"); -#if NET_2_0 if (useColumnsForParameterNames) Assert.AreEqual ("@Original_fname", param.ParameterName, prefix + "ParameterName (2)"); else Assert.AreEqual ("@p2", param.ParameterName, prefix + "ParameterName (2)"); -#else - Assert.AreEqual ("@p3", param.ParameterName, prefix + "ParameterName (2)"); -#endif Assert.AreEqual (0, param.Precision, prefix + "Precision (2)"); Assert.AreEqual (0, param.Scale, prefix + "Scale (2)"); Assert.AreEqual (0, param.Size, prefix + "Size (2)"); Assert.AreEqual ("fname", param.SourceColumn, prefix + "SourceColumn (2)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (2)"); -#endif Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (2)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (2)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (2)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (2)"); -#endif Assert.IsNull (param.Value, prefix + "Value (2)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (2)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (2)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (2)"); -#endif -#if NET_2_0 param = cmd.Parameters [2]; -#else - param = cmd.Parameters [3]; -#endif Assert.AreEqual (DbType.Int32, param.DbType, prefix + "DbType (3)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (3)"); -#if NET_2_0 Assert.IsFalse (param.IsNullable, prefix + "IsNullable (3)"); -#else - Assert.IsTrue (param.IsNullable, prefix + "IsNullable (3)"); -#endif Assert.AreEqual (0, param.Offset, prefix + "Offset (3)"); -#if NET_2_0 if (useColumnsForParameterNames) Assert.AreEqual ("@IsNull_lname", param.ParameterName, prefix + "ParameterName (3)"); else Assert.AreEqual ("@p3", param.ParameterName, prefix + "ParameterName (3)"); -#else - Assert.AreEqual ("@p4", param.ParameterName, prefix + "ParameterName (3)"); -#endif Assert.AreEqual (0, param.Precision, prefix + "Precision (3)"); Assert.AreEqual (0, param.Scale, prefix + "Scale (3)"); //Assert.AreEqual (0, param.Size, prefix + "Size (3)"); -#if NET_2_0 Assert.AreEqual ("lname", param.SourceColumn, prefix + "SourceColumn (3)"); Assert.IsTrue (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (3)"); Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (3)"); -#else - Assert.AreEqual (string.Empty, param.SourceColumn, prefix + "SourceColumn (3)"); - Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (3)"); -#endif Assert.AreEqual (SqlDbType.Int, param.SqlDbType, prefix + "SqlDbType (3)"); -#if NET_2_0 Assert.AreEqual (new SqlInt32 (1), param.SqlValue, prefix + "SqlValue (3)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (3)"); -#endif Assert.AreEqual (1, param.Value, prefix + "Value (3)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (3)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (3)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (3)"); -#endif -#if NET_2_0 param = cmd.Parameters [3]; -#else - param = cmd.Parameters [4]; -#endif Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (4)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (4)"); -#if NET_2_0 Assert.IsFalse (param.IsNullable, prefix + "IsNullable (4)"); -#else - Assert.IsTrue (param.IsNullable, prefix + "IsNullable (4)"); -#endif Assert.AreEqual (0, param.Offset, prefix + "Offset (4)"); -#if NET_2_0 if (useColumnsForParameterNames) Assert.AreEqual ("@Original_lname", param.ParameterName, prefix + "ParameterName (4)"); else Assert.AreEqual ("@p4", param.ParameterName, prefix + "ParameterName (4)"); -#else - Assert.AreEqual ("@p5", param.ParameterName, prefix + "ParameterName (4)"); -#endif Assert.AreEqual (0, param.Precision, prefix + "Precision (4)"); Assert.AreEqual (0, param.Scale, prefix + "Scale (4)"); Assert.AreEqual (0, param.Size, prefix + "Size (4)"); Assert.AreEqual ("lname", param.SourceColumn, prefix + "SourceColumn (4)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (4)"); -#endif Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (4)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (4)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (4)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (4)"); -#endif Assert.IsNull (param.Value, prefix + "Value (4)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (4)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (4)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (4)"); -#endif } static void AssertInsertParameters (SqlCommand cmd, bool useColumnsForParameterNames, string prefix) @@ -1473,21 +1238,15 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (0)"); //Assert.AreEqual (0, param.Size, prefix + "Size (0)"); Assert.AreEqual ("id", param.SourceColumn, prefix + "SourceColumn (0)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (0)"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (0)"); Assert.AreEqual (SqlDbType.Int, param.SqlDbType, prefix + "SqlDbType (0)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (0)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (0)"); -#endif Assert.IsNull (param.Value, prefix + "Value (0)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (0)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (0)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (0)"); -#endif param = cmd.Parameters [1]; Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (1)"); @@ -1502,30 +1261,20 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (1)"); Assert.AreEqual (0, param.Size, prefix + "Size (1)"); Assert.AreEqual ("fname", param.SourceColumn, prefix + "SourceColumn (1)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (1)"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (1)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (1)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (1)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (1)"); -#endif Assert.IsNull (param.Value, prefix + "Value (1)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (1)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (1)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (1)"); -#endif param = cmd.Parameters [2]; Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (2)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (2)"); -#if NET_2_0 Assert.IsFalse (param.IsNullable, prefix + "IsNullable (2)"); -#else - Assert.IsTrue (param.IsNullable, prefix + "IsNullable (2)"); -#endif Assert.AreEqual (0, param.Offset, prefix + "Offset (2)"); if (useColumnsForParameterNames) Assert.AreEqual ("@lname", param.ParameterName, prefix + "ParameterName (2)"); @@ -1535,32 +1284,22 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (2)"); Assert.AreEqual (0, param.Size, prefix + "Size (2)"); Assert.AreEqual ("lname", param.SourceColumn, prefix + "SourceColumn (2)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (2)"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (2)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (2)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (2)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (2)"); -#endif Assert.IsNull (param.Value, prefix + "Value (2)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (2)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (2)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (2)"); -#endif } static void AssertUpdateParameters (SqlCommand cmd, bool useColumnsForParameterNames, string prefix) { SqlParameter param; -#if NET_2_0 Assert.AreEqual (7, cmd.Parameters.Count, prefix + "Count"); -#else - Assert.AreEqual (8, cmd.Parameters.Count, prefix + "Count"); -#endif param = cmd.Parameters [0]; Assert.AreEqual (DbType.Int32, param.DbType, prefix + "DbType (0)"); @@ -1580,21 +1319,15 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (0)"); //Assert.AreEqual (0, param.Size, prefix + "Size (0)"); Assert.AreEqual ("id", param.SourceColumn, prefix + "SourceColumn (0)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (0)"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (0)"); Assert.AreEqual (SqlDbType.Int, param.SqlDbType, prefix + "SqlDbType (0)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (0)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (0)"); -#endif Assert.IsNull (param.Value, prefix + "Value (0)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (0)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (0)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (0)"); -#endif param = cmd.Parameters [1]; Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (1)"); @@ -1609,30 +1342,20 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (1)"); //Assert.AreEqual (0, param.Size, prefix + "Size (1)"); Assert.AreEqual ("fname", param.SourceColumn, prefix + "SourceColumn (1)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (1)"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (1)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (1)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (1)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (1)"); -#endif Assert.IsNull (param.Value, prefix + "Value (1)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (1)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (1)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (1)"); -#endif param = cmd.Parameters [2]; Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (2)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (2)"); -#if NET_2_0 Assert.IsFalse (param.IsNullable, prefix + "IsNullable (2)"); -#else - Assert.IsTrue (param.IsNullable, prefix + "IsNullable (2)"); -#endif Assert.AreEqual (0, param.Offset, prefix + "Offset (2)"); if (useColumnsForParameterNames) Assert.AreEqual ("@lname", param.ParameterName, prefix + "ParameterName (2)"); @@ -1642,21 +1365,15 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (2)"); Assert.AreEqual (0, param.Size, prefix + "Size (2)"); Assert.AreEqual ("lname", param.SourceColumn, prefix + "SourceColumn (2)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (2)"); -#endif Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (2)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (2)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (2)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (2)"); -#endif Assert.IsNull (param.Value, prefix + "Value (2)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (2)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (2)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (2)"); -#endif param = cmd.Parameters [3]; Assert.AreEqual (DbType.Int32, param.DbType, prefix + "DbType (3)"); @@ -1676,21 +1393,15 @@ namespace MonoTests.System.Data Assert.AreEqual (0, param.Scale, prefix + "Scale (3)"); //Assert.AreEqual (0, param.Size, prefix + "Size (3)"); Assert.AreEqual ("id", param.SourceColumn, prefix + "SourceColumn (3)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (3)"); -#endif Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (3)"); Assert.AreEqual (SqlDbType.Int, param.SqlDbType, prefix + "SqlDbType (3)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (3)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (3)"); -#endif Assert.IsNull (param.Value, prefix + "Value (3)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (3)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (3)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (3)"); -#endif #if ONLY_1_1 param = cmd.Parameters [4]; @@ -1708,11 +1419,7 @@ namespace MonoTests.System.Data Assert.AreEqual (1, param.Value, prefix + "Value (4)"); #endif -#if NET_2_0 param = cmd.Parameters [4]; -#else - param = cmd.Parameters [5]; -#endif Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (5)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (5)"); Assert.IsFalse (param.IsNullable, prefix + "IsNullable (5)"); @@ -1720,115 +1427,66 @@ namespace MonoTests.System.Data if (useColumnsForParameterNames) Assert.AreEqual ("@Original_fname", param.ParameterName, prefix + "ParameterName (5)"); else -#if NET_2_0 Assert.AreEqual ("@p5", param.ParameterName, prefix + "ParameterName (5)"); -#else - Assert.AreEqual ("@p6", param.ParameterName, prefix + "ParameterName (5)"); -#endif Assert.AreEqual (0, param.Precision, prefix + "Precision (5)"); Assert.AreEqual (0, param.Scale, prefix + "Scale (5)"); Assert.AreEqual (0, param.Size, prefix + "Size (5)"); Assert.AreEqual ("fname", param.SourceColumn, prefix + "SourceColumn (5)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (5)"); -#endif Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (5)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (5)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (5)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (5)"); -#endif Assert.IsNull (param.Value, prefix + "Value (5)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (5)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (5)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (5)"); -#endif -#if NET_2_0 param = cmd.Parameters [5]; -#else - param = cmd.Parameters [6]; -#endif Assert.AreEqual (DbType.Int32, param.DbType, prefix + "DbType (6)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (6)"); -#if NET_2_0 Assert.IsFalse (param.IsNullable, prefix + "IsNullable (6)"); -#else - Assert.IsTrue (param.IsNullable, prefix + "IsNullable (6)"); -#endif Assert.AreEqual (0, param.Offset, prefix + "Offset (6)"); if (useColumnsForParameterNames) Assert.AreEqual ("@IsNull_lname", param.ParameterName, prefix + "ParameterName (6)"); else -#if NET_2_0 Assert.AreEqual ("@p6", param.ParameterName, prefix + "ParameterName (6)"); -#else - Assert.AreEqual ("@p7", param.ParameterName, prefix + "ParameterName (6)"); -#endif Assert.AreEqual (0, param.Precision, prefix + "Precision (6)"); Assert.AreEqual (0, param.Scale, prefix + "Scale (6)"); //Assert.AreEqual (0, param.Size, prefix + "Size (6)"); -#if NET_2_0 Assert.AreEqual ("lname", param.SourceColumn, prefix + "SourceColumn (6)"); Assert.IsTrue (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (6)"); Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (6)"); -#else - Assert.AreEqual (string.Empty, param.SourceColumn, prefix + "SourceColumn (6)"); - Assert.AreEqual (DataRowVersion.Current, param.SourceVersion, prefix + "SourceVersion (6)"); -#endif Assert.AreEqual (SqlDbType.Int, param.SqlDbType, prefix + "SqlDbType (6)"); -#if NET_2_0 Assert.AreEqual (new SqlInt32 (1), param.SqlValue, prefix + "SqlValue (6)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (6)"); -#endif Assert.AreEqual (1, param.Value, prefix + "Value (6)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (6)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (6)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (6)"); -#endif -#if NET_2_0 param = cmd.Parameters [6]; -#else - param = cmd.Parameters [7]; -#endif Assert.AreEqual (DbType.AnsiString, param.DbType, prefix + "DbType (7)"); Assert.AreEqual (ParameterDirection.Input, param.Direction, prefix + "Direction (7)"); -#if NET_2_0 Assert.IsFalse (param.IsNullable, prefix + "IsNullable (7)"); -#else - Assert.IsTrue (param.IsNullable, prefix + "IsNullable (7)"); -#endif Assert.AreEqual (0, param.Offset, prefix + "Offset (7)"); if (useColumnsForParameterNames) Assert.AreEqual ("@Original_lname", param.ParameterName, prefix + "ParameterName (7)"); else -#if NET_2_0 Assert.AreEqual ("@p7", param.ParameterName, prefix + "ParameterName (7)"); -#else - Assert.AreEqual ("@p8", param.ParameterName, prefix + "ParameterName (7)"); -#endif Assert.AreEqual (0, param.Precision, prefix + "Precision (7)"); Assert.AreEqual (0, param.Scale, prefix + "Scale (7)"); Assert.AreEqual (0, param.Size, prefix + "Size (7)"); Assert.AreEqual ("lname", param.SourceColumn, prefix + "SourceColumn (7)"); -#if NET_2_0 Assert.IsFalse (param.SourceColumnNullMapping, prefix + "SourceColumnNullMapping (7)"); -#endif Assert.AreEqual (DataRowVersion.Original, param.SourceVersion, prefix + "SourceVersion (7)"); Assert.AreEqual (SqlDbType.VarChar, param.SqlDbType, prefix + "SqlDbType (7)"); -#if NET_2_0 Assert.IsNull (param.SqlValue, prefix + "SqlValue (7)"); //Assert.AreEqual (string.Empty, param.UdtTypeName, prefix + "UdtTypeName (7)"); -#endif Assert.IsNull (param.Value, prefix + "Value (7)"); -#if NET_2_0 Assert.AreEqual (string.Empty, param.XmlSchemaCollectionDatabase, prefix + "XmlSchemaCollectionDatabase (7)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionName, prefix + "XmlSchemaCollectionName (7)"); Assert.AreEqual (string.Empty, param.XmlSchemaCollectionOwningSchema, prefix + "XmlSchemaCollectionOwningSchema (7)"); -#endif } static int ClientVersion { diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandTest.cs index 50ad553ebe9..f9ab15d3472 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlCommandTest.cs @@ -33,13 +33,9 @@ using System; using System.Data; using System.Data.Common; using System.Data.SqlClient; -#if NET_2_0 using System.Data.Sql; -#endif using System.Globalization; -#if NET_2_0 using System.Xml; -#endif using NUnit.Framework; @@ -100,10 +96,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (connA, cmd.Connection, "#A4"); Assert.IsNull (cmd.Container, "#A5"); Assert.IsTrue (cmd.DesignTimeVisible, "#A6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#A7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8"); -#endif Assert.IsNotNull (cmd.Parameters, "#A9"); Assert.AreEqual (0, cmd.Parameters.Count, "#A10"); Assert.IsNull (cmd.Site, "#A11"); @@ -132,10 +126,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (connA, cmd.Connection, "#B4"); Assert.IsNull (cmd.Container, "#B5"); Assert.IsTrue (cmd.DesignTimeVisible, "#B6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#B7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8"); -#endif Assert.IsNotNull (cmd.Parameters, "#B9"); Assert.AreEqual (0, cmd.Parameters.Count, "#B10"); Assert.IsNull (cmd.Site, "#B11"); @@ -291,11 +283,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); Assert.IsNotNull (ex.Message, "#A4"); -#if NET_2_0 Assert.IsTrue (ex.Message.StartsWith ("ExecuteScalar"), "#A5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.StartsWith ("ExecuteReader"), "#A5:" + ex.Message); -#endif } cmd.CommandText = string.Empty; @@ -309,11 +297,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); -#if NET_2_0 Assert.IsTrue (ex.Message.StartsWith ("ExecuteScalar"), "#B5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.StartsWith ("ExecuteReader"), "#B5:" + ex.Message); -#endif } cmd.CommandText = null; @@ -327,11 +311,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2"); Assert.IsNull (ex.InnerException, "#C3"); Assert.IsNotNull (ex.Message, "#C4"); -#if NET_2_0 Assert.IsTrue (ex.Message.StartsWith ("ExecuteScalar"), "#C5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.StartsWith ("ExecuteReader"), "#C5:" + ex.Message); -#endif } } @@ -357,11 +337,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("ExecuteScalar") != -1, "#5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.IndexOf ("Execute") != -1, "#5:" + ex.Message); -#endif } } } @@ -465,11 +441,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.StartsWith ("ExecuteScalar:"), "#5"); -#else - Assert.IsTrue (ex.Message.StartsWith ("ExecuteReader:"), "#5"); -#endif } finally { trans.Dispose (); } @@ -581,11 +553,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("ExecuteNonQuery") != -1, "#5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.IndexOf ("Execute") != -1, "#5:" + ex.Message); -#endif } } } @@ -811,11 +779,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("ExecuteReader") != -1, "#5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.IndexOf ("Execute") != -1, "#5:" + ex.Message); -#endif } } } @@ -980,11 +944,7 @@ namespace MonoTests.System.Data.SqlClient // Test InvalidOperation Exception is thrown if Parameter Type // is not explicitly set -#if NET_2_0 cmd.Parameters.AddWithValue ("@ID", 2); -#else - cmd.Parameters.Add ("@ID", 2); -#endif try { cmd.Prepare (); Assert.Fail ("#A1"); @@ -1061,11 +1021,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("Prepare") != -1, "#5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.IndexOf ("Execute") != -1, "#5:" + ex.Message); -#endif } // Text, parameters cleared @@ -1161,15 +1117,11 @@ namespace MonoTests.System.Data.SqlClient // Text, without parameters cmd = new SqlCommand ("select count(*) from whatever"); cmd.Transaction = trans; -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#A1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif // Text, with parameters cmd = new SqlCommand ("select count(*) from whatever"); @@ -1178,63 +1130,40 @@ namespace MonoTests.System.Data.SqlClient try { cmd.Prepare (); Assert.Fail ("#B1"); -#if NET_2_0 } catch (NullReferenceException) { } -#else - } catch (InvalidOperationException ex) { - // Prepare: Connection property has not been - // initialized - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsTrue (ex.Message.StartsWith ("Prepare:"), "#B5"); - } -#endif // Text, parameters cleared cmd = new SqlCommand ("select count(*) from whatever"); cmd.Parameters.Add ("@TestPar1", SqlDbType.Int); cmd.Parameters.Clear (); cmd.Transaction = trans; -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#C1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif // StoredProcedure, without parameters cmd = new SqlCommand ("FindCustomer"); cmd.CommandType = CommandType.StoredProcedure; cmd.Transaction = trans; -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#D1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif // StoredProcedure, with parameters cmd = new SqlCommand ("FindCustomer"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add ("@TestPar1", SqlDbType.Int); cmd.Transaction = trans; -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#E1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif } [Test] // bug #412576 @@ -1307,65 +1236,17 @@ namespace MonoTests.System.Data.SqlClient SqlCommand cmdB = new SqlCommand ("select @@version", connA, trans); using (SqlDataReader reader = cmdB.ExecuteReader ()) { -#if NET_2_0 cmdA.Connection = connA; Assert.AreSame (connA, cmdA.Connection, "#A1"); Assert.AreSame (trans, cmdA.Transaction, "#A2"); -#else - try { - cmdA.Connection = connA; - Assert.Fail ("#A1"); - } catch (InvalidOperationException ex) { - // The SqlCommand is currently busy - // Open, Fetching - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - - Assert.AreSame (connA, cmdA.Connection, "#A5"); - Assert.AreSame (trans, cmdA.Transaction, "#A6"); - } -#endif -#if NET_2_0 cmdA.Connection = connB; Assert.AreSame (connB, cmdA.Connection, "#B1"); Assert.AreSame (trans, cmdA.Transaction, "#B2"); -#else - try { - cmdA.Connection = connB; - Assert.Fail ("#B1"); - } catch (InvalidOperationException ex) { - // The SqlCommand is currently busy - // Open, Fetching - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - - Assert.AreSame (connA, cmdA.Connection, "#B5"); - Assert.AreSame (trans, cmdA.Transaction, "#B6"); - } -#endif -#if NET_2_0 cmdA.Connection = null; Assert.IsNull (cmdA.Connection, "#C1"); Assert.AreSame (trans, cmdA.Transaction, "#C2"); -#else - try { - cmdA.Connection = null; - Assert.Fail ("#C1"); - } catch (InvalidOperationException ex) { - // The SqlCommand is currently busy - // Open, Fetching - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2"); - Assert.IsNull (ex.InnerException, "#C3"); - Assert.IsNotNull (ex.Message, "#C4"); - - Assert.AreSame (connA, cmdA.Connection, "#C5"); - Assert.AreSame (trans, cmdA.Transaction, "#C6"); - } -#endif } } finally { if (trans != null) @@ -1441,59 +1322,14 @@ namespace MonoTests.System.Data.SqlClient SqlCommand cmdB = new SqlCommand ("select * from employee", connA, transA); using (SqlDataReader reader = cmdB.ExecuteReader ()) { -#if NET_2_0 cmdA.Transaction = transA; Assert.AreSame (transA, cmdA.Transaction, "#A1"); -#else - try { - cmdA.Transaction = transA; - Assert.Fail ("#A1"); - } catch (InvalidOperationException ex) { - // The SqlCommand is currently busy - // Open, Fetching - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - - Assert.AreSame (transA, cmdA.Transaction, "#A5"); - } -#endif -#if NET_2_0 cmdA.Transaction = transB; Assert.AreSame (transB, cmdA.Transaction, "#B1"); -#else - try { - cmdA.Transaction = transB; - Assert.Fail ("#B1"); - } catch (InvalidOperationException ex) { - // The SqlCommand is currently busy - // Open, Fetching - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - - Assert.AreSame (transA, cmdA.Transaction, "#B5"); - } -#endif -#if NET_2_0 cmdA.Transaction = null; Assert.IsNull (cmdA.Transaction, "#C1"); -#else - try { - cmdA.Transaction = null; - Assert.Fail ("#C1"); - } catch (InvalidOperationException ex) { - // The SqlCommand is currently busy - // Open, Fetching - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#C2"); - Assert.IsNull (ex.InnerException, "#C3"); - Assert.IsNotNull (ex.Message, "#C4"); - - Assert.AreSame (transA, cmdA.Transaction, "#C5"); - } -#endif } cmdA.Transaction = transA; @@ -1591,7 +1427,6 @@ namespace MonoTests.System.Data.SqlClient idParam = cmd.Parameters.Add ("id", SqlDbType.Int); idParam.Direction = ParameterDirection.ReturnValue; -#if NET_2_0 Assert.AreEqual (1, cmd.ExecuteNonQuery (), "#B1"); cmd.Dispose (); @@ -1611,30 +1446,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsFalse (dr.Read (), "#B9"); cmd.Dispose (); dr.Close (); -#else - try { - cmd.ExecuteNonQuery (); - Assert.Fail ("#B1"); - } catch (SqlException ex) { - Assert.AreEqual (typeof (SqlException), ex.GetType (), "#B2"); - Assert.AreEqual ((byte) 16, ex.Class, "#B3"); - Assert.IsNull (ex.InnerException, "#B4"); - Assert.IsNotNull (ex.Message, "#B5"); - Assert.IsTrue (ex.Message.IndexOf ("#sp_temp_insert_employee") != -1, "#B6:"+ ex.Message); - if (ClientVersion == 7) { - // fname is not a parameter for procedure #sp_temp_insert_employee - Assert.IsTrue (ex.Message.IndexOf ("fname") != -1, "#B7: " + ex.Message); - Assert.AreEqual (8145, ex.Number, "#B8"); - Assert.AreEqual ((byte) 2, ex.State, "#B9"); - } else { - // Procedure or Function '#sp_temp_insert_employee' expects - // parameter '@fname', which was not supplied - Assert.IsTrue (ex.Message.IndexOf ("'@fname'") != -1, "#B7: " + ex.Message); - Assert.AreEqual (201, ex.Number, "#B8"); - Assert.AreEqual ((byte) 4, ex.State, "#B9"); - } - } -#endif } finally { if (cmd != null) cmd.Dispose (); @@ -2557,33 +2368,10 @@ namespace MonoTests.System.Data.SqlClient newId.Direction = ParameterDirection.Output; id = cmd.Parameters.Add ("Id", SqlDbType.Int); id.Value = 6; -#if NET_2_0 cmd.ExecuteNonQuery (); Assert.AreEqual (8, newId.Value, "#B1"); Assert.AreEqual (6, id.Value, "#B2"); -#else - try { - cmd.ExecuteNonQuery (); - Assert.Fail ("#B1"); - } catch (SqlException ex) { - // Incorrect syntax near 'NewId'. - // Must declare the scalar variable "@Id" - Assert.AreEqual (typeof (SqlException), ex.GetType (), "#B2"); - Assert.AreEqual ((byte) 15, ex.Class, "#B3"); - Assert.IsNull (ex.InnerException, "#B4"); - Assert.IsNotNull (ex.Message, "#B5"); - Assert.IsTrue (ex.Message.IndexOf ("'NewId'") != -1, "#B6: " + ex.Message); - if (ClientVersion == 7) { - Assert.IsTrue (ex.Message.IndexOf ("'@Id'") != -1, "#B7: " + ex.Message); - Assert.AreEqual (170, ex.Number, "#B8"); - } else { - Assert.IsTrue (ex.Message.IndexOf ("\"@Id\"") != -1, "#B7: " + ex.Message); - Assert.AreEqual (102, ex.Number, "#B8"); - } - Assert.AreEqual ((byte) 1, ex.State, "#B9"); - } -#endif } [Test] @@ -2615,15 +2403,9 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (OverflowException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf (string.Format ( CultureInfo.InvariantCulture, "'{0}'", overflow)) != -1, "#5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.IndexOf (string.Format ( - CultureInfo.CurrentCulture, "'{0}'", - overflow)) != -1, "#5:" + ex.Message); -#endif Assert.IsTrue (ex.Message.IndexOf (string.Format ( CultureInfo.InvariantCulture, "{0:N4}", SMALLMONEY_MIN)) != -1, "#6:" + ex.Message); @@ -2666,15 +2448,9 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (OverflowException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf (string.Format ( CultureInfo.InvariantCulture, "'{0}'", overflow)) != -1, "#5:" + ex.Message); -#else - Assert.IsTrue (ex.Message.IndexOf (string.Format ( - CultureInfo.CurrentCulture, "'{0}'", - overflow)) != -1, "#5:" + ex.Message); -#endif Assert.IsTrue (ex.Message.IndexOf (string.Format ( CultureInfo.InvariantCulture, "{0:N4}", SMALLMONEY_MIN)) != -1, "#6:" + ex.Message); @@ -2688,7 +2464,6 @@ namespace MonoTests.System.Data.SqlClient } } -#if NET_2_0 [Test] public void NotificationTest () { @@ -2753,7 +2528,6 @@ namespace MonoTests.System.Data.SqlClient ConnectionManager.Singleton.CloseConnection (); } } -#endif [Test] public void SqlCommandDisposeTest () diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs index 6ed19574fe8..e897d9e1fab 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 #region Using directives @@ -182,4 +181,3 @@ namespace MonoTests.System.Data.Common } } -#endif // NET_2_0 diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionTest.cs index bb0e38cd421..224d461d981 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlConnectionTest.cs @@ -60,9 +60,7 @@ namespace MonoTests.System.Data { if (conn != null) conn.Dispose (); -#if NET_2_0 SqlConnection.ClearAllPools (); -#endif } [Test] @@ -214,11 +212,7 @@ namespace MonoTests.System.Data Assert.AreEqual ((byte) 20, ex.Class, "#3"); Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); -#if NET_2_0 Assert.AreEqual (53, ex.Number, "#6"); -#else - Assert.AreEqual (17, ex.Number, "#6"); -#endif Assert.AreEqual ((byte) 0, ex.State, "#7"); } finally { conn.Close (); @@ -370,16 +364,13 @@ namespace MonoTests.System.Data [Test] // bug #412581 public void ChangeDatabase_DatabaseName_Whitespace () { -#if NET_2_0 Assert.Ignore ("bug #412581"); -#endif conn = new SqlConnection (connectionString); conn.Open (); try { conn.ChangeDatabase (" "); Assert.Fail ("#1"); -#if NET_2_0 } catch (SqlException ex) { // Could not locate entry in sysdatabases for // database ' '. No entry found with that name. @@ -392,19 +383,8 @@ namespace MonoTests.System.Data Assert.AreEqual (911, ex.Number, "#7"); Assert.AreEqual ((byte) 1, ex.State, "#8"); } -#else - } catch (ArgumentException ex) { - // Database cannot be null, the empty string, - // or string of only whitespace - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNull (ex.ParamName); - } -#endif } -#if NET_2_0 [Test] public void ClearAllPools () { @@ -555,7 +535,6 @@ namespace MonoTests.System.Data conn4.Close (); } -#endif [Test] public void InterfaceTransactionTest () @@ -635,11 +614,7 @@ namespace MonoTests.System.Data conn.ConnectionString = string.Empty; Assert.AreEqual (string.Empty, conn.DataSource, "#C1"); Assert.AreEqual ("", conn.Database, "#C2"); -#if NET_2_0 Assert.AreEqual (8000, conn.PacketSize, "#C3"); -#else - Assert.AreEqual (8192, conn.PacketSize, "#C3"); -#endif Assert.AreEqual (15, conn.ConnectionTimeout, "#C4"); Assert.IsTrue (string.Compare (conn.WorkstationId, Environment.MachineName, true) == 0, "#C5"); } @@ -747,11 +722,7 @@ namespace MonoTests.System.Data Assert.AreEqual (15, conn.ConnectionTimeout, "#A3"); Assert.AreEqual (string.Empty, conn.Database, "#A4"); Assert.AreEqual (string.Empty, conn.DataSource, "#A5"); -#if NET_2_0 Assert.AreEqual (8000, conn.PacketSize, "#A6"); -#else - Assert.AreEqual (8192, conn.PacketSize, "#A6"); -#endif Assert.AreEqual (ConnectionState.Closed, conn.State, "#A7"); Assert.IsTrue (string.Compare (conn.WorkstationId, Environment.MachineName, true) == 0, "#A8"); Assert.AreEqual (2, events.Count, "#A9"); @@ -786,7 +757,6 @@ namespace MonoTests.System.Data events.Add (e); } -#if NET_2_0 [Test] public void FireInfoMessageEventOnUserErrorsTest () { @@ -828,7 +798,6 @@ namespace MonoTests.System.Data return connection_count; } -#endif int ClientVersion { get { @@ -837,7 +806,6 @@ namespace MonoTests.System.Data } } -#if NET_2_0 [TestFixture] [Category ("sqlserver")] public class GetSchemaTest @@ -1440,5 +1408,4 @@ namespace MonoTests.System.Data conn.GetSchema ("Mono", restrictions); } } -#endif } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataAdapterTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataAdapterTest.cs index 912ee6484ef..02f13921c89 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataAdapterTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataAdapterTest.cs @@ -631,21 +631,15 @@ namespace MonoTests.System.Data.SqlClient // System.OverflowException: Value was either too large or too // small for an Int16 Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); -#if NET_2_0 Assert.IsNotNull (ex.InnerException, "#A3"); -#else - Assert.IsNull (ex.InnerException, "#A3"); -#endif Assert.IsNotNull (ex.Message, "#A4"); Assert.IsNull (ex.ParamName, "#A5"); -#if NET_2_0 OverflowException inner = ex.InnerException as OverflowException; Assert.IsNotNull (inner, "#A6"); Assert.AreEqual (typeof (OverflowException), inner.GetType (), "#A7"); Assert.IsNull (inner.InnerException, "#A8"); Assert.IsNotNull (inner.Message, "#A9"); -#endif } Assert.AreEqual (0, ds.Tables [0].Rows.Count, "#A10"); @@ -659,21 +653,15 @@ namespace MonoTests.System.Data.SqlClient // System.OverflowException: Value was either too large or too // small for an Int16 Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); -#if NET_2_0 Assert.IsNotNull (ex.InnerException, "#B3"); -#else - Assert.IsNull (ex.InnerException, "#B3"); -#endif Assert.IsNotNull (ex.Message, "#B4"); Assert.IsNull (ex.ParamName, "#B5"); -#if NET_2_0 OverflowException inner = ex.InnerException as OverflowException; Assert.IsNotNull (inner, "#B6"); Assert.AreEqual (typeof (OverflowException), inner.GetType (), "#B7"); Assert.IsNull (inner.InnerException, "#B8"); Assert.IsNotNull (inner.Message, "#B9"); -#endif } Assert.AreEqual (0, ds.Tables [0].Rows.Count, "#B10"); @@ -838,15 +826,9 @@ namespace MonoTests.System.Data.SqlClient try { adapter.MissingSchemaAction = (MissingSchemaAction)(-5000); Assert.Fail ("#10 Exception shud be thrown: Invalid Value"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#11"); } -#else - } catch (ArgumentException ex) { - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#11"); - } -#endif // Tests if Data is filled correctly if schema is defined // manually and MissingSchemaAction.Error is set @@ -894,16 +876,10 @@ namespace MonoTests.System.Data.SqlClient try { adapter.MissingMappingAction = (MissingMappingAction)(-5000); Assert.Fail ("#7 Exception shud be thrown : Invalid Value"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#8"); } -#else - } catch (ArgumentException ex) { - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#8"); - } -#endif // Test if mapping the column and table names works correctly adapter.MissingMappingAction = MissingMappingAction.Error; @@ -1088,7 +1064,6 @@ namespace MonoTests.System.Data.SqlClient } } -#if NET_2_0 [Test] public void UpdateBatchSizeTest () { @@ -1105,7 +1080,6 @@ namespace MonoTests.System.Data.SqlClient adapter = new SqlDataAdapter(); adapter.UpdateBatchSize = -2; } -#endif int ClientVersion { get { @@ -1114,7 +1088,6 @@ namespace MonoTests.System.Data.SqlClient } } -#if NET_2_0 [TestFixture] [Category ("sqlserver")] public class SqlDataAdapterInheritTest : DbDataAdapter @@ -1140,5 +1113,4 @@ namespace MonoTests.System.Data.SqlClient } } } -#endif } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataReaderTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataReaderTest.cs index 9163be1ae86..acf325e7002 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataReaderTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlDataReaderTest.cs @@ -541,25 +541,12 @@ namespace MonoTests.System.Data.SqlClient cmd.CommandText += "from string_family where id=1"; reader = cmd.ExecuteReader (); reader.Read (); -#if NET_2_0 try { long totalsize = reader.GetBytes (0, 0, null, 0, 0); Assert.AreEqual (4, totalsize, "#1"); } finally { reader.Close (); } -#else - try { - reader.GetBytes (0, 0, null, 0, 0); - Assert.Fail ("#1"); - } catch (InvalidCastException ex) { - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.AreEqual ((new InvalidCastException ()).Message, ex.Message, "#4"); - } finally { - reader.Close (); - } -#endif byte[] asciiArray = (new ASCIIEncoding ()).GetBytes ("text"); byte[] unicodeArray = (new UnicodeEncoding ()).GetBytes ("nt\u092d\u093ext"); @@ -585,7 +572,6 @@ namespace MonoTests.System.Data.SqlClient // Test if msdotnet behavior s followed when null value // is read using GetBytes -#if NET_2_0 try { reader.GetBytes (2, 0, null, 0, 0); Assert.Fail ("#7"); @@ -597,10 +583,6 @@ namespace MonoTests.System.Data.SqlClient Assert.Fail ("#8"); } catch (SqlNullValueException) { } -#else - Assert.AreEqual (0, reader.GetBytes (2, 0, null, 0, 0), "#7"); - Assert.AreEqual (0, reader.GetBytes (2, 0, buffer, 0, 10), "#8"); -#endif reader.Close (); // do i need to test for image/binary values also ??? } @@ -665,7 +647,6 @@ namespace MonoTests.System.Data.SqlClient using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SingleResult)) { Assert.IsTrue (reader.Read ()); -#if NET_2_0 try { reader.GetBytes (0, -1L, null, 0, 0); Assert.Fail ("#C1"); @@ -690,21 +671,12 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNotNull (ex.Message, "#D4"); Assert.IsTrue (ex.Message.IndexOf ("'dataIndex'") != -1, "#D5:" + ex.Message); } -#else - long totalsize = reader.GetBytes (0, -1L, null, 0, 0); - Assert.AreEqual (5, totalsize, "#C"); - - byte [] val = new byte [totalsize]; - long read = reader.GetBytes (0, -1L, val, 0, 3); - Assert.AreEqual (0, read, "#D"); -#endif } using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SingleResult)) { Assert.IsTrue (reader.Read ()); byte [] val = new byte [5]; -#if NET_2_0 try { reader.GetBytes (0, -1L, val, 0, 3); Assert.Fail ("#E1"); @@ -716,10 +688,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNotNull (ex.Message, "#E4"); Assert.IsTrue (ex.Message.IndexOf ("'dataIndex'") != -1, "#E5:" + ex.Message); } -#else - long read = reader.GetBytes (0, -1L, val, 0, 3); - Assert.AreEqual (0, read, "#E"); -#endif } using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SequentialAccess)) { @@ -732,7 +700,6 @@ namespace MonoTests.System.Data.SqlClient using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SingleResult)) { Assert.IsTrue (reader.Read ()); -#if NET_2_0 try { reader.GetBytes (0, -1L, null, 4, 8); Assert.Fail ("#G1"); @@ -744,10 +711,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNotNull (ex.Message, "#G4"); Assert.IsTrue (ex.Message.IndexOf ("'dataIndex'") != -1, "#G5:" + ex.Message); } -#else - long totalsize = reader.GetBytes (0, -1L, null, 4, 8); - Assert.AreEqual (5, totalsize, "#G"); -#endif } } finally { ConnectionManager.Singleton.CloseConnection (); @@ -797,7 +760,6 @@ namespace MonoTests.System.Data.SqlClient try { reader.GetBytes (0, 0, val, 0, (int) totalsize); Assert.Fail ("#A1"); -#if NET_2_0 } catch (IndexOutOfRangeException ex) { // Buffer offset '0' plus the bytes available // '275' is greater than the length of the @@ -808,17 +770,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#A5:" + ex.Message); Assert.IsTrue (ex.Message.IndexOf ("'" + totalsize + "'") != -1, "#A6:" + ex.Message); } -#else - } catch (ArgumentException ex) { - // Destination array was not long enough. - // Check destIndex and length, and the - // array's lower bounds - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsNull (ex.ParamName, "#A5"); - } -#endif } using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SingleResult | CommandBehavior.SequentialAccess)) { @@ -830,7 +781,6 @@ namespace MonoTests.System.Data.SqlClient try { reader.GetBytes (0, 0, val, 1, (int) totalsize); Assert.Fail ("#B1"); -#if NET_2_0 } catch (IndexOutOfRangeException ex) { // Buffer offset '1' plus the bytes available // '275' is greater than the length of the @@ -841,17 +791,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsTrue (ex.Message.IndexOf ("'1'") != -1, "#B5:" + ex.Message); Assert.IsTrue (ex.Message.IndexOf ("'" + totalsize + "'") != -1, "#B6:" + ex.Message); } -#else - } catch (ArgumentException ex) { - // Destination array was not long enough. - // Check destIndex and length, and the - // array's lower bounds - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsNull (ex.ParamName, "#B5"); - } -#endif } using (IDataReader reader = cmd.ExecuteReader (CommandBehavior.SingleResult | CommandBehavior.SequentialAccess)) { @@ -860,7 +799,6 @@ namespace MonoTests.System.Data.SqlClient long totalsize = reader.GetBytes (0, 0, null, 0, 0); byte [] val = new byte [totalsize]; -#if NET_2_0 try { reader.GetBytes (0, 0, val, 0, (int) (totalsize + 1)); Assert.Fail ("#C1"); @@ -874,10 +812,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#C5:" + ex.Message); Assert.IsTrue (ex.Message.IndexOf ("'" + (totalsize + 1) + "'") != -1, "#C6:" + ex.Message); } -#else - long ret = reader.GetBytes (0, 0, val, 0, (int) (totalsize + 1)); - Assert.AreEqual (totalsize, ret, "#C1"); -#endif } } @@ -1104,16 +1038,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (expected, buffer, "#C4"); Assert.IsTrue (reader.Read (), "#D1"); -#if NET_2_0 try { reader.GetBytes (0, 0, null, 0, 0); Assert.Fail ("#D2"); } catch (SqlNullValueException) { } -#else - len = reader.GetBytes (0, 0, null, 0, 0); - Assert.AreEqual (0, len, "#D2"); -#endif } using (IDataReader reader = cmd.ExecuteReader ()) { @@ -1121,69 +1050,35 @@ namespace MonoTests.System.Data.SqlClient 0x74 }; Assert.IsTrue (reader.Read (), "#E1"); -#if NET_2_0 len = reader.GetBytes (0, 0, null, 0, 0); Assert.AreEqual (4, len, "#E2"); buffer = new byte [len]; len = reader.GetBytes (0, 0, buffer, 0, (int) len); Assert.AreEqual (4, len, "#E3"); Assert.AreEqual (expected, buffer, "#E4"); -#else - try { - reader.GetBytes (0, 0, null, 0, 0); - Assert.Fail ("#E2"); - } catch (InvalidCastException ex) { - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#E3"); - Assert.IsNull (ex.InnerException, "#E4"); - Assert.AreEqual ((new InvalidCastException ()).Message, ex.Message, "#E5"); - } -#endif expected = new byte [] { 0x00, 0x00, 0x6f, 0x6e, 0x67, 0x00 }; Assert.IsTrue (reader.Read (), "#F1"); -#if NET_2_0 len = reader.GetBytes (0, 0, null, 0, 0); Assert.AreEqual (270, len, "#F2"); buffer = new byte [6]; len = reader.GetBytes (0, 1, buffer, 2, 3); Assert.AreEqual (3, len, "#F3"); Assert.AreEqual (expected, buffer, "#F4"); -#else - try { - reader.GetBytes (0, 0, null, 0, 0); - Assert.Fail ("#F2"); - } catch (InvalidCastException ex) { - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#F3"); - Assert.IsNull (ex.InnerException, "#F4"); - Assert.AreEqual ((new InvalidCastException ()).Message, ex.Message, "#F5"); - } -#endif expected = new byte [0]; Assert.IsTrue (reader.Read (), "#G1"); -#if NET_2_0 len = reader.GetBytes (0, 0, null, 0, 0); Assert.AreEqual (0, len, "#G2"); buffer = new byte [len]; len = reader.GetBytes (0, 0, buffer, 0, 0); Assert.AreEqual (0, len, "#G3"); Assert.AreEqual (expected, buffer, "#G4"); -#else - try { - reader.GetBytes (0, 0, null, 0, 0); - Assert.Fail ("#G2"); - } catch (InvalidCastException ex) { - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#G3"); - Assert.IsNull (ex.InnerException, "#G4"); - Assert.AreEqual ((new InvalidCastException ()).Message, ex.Message, "#G5"); - } -#endif Assert.IsTrue (reader.Read (), "#H1"); -#if NET_2_0 try { reader.GetBytes (0, 0, new byte [0], 0, 0); Assert.Fail ("#H2"); @@ -1194,16 +1089,6 @@ namespace MonoTests.System.Data.SqlClient Assert.Fail ("#H3"); } catch (NullReferenceException) { } -#else - try { - reader.GetBytes (0, 0, null, 0, 3); - Assert.Fail ("#H2"); - } catch (InvalidCastException ex) { - Assert.AreEqual (typeof (InvalidCastException), ex.GetType (), "#H3"); - Assert.IsNull (ex.InnerException, "#H4"); - Assert.AreEqual ((new InvalidCastException ()).Message, ex.Message, "#H5"); - } -#endif } } @@ -2909,7 +2794,6 @@ namespace MonoTests.System.Data.SqlClient datetimeDataTable); } -#if NET_2_0 string connectionString = ConnectionManager.Singleton.ConnectionString; //FIXME : Add more test cases @@ -3133,7 +3017,6 @@ namespace MonoTests.System.Data.SqlClient } -#endif // NET_2_0 static void AssertSchemaTableStructure (DataTable schemaTable, string prefix) { @@ -3150,11 +3033,7 @@ namespace MonoTests.System.Data.SqlClient new object [] { "BaseColumnName", typeof (string) }, new object [] { "BaseSchemaName", typeof (string) }, new object [] { "BaseTableName", typeof (string) }, -#if NET_2_0 new object [] { "DataType", typeof (Type) }, -#else - new object [] { "DataType", typeof (object) }, -#endif new object [] { "AllowDBNull", typeof (bool) }, new object [] { "ProviderType", typeof (int) }, new object [] { "IsAliased", typeof (bool) }, @@ -3165,7 +3044,6 @@ namespace MonoTests.System.Data.SqlClient new object [] { "IsHidden", typeof (bool) }, new object [] { "IsLong", typeof (bool) }, new object [] { "IsReadOnly", typeof (bool) }, -#if NET_2_0 new object [] { "ProviderSpecificDataType", typeof (Type) }, new object [] { "DataTypeName", typeof (string) }, new object [] { "XmlSchemaCollectionDatabase", typeof (string) }, @@ -3174,7 +3052,6 @@ namespace MonoTests.System.Data.SqlClient new object [] { "UdtAssemblyQualifiedName", typeof (string) }, new object [] { "NonVersionedProviderType", typeof (int) }, new object [] { "IsColumnSet", typeof (bool) } -#endif }; Assert.AreEqual (columns.Length, schemaTable.Columns.Count, prefix); diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs index 8fd422a183e..8d18d5b1e70 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterCollectionTest.cs @@ -42,7 +42,6 @@ namespace MonoTests.System.Data.SqlClient public class SqlParameterCollectionTest { -#if NET_2_0 [Test] public void CopyToTest () { @@ -62,6 +61,5 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (null, destinationArray[3], "#6 The parameter at index 3 must not change"); } -#endif } } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterTest.cs index f521d3e369e..51c810a6aef 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlParameterTest.cs @@ -380,7 +380,6 @@ namespace MonoTests.System.Data.SqlClient cmd.ExecuteNonQuery (); Assert.Fail ("#B1"); } catch (FormatException ex) { -#if NET_2_0 // Failed to convert parameter value from a String to a Int32 Assert.AreEqual (typeof (FormatException), ex.GetType (), "#B2"); Assert.IsNotNull (ex.Message, "#B3"); @@ -393,12 +392,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (FormatException), inner.GetType (), "#B7"); Assert.IsNull (inner.InnerException, "#B8"); Assert.IsNotNull (inner.Message, "#B9"); -#else - // Input string was not in a correct format - Assert.AreEqual (typeof (FormatException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); -#endif } } diff --git a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlTransactionTest.cs b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlTransactionTest.cs index 9ec377f0e05..35f4d520883 100644 --- a/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlTransactionTest.cs +++ b/mcs/class/System.Data/Test/ProviderTests/System.Data.SqlClient/SqlTransactionTest.cs @@ -101,11 +101,7 @@ namespace MonoTests.System.Data.SqlClient // elapsed prior to completion of the // operation or the server is not responding Assert.AreEqual (typeof (SqlException), ex.GetType (), "#B2"); -#if NET_2_0 Assert.AreEqual ((byte) 11, ex.Class, "#B3"); -#else - Assert.AreEqual ((byte) 10, ex.Class, "#B3"); -#endif Assert.IsNull (ex.InnerException, "#B4"); Assert.IsNotNull (ex.Message, "#B5"); Assert.AreEqual (-2, ex.Number, "#B6"); @@ -1011,20 +1007,7 @@ namespace MonoTests.System.Data.SqlClient cmd.Dispose (); trans.Dispose (); -#if NET_2_0 trans.Rollback (); -#else - try { - trans.Rollback (); - Assert.Fail ("#A1"); - } catch (InvalidOperationException ex) { - // This SqlTransaction has completed; it is no - // longer usable - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - } -#endif cmd = new SqlCommand ("SELECT fname FROM employee WHERE id=6666", conn); using (SqlDataReader reader = cmd.ExecuteReader ()) { @@ -1399,10 +1382,8 @@ namespace MonoTests.System.Data.SqlClient [Test] // Rollback (String) public void Rollback2_Transaction_Disposed () { -#if NET_2_0 if (RunningOnMono) Assert.Ignore ("NotWorking"); -#endif try { conn = new SqlConnection (connectionString); diff --git a/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs index a8ff6acfa25..5aac0c0eeb6 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionAttributeTest.cs @@ -66,10 +66,8 @@ namespace MonoTests.System.Data.Common Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString");
Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior");
Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions");
-#if NET_2_0
Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString");
Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString");
-#endif
}
[Test]
@@ -142,7 +140,6 @@ namespace MonoTests.System.Data.Common try {
a.KeyRestrictionBehavior = (KeyRestrictionBehavior) 666;
Assert.Fail ("#1");
-#if NET_2_0
} catch (ArgumentOutOfRangeException ex) {
// The KeyRestrictionBehavior enumeration value, 666, is invalid
Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2");
@@ -153,17 +150,6 @@ namespace MonoTests.System.Data.Common Assert.IsNotNull (ex.ParamName, "#7");
Assert.AreEqual ("KeyRestrictionBehavior", ex.ParamName, "#8");
}
-#else
- } catch (ArgumentException ex) {
- // The KeyRestrictionBehavior enumeration value, 666, is invalid
- Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2");
- Assert.IsNull (ex.InnerException, "#3");
- Assert.IsNotNull (ex.Message, "#4");
- //Assert.IsTrue (ex.Message.IndexOf ("KeyRestrictionBehavior") != -1, "#5");
- //Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6");
- //Assert.IsNull (ex.ParamName, "#7");
- }
-#endif
}
[Test]
diff --git a/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionTest.cs index 93be5522a01..4a5fba96433 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Common/DBDataPermissionTest.cs @@ -37,24 +37,11 @@ namespace MonoTests.System.Data.Common { public class NonAbstractDBDataPermission : DBDataPermission { -#if !NET_2_0 - public NonAbstractDBDataPermission () - : base () - { - } - - public NonAbstractDBDataPermission (DBDataPermission permission, bool allowBlankPassword) - : base (permission) - { - AllowBlankPassword = allowBlankPassword; - } -#else // make Copy and CreateInstance work :) public NonAbstractDBDataPermission () : base (PermissionState.None) { } -#endif public NonAbstractDBDataPermission (PermissionState state) : base (state) { @@ -152,11 +139,7 @@ namespace MonoTests.System.Data.Common { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void Constructor_PermissionState_Invalid () { PermissionState ps = (PermissionState) Int32.MinValue; diff --git a/mcs/class/System.Data/Test/System.Data.Common/DataAdapterTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DataAdapterTest.cs index c0fbd3bd55b..4be0a30fbfa 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/DataAdapterTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Common/DataAdapterTest.cs @@ -51,7 +51,6 @@ namespace MonoTests.System.Data.Common Assert.IsTrue (da.AcceptChangesDuringFill, "#3"); } -#if NET_2_0 [Test] public void AcceptChangesDuringUpdate () { @@ -63,7 +62,6 @@ namespace MonoTests.System.Data.Common da.AcceptChangesDuringUpdate = true; Assert.IsTrue (da.AcceptChangesDuringUpdate, "#3"); } -#endif [Test] public void ContinueUpdateOnError () @@ -77,7 +75,6 @@ namespace MonoTests.System.Data.Common Assert.IsTrue (da.ContinueUpdateOnError, "#3"); } -#if NET_2_0 [Test] public void Fill_Direct () { @@ -124,7 +121,6 @@ namespace MonoTests.System.Data.Common Assert.AreEqual ("LoadOption", ex.ParamName, "#8"); } } -#endif [Test] public void MissingMappingAction_Valid () @@ -145,7 +141,6 @@ namespace MonoTests.System.Data.Common try { da.MissingMappingAction = (MissingMappingAction) 666; Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { // The MissingMappingAction enumeration value, 666, is invalid Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2"); @@ -156,17 +151,6 @@ namespace MonoTests.System.Data.Common Assert.IsNotNull (ex.ParamName, "#7"); Assert.AreEqual ("MissingMappingAction", ex.ParamName, "#8"); } -#else - } catch (ArgumentException ex) { - // The MissingMappingAction enumeration value, 666, is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("MissingMappingAction") != -1, "#5"); - Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6"); - Assert.IsNull (ex.ParamName, "#7"); - } -#endif } [Test] @@ -188,7 +172,6 @@ namespace MonoTests.System.Data.Common try { da.MissingSchemaAction = (MissingSchemaAction) 666; Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { // The MissingSchemaAction enumeration value, 666, is invalid Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2"); @@ -199,20 +182,8 @@ namespace MonoTests.System.Data.Common Assert.IsNotNull (ex.ParamName, "#7"); Assert.AreEqual ("MissingSchemaAction", ex.ParamName, "#8"); } -#else - } catch (ArgumentException ex) { - // The MissingSchemaAction enumeration value, 666, is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("MissingSchemaAction") != -1, "#5"); - Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#6"); - Assert.IsNull (ex.ParamName, "#7"); - } -#endif } -#if NET_2_0 [Test] public void ReturnProviderSpecificTypes () { @@ -224,7 +195,6 @@ namespace MonoTests.System.Data.Common da.ReturnProviderSpecificTypes = true; Assert.IsTrue (da.ReturnProviderSpecificTypes, "#3"); } -#endif } class MyAdapter : DataAdapter diff --git a/mcs/class/System.Data/Test/System.Data.Common/DbCommandBuilderTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DbCommandBuilderTest.cs index 37175f85a87..770f20c5679 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/DbCommandBuilderTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Common/DbCommandBuilderTest.cs @@ -25,7 +25,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data; using System.Data.Common; @@ -217,4 +216,3 @@ namespace MonoTests.System.Data.Common } } } -#endif // NET_2_0 diff --git a/mcs/class/System.Data/Test/System.Data.Common/DbConnectionStringBuilderTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DbConnectionStringBuilderTest.cs index a8ab475038e..0ff9d109c2c 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/DbConnectionStringBuilderTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Common/DbConnectionStringBuilderTest.cs @@ -29,7 +29,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 #region Using directives @@ -2420,4 +2419,3 @@ namespace MonoTests.System.Data.Common } } -#endif // NET_2_0 diff --git a/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs index a3f69974e06..401ed4bc7ff 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Common/DbDataAdapterTest.cs @@ -44,7 +44,6 @@ namespace MonoTests.System.Data.Common [TestFixture] public class DbDataAdapterTest { -#if NET_2_0 [Test] public void UpdateBatchSize () { @@ -260,7 +259,6 @@ sqliteDataAdapter.Update (dataSet, "Primus"); } #endif -#endif class MyAdapter : DbDataAdapter { @@ -290,7 +288,6 @@ sqliteDataAdapter.Update (dataSet, "Primus"); } #endif -#if NET_2_0 public new int AddToBatch (IDbCommand command) { return base.AddToBatch (command); @@ -325,7 +322,6 @@ sqliteDataAdapter.Update (dataSet, "Primus"); { base.TerminateBatching (); } -#endif } } } diff --git a/mcs/class/System.Data/Test/System.Data.Common/DbTransactionTest.cs b/mcs/class/System.Data/Test/System.Data.Common/DbTransactionTest.cs index 5e0a93cb7e4..6de727ac266 100644 --- a/mcs/class/System.Data/Test/System.Data.Common/DbTransactionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Common/DbTransactionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data; using System.Data.Common; @@ -100,4 +99,3 @@ namespace MonoTests.System.Data.Common } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandBuilderTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandBuilderTest.cs index be9a0ecda85..0e740c9d355 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandBuilderTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandBuilderTest.cs @@ -38,7 +38,6 @@ namespace MonoTests.System.Data.Odbc [TestFixture] public class OdbcCommandBuilderTest { -#if NET_2_0 [Test] public void CatalogLocationTest () { @@ -112,7 +111,6 @@ namespace MonoTests.System.Data.Odbc } Assert.AreEqual (ConflictOption.CompareRowVersion, cb.ConflictOption, "#8"); } -#endif [Test] public void QuotePrefix () @@ -148,7 +146,6 @@ namespace MonoTests.System.Data.Odbc Assert.AreEqual (" ", cb.QuoteSuffix, "#6"); } -#if NET_2_0 [Test] // QuoteIdentifier (String) public void QuoteIdentifier1 () { @@ -407,6 +404,5 @@ namespace MonoTests.System.Data.Odbc cb.SchemaSeparator = " "; Assert.AreEqual (" ", cb.SchemaSeparator, "#6"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs index 3082be210df..a766cdfff20 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcCommandTest.cs @@ -217,11 +217,7 @@ namespace MonoTests.System.Data.Odbc Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.AreEqual ("CommandTimeout", ex.ParamName, "#5"); -#else - Assert.IsNull (ex.ParamName, "#5"); -#endif } } @@ -232,7 +228,6 @@ namespace MonoTests.System.Data.Odbc try { cmd.CommandType = (CommandType) (666); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { // The CommandType enumeration value, 666, is invalid Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2"); @@ -241,16 +236,6 @@ namespace MonoTests.System.Data.Odbc Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#5:" + ex.Message); Assert.AreEqual ("CommandType", ex.ParamName, "#6"); } -#else - } catch (ArgumentException ex) { - // The CommandType enumeration value, 666, is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#5:" + ex.Message); - Assert.IsNull (ex.ParamName, "#6"); - } -#endif } [Test] @@ -270,11 +255,7 @@ namespace MonoTests.System.Data.Odbc cmd.Dispose (); -#if NET_2_0 Assert.AreEqual (string.Empty, cmd.CommandText, "CommandText"); -#else - Assert.AreEqual ("SELECT 'a'", cmd.CommandText, "CommandText"); -#endif Assert.AreEqual (67, cmd.CommandTimeout, "CommandTimeout"); Assert.AreEqual (CommandType.StoredProcedure, cmd.CommandType, "CommandType"); Assert.IsNull (cmd.Connection, "Connection"); @@ -431,7 +412,6 @@ namespace MonoTests.System.Data.Odbc try { cmd.UpdatedRowSource = (UpdateRowSource) 666; Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { // The UpdateRowSource enumeration value,666, // is invalid @@ -440,16 +420,6 @@ namespace MonoTests.System.Data.Odbc Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("UpdateRowSource", ex.ParamName, "#5"); } -#else - } catch (ArgumentException ex) { - // The UpdateRowSource enumeration value, 666, - // is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); - } -#endif } } } diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionStringBuilderTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionStringBuilderTest.cs index 8cc2093a3d3..ba1a851dc0b 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionStringBuilderTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionStringBuilderTest.cs @@ -29,7 +29,6 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. -#if NET_2_0 using System; using System.Collections; using System.Data; @@ -832,4 +831,3 @@ namespace MonoTests.System.Data.Odbc } } } -#endif // NET_2_0 using diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionTest.cs index 5736d07cebf..66f2332210a 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcConnectionTest.cs @@ -128,7 +128,6 @@ namespace MonoTests.System.Data.Odbc Assert.AreEqual (string.Empty, cn.ConnectionString, "#4"); } -#if NET_2_0 [Test] public void GetSchema_Connection_Closed () { @@ -204,7 +203,6 @@ namespace MonoTests.System.Data.Odbc Assert.IsNotNull (ex.Message, "#G4"); } } -#endif [Test] public void ServerVersion_Connection_Closed () diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataAdapterTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataAdapterTest.cs index 34c7c7bbccc..40055d72dad 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataAdapterTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcDataAdapterTest.cs @@ -43,28 +43,20 @@ namespace MonoTests.System.Data.Odbc { OdbcDataAdapter da = new OdbcDataAdapter (); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -74,29 +66,21 @@ namespace MonoTests.System.Data.Odbc OdbcCommand cmd = new OdbcCommand (); OdbcDataAdapter da = new OdbcDataAdapter (cmd); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (cmd, da.SelectCommand, "#12"); Assert.IsNull (da.Site, "#13"); Assert.IsNotNull (da.TableMappings, "#14"); Assert.AreEqual (0, da.TableMappings.Count, "#15"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#16"); -#endif Assert.IsNull (da.UpdateCommand, "#17"); } @@ -105,28 +89,20 @@ namespace MonoTests.System.Data.Odbc { OdbcDataAdapter da = new OdbcDataAdapter ((OdbcCommand) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -139,30 +115,22 @@ namespace MonoTests.System.Data.Odbc OdbcDataAdapter da = new OdbcDataAdapter (selectCommandText, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.AreSame (selectConnection, da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -174,21 +142,15 @@ namespace MonoTests.System.Data.Odbc OdbcDataAdapter da = new OdbcDataAdapter ((string) null, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -196,9 +158,7 @@ namespace MonoTests.System.Data.Odbc Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -210,30 +170,22 @@ namespace MonoTests.System.Data.Odbc OdbcDataAdapter da = new OdbcDataAdapter (selectCommandText, (OdbcConnection) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNull (da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -246,21 +198,15 @@ namespace MonoTests.System.Data.Odbc OdbcDataAdapter da = new OdbcDataAdapter (selectCommandText, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#13"); @@ -268,9 +214,7 @@ namespace MonoTests.System.Data.Odbc Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -282,21 +226,15 @@ namespace MonoTests.System.Data.Odbc OdbcDataAdapter da = new OdbcDataAdapter ((string) null, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -305,9 +243,7 @@ namespace MonoTests.System.Data.Odbc Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } @@ -319,21 +255,15 @@ namespace MonoTests.System.Data.Odbc OdbcDataAdapter da = new OdbcDataAdapter (selectCommandText, (string) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#14"); @@ -341,9 +271,7 @@ namespace MonoTests.System.Data.Odbc Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } @@ -482,7 +410,6 @@ namespace MonoTests.System.Data.Odbc } } -#if NET_2_0 [Test] public void UpdateBatchSize () { @@ -520,7 +447,6 @@ namespace MonoTests.System.Data.Odbc Assert.IsNotNull (ex.Message, "#D4"); } } -#endif [Test] public void UpdateCommand () diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs index 1dd86aa3e16..45ee486ce72 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcMetaDataCollectionNamesTest.cs @@ -29,7 +29,6 @@ using System.Data.Odbc; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System.Data.Odbc { [TestFixture] @@ -48,4 +47,3 @@ namespace MonoTests.System.Data.Odbc } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionAttributeTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionAttributeTest.cs index 0d3b6abcd77..d8f5c5368da 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionAttributeTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionAttributeTest.cs @@ -49,10 +49,8 @@ namespace MonoTests.System.Data.Odbc { Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString");
Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior");
Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions");
-#if NET_2_0
Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString");
Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString");
-#endif
OdbcPermission odbcp = (OdbcPermission)a.CreatePermission ();
Assert.IsFalse (odbcp.IsUnrestricted (), "IsUnrestricted");
}
@@ -138,11 +136,7 @@ namespace MonoTests.System.Data.Odbc { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void KeyRestrictionBehavior_Invalid ()
{
OdbcPermissionAttribute a = new OdbcPermissionAttribute (SecurityAction.Assert);
diff --git a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionTest.cs b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionTest.cs index 4d23485d72f..453d171e5ad 100644 --- a/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Odbc/OdbcPermissionTest.cs @@ -52,11 +52,7 @@ namespace MonoTests.System.Data.Odbc { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void PermissionState_Invalid () { PermissionState ps = (PermissionState)Int32.MinValue; diff --git a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbConnectionTest.cs b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbConnectionTest.cs index 601ea7a23dc..4d2b0c4099b 100644 --- a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbConnectionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbConnectionTest.cs @@ -128,7 +128,6 @@ namespace MonoTests.System.Data.OleDb Assert.AreEqual (string.Empty, cn.ConnectionString, "#4"); } -#if NET_2_0 [Test] public void GetSchema_Connection_Closed () { @@ -204,7 +203,6 @@ namespace MonoTests.System.Data.OleDb Assert.IsNotNull (ex.Message, "#G4"); } } -#endif [Test] public void ServerVersion_Connection_Closed () diff --git a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbDataAdapterTest.cs b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbDataAdapterTest.cs index c6981a82a4f..3c906222d7d 100644 --- a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbDataAdapterTest.cs +++ b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbDataAdapterTest.cs @@ -43,28 +43,20 @@ namespace MonoTests.System.Data.OleDb { OleDbDataAdapter da = new OleDbDataAdapter (); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -74,29 +66,21 @@ namespace MonoTests.System.Data.OleDb OleDbCommand cmd = new OleDbCommand (); OleDbDataAdapter da = new OleDbDataAdapter (cmd); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (cmd, da.SelectCommand, "#12"); Assert.IsNull (da.Site, "#13"); Assert.IsNotNull (da.TableMappings, "#14"); Assert.AreEqual (0, da.TableMappings.Count, "#15"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#16"); -#endif Assert.IsNull (da.UpdateCommand, "#17"); } @@ -105,28 +89,20 @@ namespace MonoTests.System.Data.OleDb { OleDbDataAdapter da = new OleDbDataAdapter ((OleDbCommand) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -139,30 +115,22 @@ namespace MonoTests.System.Data.OleDb OleDbDataAdapter da = new OleDbDataAdapter (selectCommandText, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.AreSame (selectConnection, da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -174,21 +142,15 @@ namespace MonoTests.System.Data.OleDb OleDbDataAdapter da = new OleDbDataAdapter ((string) null, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -196,9 +158,7 @@ namespace MonoTests.System.Data.OleDb Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -210,30 +170,22 @@ namespace MonoTests.System.Data.OleDb OleDbDataAdapter da = new OleDbDataAdapter (selectCommandText, (OleDbConnection) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNull (da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -246,21 +198,15 @@ namespace MonoTests.System.Data.OleDb OleDbDataAdapter da = new OleDbDataAdapter (selectCommandText, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#13"); @@ -268,9 +214,7 @@ namespace MonoTests.System.Data.OleDb Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -282,21 +226,15 @@ namespace MonoTests.System.Data.OleDb OleDbDataAdapter da = new OleDbDataAdapter ((string) null, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -305,9 +243,7 @@ namespace MonoTests.System.Data.OleDb Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } @@ -319,21 +255,15 @@ namespace MonoTests.System.Data.OleDb OleDbDataAdapter da = new OleDbDataAdapter (selectCommandText, (string) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#14"); @@ -341,9 +271,7 @@ namespace MonoTests.System.Data.OleDb Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } diff --git a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs index 8a513bb0932..c1efd397354 100644 --- a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs +++ b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbMetaDataCollectionNamesTest.cs @@ -29,7 +29,6 @@ using System.Data.OleDb; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System.Data.OleDb { [TestFixture] @@ -50,4 +49,3 @@ namespace MonoTests.System.Data.OleDb } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbParameterCollectionTest.cs b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbParameterCollectionTest.cs index adb722a1dca..d71330da060 100644 --- a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbParameterCollectionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbParameterCollectionTest.cs @@ -37,7 +37,6 @@ namespace MonoTests.System.Data.OleDb { [TestFixture] public class OleDbParameterCollectionTest { -#if NET_2_0 [Test] public void AddWithValueTest () { @@ -54,6 +53,5 @@ namespace MonoTests.System.Data.OleDb { Assert.AreEqual(1, parameters.Count); Assert.AreEqual(parameter, parameters[0]); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs index b44be4802a3..22e213f016c 100644 --- a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs +++ b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionAttributeTest.cs @@ -50,10 +50,8 @@ namespace MonoTests.System.Data.OleDb { Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior");
Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions");
Assert.AreEqual (String.Empty, a.Provider, "Provider");
-#if NET_2_0
Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString");
Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString");
-#endif
OleDbPermission odp = (OleDbPermission)a.CreatePermission ();
Assert.IsFalse (odp.IsUnrestricted (), "IsUnrestricted");
}
@@ -139,11 +137,7 @@ namespace MonoTests.System.Data.OleDb { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void KeyRestrictionBehavior_Invalid ()
{
OleDbPermissionAttribute a = new OleDbPermissionAttribute (SecurityAction.Assert);
@@ -182,12 +176,8 @@ namespace MonoTests.System.Data.OleDb { Assert.AreEqual ("Mono", a.Provider, "Mono");
OleDbPermission odp = (OleDbPermission) a.CreatePermission ();
-#if NET_2_0
// provider isn't even supplied to permission in fx 2.0
Assert.AreEqual (String.Empty, odp.Provider, "CreatePermission.Provider");
-#else
- Assert.AreEqual ("Mono", odp.Provider, "CreatePermission.Provider");
-#endif
}
[Test]
diff --git a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionTest.cs b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionTest.cs index d0217c79de7..e1f3b325aba 100644 --- a/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.OleDb/OleDbPermissionTest.cs @@ -53,11 +53,7 @@ namespace MonoTests.System.Data.OleDb { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void PermissionState_Invalid ()
{
PermissionState ps = (PermissionState)Int32.MinValue;
diff --git a/mcs/class/System.Data/Test/System.Data.Sql/SqlNotificationRequestTest.cs b/mcs/class/System.Data/Test/System.Data.Sql/SqlNotificationRequestTest.cs index 868b871a9eb..93c673ba1d0 100644 --- a/mcs/class/System.Data/Test/System.Data.Sql/SqlNotificationRequestTest.cs +++ b/mcs/class/System.Data/Test/System.Data.Sql/SqlNotificationRequestTest.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.Data.Sql; @@ -224,4 +223,3 @@ namespace MonoTests.System.Data.Sql } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientMetaDataCollectionNamesTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientMetaDataCollectionNamesTest.cs index ffdc962f4d7..3eacd587db2 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientMetaDataCollectionNamesTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientMetaDataCollectionNamesTest.cs @@ -29,7 +29,6 @@ using System.Data.SqlClient; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System.Data.SqlClient { [TestFixture] @@ -54,4 +53,3 @@ namespace MonoTests.System.Data.SqlClient } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionAttributeTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionAttributeTest.cs index f6d1336ae2e..f95430ca69b 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionAttributeTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionAttributeTest.cs @@ -52,10 +52,8 @@ namespace MonoTests.System.Data.SqlClient { Assert.AreEqual (String.Empty, a.ConnectionString, "ConnectionString");
Assert.AreEqual (KeyRestrictionBehavior.AllowOnly, a.KeyRestrictionBehavior, "KeyRestrictionBehavior");
Assert.AreEqual (String.Empty, a.KeyRestrictions, "KeyRestrictions");
-#if NET_2_0
Assert.IsFalse (a.ShouldSerializeConnectionString (), "ShouldSerializeConnectionString");
Assert.IsFalse (a.ShouldSerializeKeyRestrictions (), "ShouldSerializeConnectionString");
-#endif
SqlClientPermission sp = (SqlClientPermission)a.CreatePermission ();
Assert.IsFalse (sp.IsUnrestricted (), "IsUnrestricted");
}
@@ -141,11 +139,7 @@ namespace MonoTests.System.Data.SqlClient { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void KeyRestrictionBehavior_Invalid ()
{
SqlClientPermissionAttribute a = new SqlClientPermissionAttribute (SecurityAction.Assert);
diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionTest.cs index 5d2602ae500..fd6e75aee8f 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlClientPermissionTest.cs @@ -55,11 +55,7 @@ namespace MonoTests.System.Data.SqlClient { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentOutOfRangeException))]
-#else
- [ExpectedException (typeof (ArgumentException))]
-#endif
public void PermissionState_Invalid ()
{
PermissionState ps = (PermissionState)Int32.MinValue;
diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandBuilderTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandBuilderTest.cs index 598c63f3f03..c2d788bd3f5 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandBuilderTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandBuilderTest.cs @@ -26,10 +26,8 @@ // SOFTWARE. using System; -#if NET_2_0 using System.Data; using System.Data.Common; -#endif using System.Data.SqlClient; using NUnit.Framework; @@ -39,7 +37,6 @@ namespace MonoTests.System.Data.Odbc [TestFixture] public class SqlCommandBuilderTest { -#if NET_2_0 [Test] public void CatalogLocationTest () { @@ -227,13 +224,11 @@ namespace MonoTests.System.Data.Odbc Assert.AreEqual ("unquotedIdentifier", ex.ParamName, "#5"); } } -#endif [Test] public void QuotePrefix () { SqlCommandBuilder cb = new SqlCommandBuilder (); -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#A1"); Assert.AreEqual ("]", cb.QuoteSuffix, "#A2"); cb.QuotePrefix = "\""; @@ -242,31 +237,8 @@ namespace MonoTests.System.Data.Odbc cb.QuotePrefix = "["; Assert.AreEqual ("[", cb.QuotePrefix, "#C1"); Assert.AreEqual ("]", cb.QuoteSuffix, "#C2"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#A1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#A2"); - cb.QuotePrefix = "\""; - Assert.AreEqual ("\"", cb.QuotePrefix, "#B1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#B2"); - cb.QuotePrefix = string.Empty; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#C1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#C2"); - cb.QuotePrefix = "x"; - Assert.AreEqual ("x", cb.QuotePrefix, "#D1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#D2"); - cb.QuotePrefix = null; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#E1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#E2"); - cb.QuotePrefix = "mono"; - Assert.AreEqual ("mono", cb.QuotePrefix, "#F1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#F2"); - cb.QuotePrefix = " "; - Assert.AreEqual (" ", cb.QuotePrefix, "#G1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#G2"); -#endif } -#if NET_2_0 [Test] public void QuotePrefix_Value_Invalid () { @@ -294,13 +266,11 @@ namespace MonoTests.System.Data.Odbc } } } -#endif [Test] public void QuoteSuffix () { SqlCommandBuilder cb = new SqlCommandBuilder (); -#if NET_2_0 Assert.AreEqual ("[", cb.QuotePrefix, "#A1"); Assert.AreEqual ("]", cb.QuoteSuffix, "#A2"); cb.QuoteSuffix = "\""; @@ -309,31 +279,8 @@ namespace MonoTests.System.Data.Odbc cb.QuoteSuffix = "]"; Assert.AreEqual ("[", cb.QuotePrefix, "#C1"); Assert.AreEqual ("]", cb.QuoteSuffix, "#C2"); -#else - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#A1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#A2"); - cb.QuoteSuffix = "\""; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#B1"); - Assert.AreEqual ("\"", cb.QuoteSuffix, "#B2"); - cb.QuoteSuffix = string.Empty; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#C1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#C2"); - cb.QuoteSuffix = "x"; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#D1"); - Assert.AreEqual ("x", cb.QuoteSuffix, "#D2"); - cb.QuoteSuffix = null; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#E1"); - Assert.AreEqual (string.Empty, cb.QuoteSuffix, "#E2"); - cb.QuoteSuffix = "mono"; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#F1"); - Assert.AreEqual ("mono", cb.QuoteSuffix, "#F2"); - cb.QuoteSuffix = " "; - Assert.AreEqual (string.Empty, cb.QuotePrefix, "#G1"); - Assert.AreEqual (" ", cb.QuoteSuffix, "#G2"); -#endif } -#if NET_2_0 [Test] public void QuoteSuffix_Value_Invalid () { @@ -399,6 +346,5 @@ namespace MonoTests.System.Data.Odbc } } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs index d4a327c0964..235f7a675ea 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlCommandTest.cs @@ -29,9 +29,7 @@ using System; using System.Data; -#if NET_2_0 using System.Data.Sql; -#endif using System.Data.SqlClient; using NUnit.Framework; @@ -53,10 +51,8 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (cmd.Connection, "#4"); Assert.IsNull (cmd.Container, "#5"); Assert.IsTrue (cmd.DesignTimeVisible, "#6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#8"); -#endif Assert.IsNotNull (cmd.Parameters, "#9"); Assert.AreEqual (0, cmd.Parameters.Count, "#10"); Assert.IsNull (cmd.Site, "#11"); @@ -74,10 +70,8 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (cmd.Connection, "#A4"); Assert.IsNull (cmd.Container, "#A5"); Assert.IsTrue (cmd.DesignTimeVisible, "#A6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#A7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8"); -#endif Assert.IsNotNull (cmd.Parameters, "#A9"); Assert.AreEqual (0, cmd.Parameters.Count, "#A10"); Assert.IsNull (cmd.Site, "#A11"); @@ -91,10 +85,8 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (cmd.Connection, "#B4"); Assert.IsNull (cmd.Container, "#B5"); Assert.IsTrue (cmd.DesignTimeVisible, "#B6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#B7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8"); -#endif Assert.IsNotNull (cmd.Parameters, "#B9"); Assert.AreEqual (0, cmd.Parameters.Count, "#B10"); Assert.IsNull (cmd.Site, "#B11"); @@ -115,10 +107,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (conn, cmd.Connection, "#A4"); Assert.IsNull (cmd.Container, "#A5"); Assert.IsTrue (cmd.DesignTimeVisible, "#A6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#A7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8"); -#endif Assert.IsNotNull (cmd.Parameters, "#A9"); Assert.AreEqual (0, cmd.Parameters.Count, "#A10"); Assert.IsNull (cmd.Site, "#A11"); @@ -132,10 +122,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (conn, cmd.Connection, "#B4"); Assert.IsNull (cmd.Container, "#B5"); Assert.IsTrue (cmd.DesignTimeVisible, "#B6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#B7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8"); -#endif Assert.IsNotNull (cmd.Parameters, "#B9"); Assert.AreEqual (0, cmd.Parameters.Count, "#B10"); Assert.IsNull (cmd.Site, "#B11"); @@ -149,10 +137,8 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (cmd.Connection, "#C4"); Assert.IsNull (cmd.Container, "#C5"); Assert.IsTrue (cmd.DesignTimeVisible, "#C6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#C7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8"); -#endif Assert.IsNotNull (cmd.Parameters, "#C9"); Assert.AreEqual (0, cmd.Parameters.Count, "#C10"); Assert.IsNull (cmd.Site, "#C11"); @@ -173,10 +159,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (conn, cmd.Connection, "#A4"); Assert.IsNull (cmd.Container, "#A5"); Assert.IsTrue (cmd.DesignTimeVisible, "#A6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#A7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#A8"); -#endif Assert.IsNotNull (cmd.Parameters, "#A9"); Assert.AreEqual (0, cmd.Parameters.Count, "#A10"); Assert.IsNull (cmd.Site, "#A11"); @@ -190,10 +174,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (conn, cmd.Connection, "#B4"); Assert.IsNull (cmd.Container, "#B5"); Assert.IsTrue (cmd.DesignTimeVisible, "#B6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#B7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#B8"); -#endif Assert.IsNotNull (cmd.Parameters, "#B9"); Assert.AreEqual (0, cmd.Parameters.Count, "#B10"); Assert.IsNull (cmd.Site, "#B11"); @@ -207,10 +189,8 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (cmd.Connection, "#C4"); Assert.IsNull (cmd.Container, "#C5"); Assert.IsTrue (cmd.DesignTimeVisible, "#C6"); -#if NET_2_0 Assert.IsNull (cmd.Notification, "#C7"); Assert.IsTrue (cmd.NotificationAutoEnlist, "#C8"); -#endif Assert.IsNotNull (cmd.Parameters, "#C9"); Assert.AreEqual (0, cmd.Parameters.Count, "#C10"); Assert.IsNull (cmd.Site, "#C11"); @@ -221,26 +201,18 @@ namespace MonoTests.System.Data.SqlClient [Test] public void Clone () { -#if NET_2_0 SqlNotificationRequest notificationReq = new SqlNotificationRequest (); -#endif SqlCommand cmd = new SqlCommand (); cmd.CommandText = "sp_insert"; cmd.CommandTimeout = 100; cmd.CommandType = CommandType.StoredProcedure; cmd.DesignTimeVisible = false; -#if NET_2_0 cmd.Notification = notificationReq; cmd.NotificationAutoEnlist = false; -#endif cmd.Parameters.Add ("@TestPar1", SqlDbType.Int); cmd.Parameters ["@TestPar1"].Value = DBNull.Value; -#if NET_2_0 cmd.Parameters.AddWithValue ("@BirthDate", DateTime.Now); -#else - cmd.Parameters.Add ("@BirthDate", DateTime.Now); -#endif cmd.UpdatedRowSource = UpdateRowSource.OutputParameters; SqlCommand clone = (((ICloneable) (cmd)).Clone ()) as SqlCommand; @@ -249,17 +221,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (CommandType.StoredProcedure, clone.CommandType, "#3"); Assert.IsNull (cmd.Connection, "#4"); Assert.IsFalse (cmd.DesignTimeVisible, "#5"); -#if NET_2_0 Assert.AreSame (notificationReq, cmd.Notification, "#6"); Assert.IsFalse (cmd.NotificationAutoEnlist, "#7"); -#endif Assert.AreEqual (2, clone.Parameters.Count, "#8"); Assert.AreEqual (100, clone.CommandTimeout, "#9"); -#if NET_2_0 clone.Parameters.AddWithValue ("@test", DateTime.Now); -#else - clone.Parameters.Add ("@test", DateTime.Now); -#endif clone.Parameters [0].ParameterName = "@ClonePar1"; Assert.AreEqual (3, clone.Parameters.Count, "#10"); Assert.AreEqual (2, cmd.Parameters.Count, "#11"); @@ -308,11 +274,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.AreEqual ("CommandTimeout", ex.ParamName, "#5"); -#else - Assert.IsNull (ex.ParamName, "#5"); -#endif } } @@ -323,7 +285,6 @@ namespace MonoTests.System.Data.SqlClient try { cmd.CommandType = (CommandType) (666); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { // The CommandType enumeration value, 666, is invalid Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2"); @@ -332,16 +293,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#5"); Assert.AreEqual ("CommandType", ex.ParamName, "#6"); } -#else - } catch (ArgumentException ex) { - // The CommandType enumeration value, 666, is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#5"); - Assert.IsNull (ex.ParamName, "#6"); - } -#endif } [Test] // bug #324386 @@ -451,11 +402,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("ExecuteScalar") != -1, "#5"); -#else - Assert.IsTrue (ex.Message.IndexOf ("ExecuteReader") != -1, "#5"); -#endif } } @@ -472,11 +419,7 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsTrue (ex.Message.StartsWith ("ExecuteScalar:"), "#5"); -#else - Assert.IsTrue (ex.Message.StartsWith ("ExecuteReader:"), "#5"); -#endif } } @@ -487,15 +430,11 @@ namespace MonoTests.System.Data.SqlClient // Text, without parameters cmd = new SqlCommand ("select count(*) from whatever"); -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#A1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif // Text, with parameters cmd = new SqlCommand ("select count(*) from whatever"); @@ -503,59 +442,37 @@ namespace MonoTests.System.Data.SqlClient try { cmd.Prepare (); Assert.Fail ("#B1"); -#if NET_2_0 } catch (NullReferenceException) { } -#else - } catch (InvalidOperationException ex) { - // Prepare: Connection property has not been - // initialized - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - } -#endif // Text, without parameters cmd = new SqlCommand ("select count(*) from whatever"); cmd.Parameters.Add ("@TestPar1", SqlDbType.Int); cmd.Parameters.Clear (); -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#C1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif // StoredProcedure, without parameters cmd = new SqlCommand ("FindCustomer"); cmd.CommandType = CommandType.StoredProcedure; -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#D1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif // StoredProcedure, with parameters cmd = new SqlCommand ("FindCustomer"); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add ("@TestPar1", SqlDbType.Int); -#if NET_2_0 try { cmd.Prepare (); Assert.Fail ("#E1"); } catch (NullReferenceException) { } -#else - cmd.Prepare (); -#endif } [Test] // bug #412586 @@ -635,7 +552,6 @@ namespace MonoTests.System.Data.SqlClient try { cmd.UpdatedRowSource = (UpdateRowSource) 666; Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentOutOfRangeException ex) { // The UpdateRowSource enumeration value,666, // is invalid @@ -644,27 +560,15 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("UpdateRowSource", ex.ParamName, "#5"); } -#else - } catch (ArgumentException ex) { - // The UpdateRowSource enumeration value, 666, - // is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); - } -#endif } -#if NET_2_0 [Test] // bug #381100 public void ParameterCollectionTest () { SqlCommand cmd = new SqlCommand(); cmd.Parameters.AddRange(new SqlParameter[] { }); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs index 9dea85d9c81..59845d17e8a 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlConnectionStringBuilderTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 #region Using directives @@ -126,4 +125,3 @@ namespace MonoTests.System.Data.Common } } -#endif // NET_2_0 diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlDataAdapterTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlDataAdapterTest.cs index cb3a4b750e1..301f62bf7f2 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlDataAdapterTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlDataAdapterTest.cs @@ -45,28 +45,20 @@ namespace MonoTests.System.Data.SqlClient { SqlDataAdapter da = new SqlDataAdapter (); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -76,29 +68,21 @@ namespace MonoTests.System.Data.SqlClient SqlCommand cmd = new SqlCommand (); SqlDataAdapter da = new SqlDataAdapter (cmd); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (cmd, da.SelectCommand, "#12"); Assert.IsNull (da.Site, "#13"); Assert.IsNotNull (da.TableMappings, "#14"); Assert.AreEqual (0, da.TableMappings.Count, "#15"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#16"); -#endif Assert.IsNull (da.UpdateCommand, "#17"); } @@ -107,28 +91,20 @@ namespace MonoTests.System.Data.SqlClient { SqlDataAdapter da = new SqlDataAdapter ((SqlCommand) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNull (da.SelectCommand, "#11"); Assert.IsNull (da.Site, "#12"); Assert.IsNotNull (da.TableMappings, "#13"); Assert.AreEqual (0, da.TableMappings.Count, "#14"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#15"); -#endif Assert.IsNull (da.UpdateCommand, "#16"); } @@ -141,30 +117,22 @@ namespace MonoTests.System.Data.SqlClient SqlDataAdapter da = new SqlDataAdapter (selectCommandText, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.AreSame (selectConnection, da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -176,21 +144,15 @@ namespace MonoTests.System.Data.SqlClient SqlDataAdapter da = new SqlDataAdapter ((string) null, selectConnection); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -198,9 +160,7 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -212,30 +172,22 @@ namespace MonoTests.System.Data.SqlClient SqlDataAdapter da = new SqlDataAdapter (selectCommandText, (SqlConnection) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNull (da.SelectCommand.Connection, "#13"); Assert.IsNull (da.Site, "#14"); Assert.IsNotNull (da.TableMappings, "#15"); Assert.AreEqual (0, da.TableMappings.Count, "#16"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#17"); -#endif Assert.IsNull (da.UpdateCommand, "#18"); } @@ -248,21 +200,15 @@ namespace MonoTests.System.Data.SqlClient SqlDataAdapter da = new SqlDataAdapter (selectCommandText, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#13"); @@ -270,9 +216,7 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (da.Site, "#15"); Assert.IsNotNull (da.TableMappings, "#16"); Assert.AreEqual (0, da.TableMappings.Count, "#17"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#18"); -#endif Assert.IsNull (da.UpdateCommand, "#19"); } @@ -284,21 +228,15 @@ namespace MonoTests.System.Data.SqlClient SqlDataAdapter da = new SqlDataAdapter ((string) null, selectConnectionString); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.IsNotNull (da.SelectCommand.CommandText, "#12"); Assert.AreEqual (string.Empty, da.SelectCommand.CommandText, "#13"); @@ -307,9 +245,7 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } @@ -321,21 +257,15 @@ namespace MonoTests.System.Data.SqlClient SqlDataAdapter da = new SqlDataAdapter (selectCommandText, (string) null); Assert.IsTrue (da.AcceptChangesDuringFill, "#1"); -#if NET_2_0 Assert.IsTrue (da.AcceptChangesDuringUpdate, "#2"); -#endif Assert.IsNull (da.Container, "#3"); Assert.IsFalse (da.ContinueUpdateOnError, "#4"); Assert.IsNull (da.DeleteCommand, "#5"); -#if NET_2_0 Assert.AreEqual (LoadOption.OverwriteChanges, da.FillLoadOption, "#6"); -#endif Assert.IsNull (da.InsertCommand, "#7"); Assert.AreEqual (MissingMappingAction.Passthrough, da.MissingMappingAction, "#8"); Assert.AreEqual (MissingSchemaAction.Add, da.MissingSchemaAction, "#9"); -#if NET_2_0 Assert.IsFalse (da.ReturnProviderSpecificTypes, "#10"); -#endif Assert.IsNotNull (da.SelectCommand, "#11"); Assert.AreSame (selectCommandText, da.SelectCommand.CommandText, "#12"); Assert.IsNotNull (da.SelectCommand.Connection, "#14"); @@ -343,9 +273,7 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNull (da.Site, "#16"); Assert.IsNotNull (da.TableMappings, "#17"); Assert.AreEqual (0, da.TableMappings.Count, "#18"); -#if NET_2_0 Assert.AreEqual (1, da.UpdateBatchSize, "#19"); -#endif Assert.IsNull (da.UpdateCommand, "#20"); } diff --git a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlParameterTest.cs b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlParameterTest.cs index db6ec6257ab..27e6fd1bf4a 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlClient/SqlParameterTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlClient/SqlParameterTest.cs @@ -51,28 +51,20 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DbType.String, p.DbType, "DbType"); Assert.AreEqual (ParameterDirection.Input, p.Direction, "Direction"); Assert.IsFalse (p.IsNullable, "IsNullable"); -#if NET_2_0 Assert.AreEqual (0, p.LocaleId, "LocaleId"); -#endif Assert.AreEqual (string.Empty, p.ParameterName, "ParameterName"); Assert.AreEqual (0, p.Precision, "Precision"); Assert.AreEqual (0, p.Scale, "Scale"); Assert.AreEqual (0, p.Size, "Size"); Assert.AreEqual (string.Empty, p.SourceColumn, "SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "SourceVersion"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "SqlDbType"); -#if NET_2_0 Assert.IsNull (p.SqlValue, "SqlValue"); -#endif Assert.IsNull (p.Value, "Value"); -#if NET_2_0 Assert.AreEqual (string.Empty, p.XmlSchemaCollectionDatabase, "XmlSchemaCollectionDatabase"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionName, "XmlSchemaCollectionName"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionOwningSchema, "XmlSchemaCollectionOwningSchema"); -#endif } [Test] @@ -84,29 +76,21 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DbType.DateTime, p.DbType, "B:DbType"); Assert.AreEqual (ParameterDirection.Input, p.Direction, "B:Direction"); Assert.IsFalse (p.IsNullable, "B:IsNullable"); -#if NET_2_0 Assert.AreEqual (0, p.LocaleId, "B:LocaleId"); -#endif Assert.AreEqual ("address", p.ParameterName, "B:ParameterName"); Assert.AreEqual (0, p.Precision, "B:Precision"); Assert.AreEqual (0, p.Scale, "B:Scale"); //Assert.AreEqual (0, p.Size, "B:Size"); Assert.AreEqual (string.Empty, p.SourceColumn, "B:SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "B:SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "B:SourceVersion"); Assert.AreEqual (SqlDbType.DateTime, p.SqlDbType, "B:SqlDbType"); -#if NET_2_0 // FIXME //Assert.AreEqual (new SqlDateTime (value), p.SqlValue, "B:SqlValue"); -#endif Assert.AreEqual (value, p.Value, "B:Value"); -#if NET_2_0 Assert.AreEqual (string.Empty, p.XmlSchemaCollectionDatabase, "B:XmlSchemaCollectionDatabase"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionName, "B:XmlSchemaCollectionName"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionOwningSchema, "B:XmlSchemaCollectionOwningSchema"); -#endif } [Test] @@ -116,29 +100,21 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DbType.String, p.DbType, "B:DbType"); Assert.AreEqual (ParameterDirection.Input, p.Direction, "B:Direction"); Assert.IsFalse (p.IsNullable, "B:IsNullable"); -#if NET_2_0 Assert.AreEqual (0, p.LocaleId, "B:LocaleId"); -#endif Assert.AreEqual ("address", p.ParameterName, "B:ParameterName"); Assert.AreEqual (0, p.Precision, "B:Precision"); Assert.AreEqual (0, p.Scale, "B:Scale"); Assert.AreEqual (0, p.Size, "B:Size"); Assert.AreEqual (string.Empty, p.SourceColumn, "B:SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "B:SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "B:SourceVersion"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "B:SqlDbType"); -#if NET_2_0 // FIXME //Assert.AreEqual (SqlString.Null, p.SqlValue, "B:SqlValue"); -#endif Assert.AreEqual (DBNull.Value, p.Value, "B:Value"); -#if NET_2_0 Assert.AreEqual (string.Empty, p.XmlSchemaCollectionDatabase, "B:XmlSchemaCollectionDatabase"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionName, "B:XmlSchemaCollectionName"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionOwningSchema, "B:XmlSchemaCollectionOwningSchema"); -#endif } [Test] @@ -148,31 +124,22 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DbType.String, p.DbType, "A:DbType"); Assert.AreEqual (ParameterDirection.Input, p.Direction, "A:Direction"); Assert.IsFalse (p.IsNullable, "A:IsNullable"); -#if NET_2_0 Assert.AreEqual (0, p.LocaleId, "A:LocaleId"); -#endif Assert.AreEqual ("address", p.ParameterName, "A:ParameterName"); Assert.AreEqual (0, p.Precision, "A:Precision"); Assert.AreEqual (0, p.Scale, "A:Scale"); Assert.AreEqual (0, p.Size, "A:Size"); Assert.AreEqual (string.Empty, p.SourceColumn, "A:SourceColumn"); -#if NET_2_0 Assert.IsFalse (p.SourceColumnNullMapping, "A:SourceColumnNullMapping"); -#endif Assert.AreEqual (DataRowVersion.Current, p.SourceVersion, "A:SourceVersion"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "A:SqlDbType"); -#if NET_2_0 Assert.IsNull (p.SqlValue, "A:SqlValue"); -#endif Assert.IsNull (p.Value, "A:Value"); -#if NET_2_0 Assert.AreEqual (string.Empty, p.XmlSchemaCollectionDatabase, "A:XmlSchemaCollectionDatabase"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionName, "A:XmlSchemaCollectionName"); Assert.AreEqual (string.Empty, p.XmlSchemaCollectionOwningSchema, "A:XmlSchemaCollectionOwningSchema"); -#endif } -#if NET_2_0 [Test] // .ctor (String, SqlDbType, Int32, ParameterDirection, Byte, Byte, String, DataRowVersion, Boolean, Object, String, String, String) public void Constructor7 () { @@ -207,7 +174,6 @@ namespace MonoTests.System.Data.SqlClient parameter.CompareInfo = SqlCompareOptions.IgnoreNonSpace; Assert.AreEqual (SqlCompareOptions.IgnoreNonSpace, parameter.CompareInfo, "#2"); } -#endif [Test] public void InferType_Byte () @@ -232,14 +198,11 @@ namespace MonoTests.System.Data.SqlClient } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void InferType_Char () { Char value = 'X'; -#if NET_2_0 String string_value = "X"; SqlParameter p = new SqlParameter (); @@ -277,30 +240,14 @@ namespace MonoTests.System.Data.SqlClient p.Value = value; Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "#F:SqlDbType"); Assert.AreEqual (value, p.Value, "#F:Value"); -#else - SqlParameter p = new SqlParameter (); - try { - p.Value = value; - Assert.Fail ("#1"); - } catch (ArgumentException ex) { - // The parameter data type of Char is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); - } -#endif } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void InferType_CharArray () { Char [] value = new Char [] { 'A', 'X' }; -#if NET_2_0 String string_value = "AX"; SqlParameter p = new SqlParameter (); @@ -339,22 +286,6 @@ namespace MonoTests.System.Data.SqlClient p.Value = value; Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "#F:SqlDbType"); Assert.AreEqual (value, p.Value, "#F:Value"); -#else - SqlParameter p = new SqlParameter (); - try { - p.Value = value; - Assert.Fail ("#1"); - } catch (FormatException) { - // appears to be bug in .NET 1.1 while constructing - // exception message - } catch (ArgumentException ex) { - // The parameter data type of Char[] is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); - } -#endif } [Test] @@ -535,9 +466,7 @@ namespace MonoTests.System.Data.SqlClient } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void InferType_Invalid () { object [] notsupported = new object [] { @@ -551,7 +480,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter param = new SqlParameter (); for (int i = 0; i < notsupported.Length; i++) { -#if NET_2_0 param.Value = notsupported [i]; try { SqlDbType type = param.SqlDbType; @@ -574,21 +502,6 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNotNull (ex.Message, "#B4"); Assert.IsNull (ex.ParamName, "#B5"); } -#else - try { - param.Value = notsupported [i]; - Assert.Fail ("#A1:" + i); - } catch (FormatException) { - // appears to be bug in .NET 1.1 while - // constructing exception message - } catch (ArgumentException ex) { - // The parameter data type of ... is invalid - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsNull (ex.ParamName, "#A5"); - } -#endif } } @@ -626,35 +539,17 @@ namespace MonoTests.System.Data.SqlClient } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void InferType_TimeSpan () { TimeSpan value = new TimeSpan (4, 6, 23); SqlParameter param = new SqlParameter (); -#if NET_2_0 param.Value = value; Assert.AreEqual (SqlDbType.Time, param.SqlDbType, "#1"); Assert.AreEqual (DbType.Time, param.DbType, "#2"); -#else - try { - param.Value = value; - Assert.Fail ("#1"); - } catch (FormatException) { - // appears to be bug in .NET 1.1 while constructing - // exception message - } 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 } -#if NET_2_0 [Test] public void LocaleId () { @@ -663,7 +558,6 @@ namespace MonoTests.System.Data.SqlClient parameter.LocaleId = 15; Assert.AreEqual(15, parameter.LocaleId, "#2"); } -#endif [Test] // bug #320196 public void ParameterNullTest () @@ -697,35 +591,20 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DbType.Int32, p.DbType, "#C1"); Assert.AreEqual (SqlDbType.Int, p.SqlDbType, "#C2"); p.Value = DBNull.Value; -#if NET_2_0 Assert.AreEqual (DbType.String, p.DbType, "#D1"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "#D2"); -#else - Assert.AreEqual (DbType.Int32, p.DbType, "#D1"); - Assert.AreEqual (SqlDbType.Int, p.SqlDbType, "#D2"); -#endif p.Value = new byte [] { 0x0a }; Assert.AreEqual (DbType.Binary, p.DbType, "#E1"); Assert.AreEqual (SqlDbType.VarBinary, p.SqlDbType, "#E2"); p.Value = null; -#if NET_2_0 Assert.AreEqual (DbType.String, p.DbType, "#F1"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "#F2"); -#else - Assert.AreEqual (DbType.Binary, p.DbType, "#F1"); - Assert.AreEqual (SqlDbType.VarBinary, p.SqlDbType, "#F2"); -#endif p.Value = DateTime.Now; Assert.AreEqual (DbType.DateTime, p.DbType, "#G1"); Assert.AreEqual (SqlDbType.DateTime, p.SqlDbType, "#G2"); p.Value = null; -#if NET_2_0 Assert.AreEqual (DbType.String, p.DbType, "#H1"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "#H2"); -#else - Assert.AreEqual (DbType.DateTime, p.DbType, "#H1"); - Assert.AreEqual (SqlDbType.DateTime, p.SqlDbType, "#H2"); -#endif // If DbType is set, then the SqlDbType should not be // inferred from the value assigned. @@ -796,7 +675,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (string.Empty, p.SourceColumn, "#E:SourceColumn"); } -#if NET_2_0 [Test] public void ResetDbType () { @@ -899,7 +777,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DbType.String, p2.DbType, "#17 Resetting SqlDbType must infer the type from the value"); Assert.AreEqual (SqlDbType.NVarChar, p2.SqlDbType, "#18 Resetting SqlDbType must infer the type from the value"); } -#endif [Test] public void SourceColumn () @@ -926,7 +803,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (string.Empty, p.SourceColumn, "#E:SourceColumn"); } -#if NET_2_0 [Test] public void SourceColumnNullMapping () { @@ -937,7 +813,6 @@ namespace MonoTests.System.Data.SqlClient p.SourceColumnNullMapping = false; Assert.IsFalse (p.SourceColumnNullMapping, "#3"); } -#endif [Test] public void SqlDbTypeTest () @@ -961,7 +836,6 @@ namespace MonoTests.System.Data.SqlClient p.SqlDbType = (SqlDbType) 666; Assert.Fail ("#1"); } catch (ArgumentOutOfRangeException ex) { -#if NET_2_0 // The SqlDbType enumeration value, 666, is // invalid Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2"); @@ -969,18 +843,9 @@ namespace MonoTests.System.Data.SqlClient Assert.IsNotNull (ex.Message, "#4"); Assert.IsTrue (ex.Message.IndexOf ("666") != -1, "#5:" + ex.Message); Assert.AreEqual ("SqlDbType", ex.ParamName, "#6"); -#else - // Specified argument was out of the range of - // valid values - Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNotNull (ex.ParamName, "#5"); -#endif } } -#if NET_2_0 [Test] public void SqlValue () { @@ -1103,7 +968,6 @@ namespace MonoTests.System.Data.SqlClient // FIXME bug #525321 //Assert.AreEqual ("XA", parameter.Value, "Chars:Value"); } -#endif [Test] public void SqlTypes_SqlBinary () @@ -1111,7 +975,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlBinary value = new SqlBinary (new byte [] { 0x0d, 0x0a }); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.VarBinary, parameter.SqlDbType, "#A:SqlDbType"); @@ -1123,14 +986,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.VarBinary, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlBinary.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlBinary.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.VarBinary, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1140,7 +1000,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlBoolean value = new SqlBoolean (false); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.Bit, parameter.SqlDbType, "#A:SqlDbType"); @@ -1152,14 +1011,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.Bit, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlBoolean.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlBoolean.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.Bit, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1169,7 +1025,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlByte value = new SqlByte (0x0d); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.TinyInt, parameter.SqlDbType, "#A:SqlDbType"); @@ -1181,18 +1036,14 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.TinyInt, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlByte.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlByte.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.TinyInt, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } -#if NET_2_0 [Test] [Category ("NotWorking")] // This doesn't work as SqlBytes are represented as SqlBinary @@ -1254,7 +1105,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (value, parameter.SqlValue, "#C:SqlValue"); Assert.AreSame (value, parameter.Value, "#C:Value"); } -#endif [Test] public void SqlTypes_SqlDateTime () @@ -1262,7 +1112,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlDateTime value = new SqlDateTime (DateTime.Now); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.DateTime, parameter.SqlDbType, "#A:SqlDbType"); @@ -1274,14 +1123,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.DateTime, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlDateTime.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlDateTime.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.DateTime, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1291,7 +1137,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlDecimal value = new SqlDecimal (45m); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.Decimal, parameter.SqlDbType, "#A:SqlDbType"); @@ -1303,14 +1148,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.Decimal, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlDecimal.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlDecimal.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.Decimal, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1320,7 +1162,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlDouble value = new SqlDouble (4.5D); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.Float, parameter.SqlDbType, "#A:SqlDbType"); @@ -1332,14 +1173,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.Float, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlDouble.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlDouble.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.Float, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1349,7 +1187,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlGuid value = new SqlGuid (Guid.NewGuid ()); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.UniqueIdentifier, parameter.SqlDbType, "#A:SqlDbType"); @@ -1361,14 +1198,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.UniqueIdentifier, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlGuid.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlGuid.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.UniqueIdentifier, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1378,7 +1212,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlInt16 value = new SqlInt16 ((short) 5); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.SmallInt, parameter.SqlDbType, "#A:SqlDbType"); @@ -1390,14 +1223,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.SmallInt, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlInt16.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlInt16.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.SmallInt, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1407,7 +1237,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlInt32 value = new SqlInt32 (5); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.Int, parameter.SqlDbType, "#A:SqlDbType"); @@ -1419,14 +1248,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.Int, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlInt32.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlInt32.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.Int, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1436,7 +1262,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlInt64 value = new SqlInt64 (5L); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.BigInt, parameter.SqlDbType, "#A:SqlDbType"); @@ -1448,14 +1273,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.BigInt, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlInt64.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlInt64.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.BigInt, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1465,7 +1287,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlMoney value = new SqlMoney (45m); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.Money, parameter.SqlDbType, "#A:SqlDbType"); @@ -1477,14 +1298,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.Money, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlMoney.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlMoney.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.Money, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1494,7 +1312,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlSingle value = new SqlSingle (45f); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.Real, parameter.SqlDbType, "#A:SqlDbType"); @@ -1506,14 +1323,11 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.Real, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlSingle.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlSingle.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.Real, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } @@ -1523,7 +1337,6 @@ namespace MonoTests.System.Data.SqlClient SqlParameter parameter; SqlString value = new SqlString ("XA"); -#if NET_2_0 parameter = new SqlParameter (); parameter.SqlValue = value; Assert.AreEqual (SqlDbType.NVarChar, parameter.SqlDbType, "#A:SqlDbType"); @@ -1535,18 +1348,14 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (SqlDbType.NVarChar, parameter.SqlDbType, "#B:SqlDbType"); Assert.AreEqual (SqlString.Null, parameter.SqlValue, "#B:SqlValue"); Assert.AreEqual (SqlString.Null, parameter.Value, "#B:Value"); -#endif parameter = new SqlParameter (); parameter.Value = value; Assert.AreEqual (SqlDbType.NVarChar, parameter.SqlDbType, "#C:SqlDbType"); -#if NET_2_0 Assert.AreEqual (value, parameter.SqlValue, "#C:SqlValue"); -#endif Assert.AreEqual (value, parameter.Value, "#C:Value"); } -#if NET_2_0 [Test] public void SqlTypes_SqlXml () { @@ -1575,7 +1384,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreSame (value, parameter.SqlValue, "#C:SqlValue"); Assert.AreSame (value, parameter.Value, "#C:Value"); } -#endif [Test] public void Value () @@ -1589,13 +1397,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (42, p.Value, "#A:Value"); p.Value = DBNull.Value; -#if NET_2_0 Assert.AreEqual (DbType.String, p.DbType, "#B:DbType"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "#B:SqlDbType"); -#else - Assert.AreEqual (DbType.Int32, p.DbType, "#B:DbType"); - Assert.AreEqual (SqlDbType.Int, p.SqlDbType, "#B:SqlDbType"); -#endif Assert.AreEqual (DBNull.Value, p.Value, "#B:Value"); p.Value = DateTime.MaxValue; @@ -1604,13 +1407,8 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DateTime.MaxValue, p.Value, "#C:Value"); p.Value = null; -#if NET_2_0 Assert.AreEqual (DbType.String, p.DbType, "#D:DbType"); Assert.AreEqual (SqlDbType.NVarChar, p.SqlDbType, "#D:SqlDbType"); -#else - Assert.AreEqual (DbType.DateTime, p.DbType, "#D:DbType"); - Assert.AreEqual (SqlDbType.DateTime, p.SqlDbType, "#D:SqlDbType"); -#endif Assert.IsNull (p.Value, "#D:Value"); p = new SqlParameter ("zipcode", SqlDbType.Int); @@ -1630,7 +1428,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (DBNull.Value, p.Value, "#G:Value"); } -#if NET_2_0 [Test] public void XmlSchemaTest () { @@ -1695,7 +1492,6 @@ namespace MonoTests.System.Data.SqlClient Assert.AreEqual (" a ", p1.XmlSchemaCollectionOwningSchema, "#21 Default value for XmlSchemaCollectionOwningSchema is an empty string"); } -#endif private enum ByteEnum : byte { diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBinaryTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBinaryTest.cs index 04e8d7ef788..cf522317947 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBinaryTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBinaryTest.cs @@ -295,14 +295,12 @@ namespace MonoTests.System.Data.SqlTypes SqlBinary TestBinary = (SqlBinary)TestByteArray; Assert.AreEqual ((byte)15, TestBinary [0], "#O1"); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { XmlQualifiedName qualifiedName = SqlBinary.GetXsdType (null); Assert.AreEqual ("base64Binary", qualifiedName.Name, "#A01"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBooleanTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBooleanTest.cs index 752a5d7909e..62e26521c56 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBooleanTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBooleanTest.cs @@ -969,7 +969,6 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual ((byte)0, SqlBoolean.Zero.ByteValue, "Zero field does not work correctly"); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { @@ -1064,7 +1063,6 @@ namespace MonoTests.System.Data.SqlTypes NUnit.Framework.Assert.IsTrue ((z1 <= x).Value, "#A11"); NUnit.Framework.Assert.IsTrue ((z1 <= y).Value, "#A12"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs index 28a82f1ad1a..a3dea014a08 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlByteTest.cs @@ -911,14 +911,12 @@ namespace MonoTests.System.Data.SqlTypes byte TestByte = 14; Assert.AreEqual ((byte)14, ((SqlByte)TestByte).Value, "ByteToSqlByte" + Error); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { XmlQualifiedName qualifiedName = SqlByte.GetXsdType (null); NUnit.Framework.Assert.AreEqual ("unsignedByte", qualifiedName.Name, "#A01"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBytesTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBytesTest.cs index ed0be51fcc8..d4e18c62729 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBytesTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlBytesTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -487,4 +486,3 @@ namespace MonoTests.System.Data.SqlTypes } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlCharsTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlCharsTest.cs index 5b792c866d1..2c20f46671a 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlCharsTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlCharsTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -37,9 +36,7 @@ using System.Data.SqlTypes; using System.Threading; using System.Globalization; -#if NET_2_0 using System.Xml.Serialization; -#endif namespace MonoTests.System.Data.SqlTypes { @@ -540,4 +537,3 @@ namespace MonoTests.System.Data.SqlTypes } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDateTimeTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDateTimeTest.cs index 8d157f3ef02..524cf51ef9a 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDateTimeTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDateTimeTest.cs @@ -573,14 +573,12 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (633138985603970000, d1.Value.Ticks, "#R03");
}
-#if NET_2_0
[Test]
public void GetXsdTypeTest ()
{
XmlQualifiedName qualifiedName = SqlDateTime.GetXsdType (null);
NUnit.Framework.Assert.AreEqual ("dateTime", qualifiedName.Name, "#A01");
}
-#endif
}
}
diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDecimalTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDecimalTest.cs index 40655aa5f3a..d377b95457b 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDecimalTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDecimalTest.cs @@ -38,10 +38,8 @@ using System.Xml; using System.Data.SqlTypes; using System.Threading; using System.Globalization; -#if NET_2_0 using System.Xml.Serialization; using System.IO; -#endif namespace MonoTests.System.Data.SqlTypes { @@ -719,7 +717,6 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (9999999999999999999999999999m, d); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { @@ -777,6 +774,5 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (typeof (FormatException), e.GetType (), "#BA03"); } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDoubleTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDoubleTest.cs index e8f88a4e25a..3ac9d910e7c 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDoubleTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlDoubleTest.cs @@ -34,14 +34,10 @@ using System; using System.Data.SqlTypes; using System.Globalization; -#if NET_2_0 using System.IO; -#endif using System.Threading; using System.Xml; -#if NET_2_0 using System.Xml.Serialization; -#endif using NUnit.Framework; @@ -590,7 +586,6 @@ namespace MonoTests.System.Data.SqlTypes SqlSingle TestSingle64 = new SqlSingle (64); Assert.AreEqual ((double) 64, ((SqlDouble) TestSingle64).Value, "#Y01"); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { @@ -646,6 +641,5 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (typeof (FormatException), e.GetType (), "#BA03"); } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlGuidTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlGuidTest.cs index a2986aa534d..2513dec874a 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlGuidTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlGuidTest.cs @@ -338,13 +338,11 @@ namespace MonoTests.System.Data.SqlTypes Guid TestGuid = new Guid("0000c864-0000-0000-0000-000007650000");
Assert.AreEqual (new SqlGuid("0000c864-0000-0000-0000-000007650000"), (SqlGuid)TestGuid, "#Q01");
}
-#if NET_2_0
[Test]
public void GetXsdTypeTest ()
{
XmlQualifiedName qualifiedName = SqlGuid.GetXsdType (null);
Assert.AreEqual ("string", qualifiedName.Name, "#A01");
}
-#endif
}
}
diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs index ee3817830d9..7d37fc6338a 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt16Test.cs @@ -35,10 +35,8 @@ using NUnit.Framework; using System; using System.Xml; using System.Data.SqlTypes; -#if NET_2_0 using System.Xml.Serialization; using System.IO; -#endif namespace MonoTests.System.Data.SqlTypes { @@ -135,11 +133,9 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (typeof (OverflowException), e.GetType (), "Test#19"); } -#if NET_2_0 // Modulus () Assert.AreEqual ((SqlInt16)36, SqlInt16.Modulus (Test164, Test64), "Test#20"); Assert.AreEqual ((SqlInt16)64, SqlInt16.Modulus (Test64, Test164), "Test#21"); -#endif } [Test] @@ -695,7 +691,6 @@ namespace MonoTests.System.Data.SqlTypes short TestShort = 14; Assert.AreEqual ((short) 14, ((SqlInt16) TestShort).Value, "Test#1"); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { @@ -751,6 +746,5 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (typeof (FormatException), e.GetType (), "#BA03"); } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt32Test.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt32Test.cs index 35a7d8c8743..01c21313628 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt32Test.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt32Test.cs @@ -34,13 +34,9 @@ using System; using System.Data; using System.Data.SqlTypes; -#if NET_2_0 using System.IO; -#endif using System.Xml; -#if NET_2_0 using System.Xml.Serialization; -#endif using NUnit.Framework; @@ -292,7 +288,6 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (z.Value, a % b, "Modulus function does not work correctly"); } -#if NET_2_0 [Test] public void Modulus () { @@ -305,7 +300,6 @@ namespace MonoTests.System.Data.SqlTypes z = SqlInt32.Modulus (x, y); Assert.AreEqual (z.Value, a % b, "Modulus function does not work correctly"); } -#endif [Test] public void Multiply () @@ -463,7 +457,6 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (z.Value, a ^ b, "Xor function does not work correctly"); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { @@ -519,6 +512,5 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (typeof (FormatException), e.GetType (), "#BA03"); } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs index 37b186347a0..1d7d0211867 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlInt64Test.cs @@ -35,10 +35,8 @@ using System; using System.Xml; using System.Data.SqlTypes; -#if NET_2_0 using System.Xml.Serialization; using System.IO; -#endif using NUnit.Framework; @@ -139,11 +137,9 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (typeof (OverflowException), e.GetType (), "#D19"); } -#if NET_2_0 // Modulus () Assert.AreEqual ((SqlInt64)36, SqlInt64.Modulus (Test164, Test64), "#D20"); Assert.AreEqual ((SqlInt64)64, SqlInt64.Modulus (Test64, Test164), "#D21"); -#endif } [Test] @@ -662,7 +658,6 @@ namespace MonoTests.System.Data.SqlTypes short TestShort = 14; Assert.AreEqual ((long) 14, ((SqlInt64) TestShort).Value, "#G01"); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { @@ -718,6 +713,5 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual (typeof (FormatException), e.GetType (), "#BA03"); } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlMoneyTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlMoneyTest.cs index 0b0f0e62e25..be69bdb9bbc 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlMoneyTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlMoneyTest.cs @@ -559,14 +559,12 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual ( typeof (OverflowException), e.GetType (), "#Y05"); } } -#if NET_2_0 [Test] public void GetXsdTypeTest () { XmlQualifiedName qualifiedName = SqlMoney.GetXsdType (null); NUnit.Framework.Assert.AreEqual ("decimal", qualifiedName.Name, "#A01"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlSingleTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlSingleTest.cs index 0beedbe8b4a..4b935505114 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlSingleTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlSingleTest.cs @@ -583,14 +583,12 @@ namespace MonoTests.System.Data.SqlTypes Single TestSingle64 = 64; Assert.AreEqual ((float)64, ((SqlSingle)TestSingle64).Value, "#Y01"); } -#if NET_2_0 [Test] public void GetXsdTypeTest () { XmlQualifiedName qualifiedName = SqlSingle.GetXsdType (null); NUnit.Framework.Assert.AreEqual ("float", qualifiedName.Name, "#A01"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs index a8230d0310d..092ac25e6ca 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlStringTest.cs @@ -33,14 +33,10 @@ using System; using System.Data.SqlTypes; using System.Globalization; -#if NET_2_0 using System.IO; -#endif using System.Threading; using System.Xml; -#if NET_2_0 using System.Xml.Serialization; -#endif using NUnit.Framework; @@ -699,7 +695,6 @@ namespace MonoTests.System.Data.SqlTypes Assert.AreEqual ("Test String", ((SqlString)TestString).Value, "#AD01"); } -#if NET_2_0 [Test] public void AddSqlString() { @@ -754,6 +749,5 @@ namespace MonoTests.System.Data.SqlTypes ReadWriteXmlTestInternal (xml1, strtest1, "BA01"); ReadWriteXmlTestInternal (xml2, strtest2.ToString (), "BA02"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlXmlTest.cs b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlXmlTest.cs index 61a7a5e2994..3a728838bc7 100644 --- a/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlXmlTest.cs +++ b/mcs/class/System.Data/Test/System.Data.SqlTypes/SqlXmlTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data.SqlTypes; using System.Globalization; @@ -264,4 +263,3 @@ namespace MonoTests.System.Data.SqlTypes } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs b/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs index efbe64a1a4a..e8757625b95 100644 --- a/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs +++ b/mcs/class/System.Data/Test/System.Data/BinarySerializationTest.cs @@ -1,4 +1,3 @@ -#if NET_2_0 using System; using System.Data; @@ -752,5 +751,4 @@ public class BinarySerializationTest } } -#endif } diff --git a/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs b/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs index 35e876ff51f..0edfc96d681 100644 --- a/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DBConcurrencyExceptionTest.cs @@ -42,15 +42,9 @@ namespace MonoTests.System.Data DBConcurrencyException dbce = new DBConcurrencyException (); Assert.IsNull (dbce.InnerException, "InnerException"); Assert.IsNotNull (dbce.Message, "Message1"); -#if NET_2_0 Assert.IsNotNull (dbce.Message, "Message2:" + dbce.Message); -#else - Assert.AreEqual (new SystemException ().Message, dbce.Message, "Message2:" + dbce.Message); -#endif Assert.IsNull (dbce.Row, "Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "RowCount"); -#endif } [Test] // .ctor (String) @@ -63,9 +57,7 @@ namespace MonoTests.System.Data Assert.IsNull (dbce.InnerException, "#A:InnerException"); Assert.AreSame (msg, dbce.Message, "#A:Message:" + dbce.Message); Assert.IsNull (dbce.Row, "#A:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#A:RowCount"); -#endif dbce = new DBConcurrencyException ((string) null); Assert.IsNull (dbce.InnerException, "#B:InnerException"); @@ -73,17 +65,13 @@ namespace MonoTests.System.Data Assert.IsTrue (dbce.Message.IndexOf (typeof (DBConcurrencyException).FullName) != -1, "#B:Message2:" + dbce.Message); Assert.IsNull (dbce.Row, "#B:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#B:RowCount"); -#endif dbce = new DBConcurrencyException (string.Empty); Assert.IsNull (dbce.InnerException, "#C:InnerException"); Assert.AreEqual (string.Empty, dbce.Message, "#C:Message"); Assert.IsNull (dbce.Row, "#C:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#C:RowCount"); -#endif } [Test] // .ctor (String, Exception) @@ -97,44 +85,33 @@ namespace MonoTests.System.Data Assert.AreSame (inner, dbce.InnerException, "#A:InnerException"); Assert.AreSame (msg, dbce.Message, "#A:Message:" + dbce.Message); Assert.IsNull (dbce.Row, "#A:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#A:RowCount"); -#endif dbce = new DBConcurrencyException ((string) null, inner); Assert.AreSame (inner, dbce.InnerException, "#B:InnerException"); Assert.IsTrue (dbce.Message.IndexOf (typeof (DBConcurrencyException).FullName) != -1, "#B:Message:" + dbce.Message); Assert.IsNull (dbce.Row, "#B:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#B:RowCount"); -#endif dbce = new DBConcurrencyException (string.Empty, inner); Assert.AreSame (inner, dbce.InnerException, "#C:InnerException"); Assert.AreEqual (string.Empty, dbce.Message, "#C:Message"); Assert.IsNull (dbce.Row, "#C:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#C:RowCount"); -#endif dbce = new DBConcurrencyException (msg, (Exception) null); Assert.IsNull (dbce.InnerException, "#D:InnerException"); Assert.AreSame (msg, dbce.Message, "#D:Message:" + dbce.Message); Assert.IsNull (dbce.Row, "#D:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#D:RowCount"); -#endif dbce = new DBConcurrencyException ((string) null, (Exception) null); Assert.IsNull (dbce.InnerException, "#E:InnerException"); Assert.IsTrue (dbce.Message.IndexOf (typeof (DBConcurrencyException).FullName) != -1, "#E:Message:" + dbce.Message); Assert.IsNull (dbce.Row, "#E:Row"); -#if NET_2_0 Assert.AreEqual (0, dbce.RowCount, "#E:RowCount"); -#endif } -#if NET_2_0 [Test] // .ctor (String, Exception, DataRow []) public void Constructor4 () { @@ -188,7 +165,6 @@ namespace MonoTests.System.Data Assert.IsNull (dbce.Row, "#F:Row"); Assert.AreEqual (0, dbce.RowCount, "#F:RowCount"); } -#endif [Test] public void Row () @@ -200,19 +176,13 @@ namespace MonoTests.System.Data DBConcurrencyException dbce = new DBConcurrencyException (); dbce.Row = rowA; Assert.AreSame (rowA, dbce.Row, "#A:Row"); -#if NET_2_0 Assert.AreEqual (1, dbce.RowCount, "#A:RowCount"); -#endif dbce.Row = rowB; Assert.AreSame (rowB, dbce.Row, "#B:Row"); -#if NET_2_0 Assert.AreEqual (1, dbce.RowCount, "#B:RowCount"); -#endif dbce.Row = null; Assert.IsNull (dbce.Row, "#C:Row"); -#if NET_2_0 Assert.AreEqual (1, dbce.RowCount, "#C:RowCount"); -#endif } } } diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs b/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs index 000a84414c9..2937ce4ad70 100644 --- a/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataColumnCollectionTest2.cs @@ -749,11 +749,7 @@ namespace MonoTests.System.Data Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2");
Assert.IsNull (ex.InnerException, "#3");
Assert.IsNotNull (ex.Message, "#4");
-#if NET_2_0
Assert.AreEqual ("name", ex.ParamName, "#5");
-#else
- Assert.AreEqual ("key", ex.ParamName, "#5");
-#endif
}
}
diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnTest.cs b/mcs/class/System.Data/Test/System.Data/DataColumnTest.cs index ac7ceebb4ce..350a289012c 100644 --- a/mcs/class/System.Data/Test/System.Data/DataColumnTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataColumnTest.cs @@ -167,7 +167,6 @@ namespace MonoTests.System.Data Assert.AreEqual (string.Empty, col.Caption, "#3"); } -#if NET_2_0 [Test] public void DateTimeMode_Valid () { @@ -215,7 +214,6 @@ namespace MonoTests.System.Data Assert.IsNull (ex.ParamName, "#7"); } } -#endif [Test] public void ForColumnNameException() @@ -332,7 +330,6 @@ namespace MonoTests.System.Data public void Defaults3 () { DataColumn col = new DataColumn ("foo", typeof (SqlBoolean)); -#if NET_2_0 Assert.AreEqual (SqlBoolean.Null, col.DefaultValue, "#1"); col.DefaultValue = SqlBoolean.True; // FIXME: not working yet @@ -340,19 +337,10 @@ namespace MonoTests.System.Data //Assert.AreEqual (SqlBoolean.True, col.DefaultValue, "#2"); // not bool but SqlBoolean col.DefaultValue = DBNull.Value; Assert.AreEqual (SqlBoolean.Null, col.DefaultValue, "#3"); // not DBNull -#else - Assert.AreEqual (DBNull.Value, col.DefaultValue, "#1"); - col.DefaultValue = SqlBoolean.True; - col.DefaultValue = DBNull.Value; -#endif } [Test] -#if NET_2_0 [ExpectedException (typeof (DataException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void ChangeTypeAfterSettingDefaultValue () { DataColumn col = new DataColumn ("foo", typeof (SqlBoolean)); diff --git a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs index 096c72fd1cf..ad6b6d8797a 100644 --- a/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataColumnTest2.cs @@ -835,7 +835,6 @@ namespace MonoTests.System.Data Assert.AreEqual (-1, ptable.Rows [1][1], "#2"); } -#if NET_2_0 [Test] public void DateTimeMode_DataType () { @@ -926,7 +925,6 @@ namespace MonoTests.System.Data Assert.Fail ("#10"); } catch (ArgumentOutOfRangeException e) { } } -#endif [Test] public void bug672113_MulpleColConstraint () { diff --git a/mcs/class/System.Data/Test/System.Data/DataRelationTest2.cs b/mcs/class/System.Data/Test/System.Data/DataRelationTest2.cs index 1b0fbb703c1..5e1c8f0578a 100644 --- a/mcs/class/System.Data/Test/System.Data/DataRelationTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataRelationTest2.cs @@ -551,7 +551,6 @@ namespace MonoTests.System.Data Assert.AreEqual ("Relation2", dr.RelationName, "#1"); } -#if NET_2_0 [Test] public void DataRelationTest() { @@ -576,6 +575,5 @@ namespace MonoTests.System.Data Assert.Fail ("#1"); } catch (InvalidConstraintException) { } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs b/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs index cc42664fcab..02f6a07afea 100644 --- a/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataRowCollectionTest.cs @@ -759,7 +759,6 @@ namespace MonoTests.System.Data Assert.AreEqual ("c", Rows [0] [0], "test#19"); } -#if NET_2_0 [Test] public void IndexOf () { DataSet ds = new DataSet (); @@ -826,7 +825,6 @@ namespace MonoTests.System.Data Assert.AreEqual (-1, dt.Rows.IndexOf (dr3)); Assert.AreEqual (-1, dt.Rows.IndexOf (null)); } -#endif [Test] public void Find_DoesntThrowWithNullObjectInArray () // Novell bug 519648 diff --git a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs index e3e7aac2857..b928ce30234 100644 --- a/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataRowTest2.cs @@ -1165,63 +1165,26 @@ namespace MonoTests.System.Data Assert.IsFalse (dr.IsNull (dc1), "#B5"); Assert.AreEqual (1, _eventsFired.Count, "#B6"); -#if NET_2_0 dr [dc1] = null; -#else - try { - dr [dc1] = null; - Assert.Fail ("#B1"); - } catch (ArgumentException ex) { - // Cannot set Column 'Col1' to be null. - // Please use DBNull instead - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("'Col1'") != -1, "#B5"); - Assert.IsTrue (ex.Message.IndexOf ("DBNull") != -1, "#B6"); - Assert.AreEqual (2, _eventsFired.Count, "#B7"); - } - dr [dc1] = DBNull.Value; -#endif -#if NET_2_0 Assert.AreEqual (3, _eventsFired.Count, "#C1"); -#else - Assert.AreEqual (4, _eventsFired.Count, "#C1"); -#endif Assert.AreEqual (addressA, dr [dc0], "#C2"); Assert.IsFalse (dr.IsNull (dc0), "#C3"); Assert.AreSame (DBNull.Value, dr [dc1], "#C4"); Assert.IsTrue (dr.IsNull (dc1), "#C5"); -#if NET_2_0 Assert.AreEqual (3, _eventsFired.Count, "#C6"); -#else - Assert.AreEqual (4, _eventsFired.Count, "#C6"); -#endif dr [dc0] = DBNull.Value; -#if NET_2_0 Assert.AreEqual (5, _eventsFired.Count, "#D1"); -#else - Assert.AreEqual (6, _eventsFired.Count, "#D1"); -#endif Assert.AreSame (DBNull.Value, dr [dc0], "#D2"); Assert.IsTrue (dr.IsNull (dc0), "#D3"); Assert.AreSame (DBNull.Value, dr [dc1], "#D4"); Assert.IsTrue (dr.IsNull (dc1), "#D5"); -#if NET_2_0 Assert.AreEqual (5, _eventsFired.Count, "#D6"); -#else - Assert.AreEqual (6, _eventsFired.Count, "#D6"); -#endif dr.BeginEdit (); dr [dc1] = personC; -#if NET_2_0 Assert.AreEqual (7, _eventsFired.Count, "#E1"); -#else - Assert.AreEqual (8, _eventsFired.Count, "#E1"); -#endif Assert.AreSame (DBNull.Value, dr [dc0], "#E2"); Assert.IsTrue (dr.IsNull (dc0), "#E3"); Assert.AreEqual (personC, dr [dc1], "#E4"); @@ -1231,63 +1194,35 @@ namespace MonoTests.System.Data Assert.IsTrue (dr.IsNull (dc0), "#E7"); Assert.AreEqual (personC, dr [dc1], "#E8"); Assert.IsFalse (dr.IsNull (dc1), "#E9"); -#if NET_2_0 Assert.AreEqual (7, _eventsFired.Count, "#E10"); -#else - Assert.AreEqual (8, _eventsFired.Count, "#E10"); -#endif dr [dc1] = DBNull.Value; -#if NET_2_0 Assert.AreEqual (9, _eventsFired.Count, "#F1"); -#else - Assert.AreEqual (10, _eventsFired.Count, "#F1"); -#endif Assert.AreSame (DBNull.Value, dr [dc0], "#F2"); Assert.IsTrue (dr.IsNull (dc0), "#F3"); Assert.AreSame (DBNull.Value, dr [dc1], "#F4"); Assert.IsTrue (dr.IsNull (dc1), "#F5"); -#if NET_2_0 Assert.AreEqual (9, _eventsFired.Count, "#F6"); -#else - Assert.AreEqual (10, _eventsFired.Count, "#F6"); -#endif dr [dc2] = null; -#if NET_2_0 Assert.AreEqual (11, _eventsFired.Count, "#G1"); -#else - Assert.AreEqual (12, _eventsFired.Count, "#G1"); -#endif Assert.AreSame (DBNull.Value, dr [dc0], "#G2"); Assert.IsTrue (dr.IsNull (dc0), "#G3"); Assert.AreSame (DBNull.Value, dr [dc1], "#G4"); Assert.IsTrue (dr.IsNull (dc1), "#G5"); Assert.AreSame (DBNull.Value, dr [dc2], "#G6"); Assert.IsTrue (dr.IsNull (dc2), "#G7"); -#if NET_2_0 Assert.AreEqual (11, _eventsFired.Count, "#G8"); -#else - Assert.AreEqual (12, _eventsFired.Count, "#G8"); -#endif dr [dc2] = DBNull.Value; -#if NET_2_0 Assert.AreEqual (13, _eventsFired.Count, "#H1"); -#else - Assert.AreEqual (14, _eventsFired.Count, "#H1"); -#endif Assert.AreSame (DBNull.Value, dr [dc0], "#H2"); Assert.IsTrue (dr.IsNull (dc0), "#H3"); Assert.AreSame (DBNull.Value, dr [dc1], "#H4"); Assert.IsTrue (dr.IsNull (dc1), "#H5"); Assert.AreSame (DBNull.Value, dr [dc2], "#H6"); Assert.IsTrue (dr.IsNull (dc2), "#H7"); -#if NET_2_0 Assert.AreEqual (13, _eventsFired.Count, "#H8"); -#else - Assert.AreEqual (14, _eventsFired.Count, "#H8"); -#endif int index = 0; @@ -1318,11 +1253,7 @@ namespace MonoTests.System.Data Assert.AreEqual ("ColumnChanged", evt.Name, "#L1"); colChangeArgs = (DataColumnChangeEventArgs) evt.Args; Assert.AreSame (dc1, colChangeArgs.Column, "#L2"); -#if NET_2_0 Assert.IsNull (colChangeArgs.ProposedValue, "#L3"); -#else - Assert.AreSame (DBNull.Value, colChangeArgs.ProposedValue, "#L3"); -#endif Assert.AreSame (dt.Rows [0], colChangeArgs.Row, "#L4"); evt = (EventInfo) _eventsFired [index++]; @@ -1487,23 +1418,7 @@ namespace MonoTests.System.Data Assert.AreSame (personA, dr [1], "#B3"); Assert.IsFalse (dr.IsNull (1), "#B4"); -#if NET_2_0 dr [1] = null; -#else - try { - dr [1] = null; - Assert.Fail ("#B1"); - } catch (ArgumentException ex) { - // Cannot set Column 'Col1' to be null. - // Please use DBNull instead - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("'Col1'") != -1, "#B5"); - Assert.IsTrue (ex.Message.IndexOf ("DBNull") != -1, "#B6"); - } - dr [1] = DBNull.Value; -#endif Assert.AreEqual (addressA, dr [0], "#C1"); Assert.IsFalse (dr.IsNull (0), "#C2"); @@ -1657,11 +1572,7 @@ namespace MonoTests.System.Data Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); Assert.IsNotNull (ex.Message, "#A4"); -#if NET_2_0 Assert.AreEqual ("name", ex.ParamName, "#A5"); -#else - Assert.AreEqual ("key", ex.ParamName, "#A5"); -#endif } try { @@ -1671,11 +1582,7 @@ namespace MonoTests.System.Data Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); -#if NET_2_0 Assert.AreEqual ("name", ex.ParamName, "#B5"); -#else - Assert.AreEqual ("key", ex.ParamName, "#B5"); -#endif } } @@ -1718,23 +1625,7 @@ namespace MonoTests.System.Data Assert.AreSame (personA, dr ["Col1"], "#B3"); Assert.IsFalse (dr.IsNull ("Col1"), "#B4"); -#if NET_2_0 dr ["Col1"] = null; -#else - try { - dr ["Col1"] = null; - Assert.Fail ("#B1"); - } catch (ArgumentException ex) { - // Cannot set Column 'Col1' to be null. - // Please use DBNull instead - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("'Col1'") != -1, "#B5"); - Assert.IsTrue (ex.Message.IndexOf ("DBNull") != -1, "#B6"); - } - dr ["Col1"] = DBNull.Value; -#endif Assert.AreEqual (addressA, dr ["Col0"], "#C1"); Assert.IsFalse (dr.IsNull ("Col0"), "#C2"); @@ -2867,7 +2758,6 @@ namespace MonoTests.System.Data _rowChanged = true; } -#if NET_2_0 [Test] public void SetAdded_test() { @@ -2981,7 +2871,6 @@ namespace MonoTests.System.Data table.RejectChanges (); Assert.AreEqual(row.RowState, DataRowState.Unchanged, "#3"); } -#endif [Test] public void DataRowExpressionDefaultValueTest () { diff --git a/mcs/class/System.Data/Test/System.Data/DataSet1.Designer.cs b/mcs/class/System.Data/Test/System.Data/DataSet1.Designer.cs index ee5198993b3..9cfb3cb8092 100644 --- a/mcs/class/System.Data/Test/System.Data/DataSet1.Designer.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSet1.Designer.cs @@ -7,7 +7,6 @@ // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ -#if NET_2_0 #pragma warning disable 1591 @@ -492,4 +491,3 @@ namespace MonoTests.System.Data { #pragma warning restore 1591 -#endif
\ No newline at end of file diff --git a/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs b/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs index 204a6ee9a71..b2568cc65b8 100644 --- a/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetInferXmlSchemaTest.cs @@ -324,17 +324,9 @@ namespace MonoTests.System.Data DataSet ds = GetDataSet (xml11, null); AssertDataSet ("ds", ds, "NewDataSet", 1, 0); DataTable dt = ds.Tables [0]; -#if NET_2_0 AssertDataTable ("dt", dt, "root", 1, 0, 0, 0, 0, 0); -#else - AssertDataTable ("dt", dt, "root", 2, 0, 0, 0, 0, 0); -#endif AssertDataColumn ("element", dt.Columns [0], "child_after_significant_space", true, false, 0, 1, "child_after_significant_space", MappingType.Element, typeof (string), DBNull.Value, String.Empty, -1, String.Empty, 0, String.Empty, false, false); -#if NET_2_0 Assert.AreEqual (1, dt.Columns.Count, "xml:space is not treated as column"); -#else - AssertDataColumn ("xml:space", dt.Columns [1], "space", true, false, 0, 1, "space", MappingType.Attribute, typeof (string), DBNull.Value, String.Empty, -1, "http://www.w3.org/XML/1998/namespace", 1, "xml", false, false); -#endif } [Test] diff --git a/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs b/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs index a8d26bdae3b..59bfa192186 100644 --- a/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetReadXmlTest.cs @@ -695,17 +695,10 @@ namespace MonoTests.System.Data Assert.AreEqual (0, ds.Tables [0].Columns [0].Ordinal, "#4b");
Assert.AreEqual ("FirstName", ds.Tables [0].Columns [1].ColumnName, "#5a");
Assert.AreEqual (1, ds.Tables [0].Columns [1].Ordinal, "#5b");
-#if NET_2_0
Assert.AreEqual ("Address", ds.Tables [0].Columns [2].ColumnName, "#6a");
Assert.AreEqual (2, ds.Tables [0].Columns [2].Ordinal, "#6b");
Assert.AreEqual ("Income", ds.Tables [0].Columns [3].ColumnName, "#7a");
Assert.AreEqual (3, ds.Tables [0].Columns [3].Ordinal, "#7b");
-#else
- Assert.AreEqual ("Income", ds.Tables [0].Columns [2].ColumnName, "#6a");
- Assert.AreEqual (2, ds.Tables [0].Columns [2].Ordinal, "#6b");
- Assert.AreEqual ("Address", ds.Tables [0].Columns [3].ColumnName, "#7a");
- Assert.AreEqual (3, ds.Tables [0].Columns [3].Ordinal, "#7b");
-#endif
}
[Test] // bug #80048
@@ -730,7 +723,6 @@ namespace MonoTests.System.Data DataSet ds = new DataSet ();
ds.ReadXml (new StringReader (xml));
-#if NET_2_0
Assert.AreEqual (1, ds.Tables.Count, "#1");
Assert.AreEqual ("Table", ds.Tables [0].TableName, "#2");
Assert.AreEqual (3, ds.Tables [0].Columns.Count, "#3");
@@ -740,25 +732,6 @@ namespace MonoTests.System.Data Assert.AreEqual (1, ds.Tables [0].Columns [1].Ordinal, "#5b");
Assert.AreEqual ("Income", ds.Tables [0].Columns [2].ColumnName, "#6a");
Assert.AreEqual (2, ds.Tables [0].Columns [2].Ordinal, "#6b");
-#else
- Assert.AreEqual (2, ds.Tables.Count, "#1");
- Assert.AreEqual ("Table", ds.Tables [0].TableName, "#2");
- Assert.AreEqual (3, ds.Tables [0].Columns.Count, "#3");
- Assert.AreEqual ("Name", ds.Tables [0].Columns [0].ColumnName, "#4a");
- Assert.AreEqual (0, ds.Tables [0].Columns [0].Ordinal, "#4b");
- Assert.AreEqual ("Table_Id", ds.Tables [0].Columns [1].ColumnName, "#5a");
- Assert.AreEqual (1, ds.Tables [0].Columns [1].Ordinal, "#5b");
- Assert.AreEqual ("Income", ds.Tables [0].Columns [2].ColumnName, "#6a");
- Assert.AreEqual (2, ds.Tables [0].Columns [2].Ordinal, "#6b");
- Assert.AreEqual ("FirstName", ds.Tables [1].TableName, "#7");
- Assert.AreEqual (3, ds.Tables [1].Columns.Count, "#8");
- Assert.AreEqual ("space", ds.Tables [1].Columns [0].ColumnName, "#9a");
- Assert.AreEqual (0, ds.Tables [1].Columns [0].Ordinal, "#9b");
- Assert.AreEqual ("FirstName_Text", ds.Tables [1].Columns [1].ColumnName, "#10a");
- Assert.AreEqual (1, ds.Tables [1].Columns [1].Ordinal, "#10b");
- Assert.AreEqual ("Table_Id", ds.Tables [1].Columns [2].ColumnName, "#11a");
- Assert.AreEqual (2, ds.Tables [1].Columns [2].Ordinal, "#11b");
-#endif
}
public void TestSameParentChildName ()
diff --git a/mcs/class/System.Data/Test/System.Data/DataSetTest.cs b/mcs/class/System.Data/Test/System.Data/DataSetTest.cs index faba7c394ee..06d86df575e 100644 --- a/mcs/class/System.Data/Test/System.Data/DataSetTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetTest.cs @@ -134,11 +134,7 @@ namespace MonoTests.System.Data Assert.AreEqual ("Element", column2.ColumnMapping.ToString (), "test#33"); Assert.AreEqual ("second", column2.ColumnName, "test#34"); Assert.AreEqual ("System.Data.SqlTypes.SqlGuid", column2.DataType.ToString (), "test#35"); -#if NET_2_0 Assert.AreEqual (SqlGuid.Null, column2.DefaultValue, "test#36"); -#else - Assert.AreEqual (DBNull.Value, column2.DefaultValue, "test#36"); -#endif Assert.IsFalse (column2.DesignMode, "test#37"); Assert.AreEqual ("", column2.Expression, "test#38"); Assert.AreEqual (-1, column2.MaxLength, "test#39"); @@ -224,11 +220,7 @@ namespace MonoTests.System.Data TextString = TextString.Substring (TextString.IndexOf(EOL) + EOL.Length); // This is original DataSet.WriteXmlSchema() output // Assert.AreEqual (" <xs:element name=\"test_dataset\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\">", substring, "test#03"); -#if !NET_2_0 - Assert.AreEqual (" <xs:element msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\" name=\"test_dataset\">", substring, "test#03"); -#else Assert.AreEqual (" <xs:element msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\" name=\"test_dataset\">", substring, "test#03"); -#endif substring = TextString.Substring (0, TextString.IndexOf(EOL)); TextString = TextString.Substring (TextString.IndexOf(EOL) + EOL.Length); @@ -287,10 +279,8 @@ namespace MonoTests.System.Data Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=2.0.5.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" name=\"second\" type=\"xs:string\" />", substring, "test#16"); #elif NET_4_0 Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" name=\"second\" type=\"xs:string\" />", substring, "test#16"); -#elif NET_2_0 - Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" name=\"second\" type=\"xs:string\" />", substring, "test#16"); #else - #error "Unknown profile" + Assert.AreEqual (" <xs:element minOccurs=\"0\" msdata:DataType=\"System.Data.SqlTypes.SqlGuid, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\" name=\"second\" type=\"xs:string\" />", substring, "test#16"); #endif if (substring.IndexOf ("<xs:element") < 0) Assert.Fail ("test#16: " + substring); @@ -1053,11 +1043,7 @@ namespace MonoTests.System.Data // see GetReady() for current culture string xml = "<?xml version='1.0' encoding='utf-16'?><DataSet><xs:schema id='DS' xmlns='' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata'><xs:element name='DS' msdata:IsDataSet='true' " + -#if !NET_2_0 - "msdata:Locale='fi-FI'" -#else "msdata:UseCurrentLocale='true'" -#endif + "><xs:complexType><xs:choice minOccurs='0' maxOccurs='unbounded' /></xs:complexType></xs:element></xs:schema><diffgr:diffgram xmlns:msdata='urn:schemas-microsoft-com:xml-msdata' xmlns:diffgr='urn:schemas-microsoft-com:xml-diffgram-v1' /></DataSet>"; DataSet ds = new DataSet (); ds.DataSetName = "DS"; @@ -1513,11 +1499,7 @@ namespace MonoTests.System.Data string schema = @"<?xml version='1.0' encoding='utf-16'?> <xs:schema id='myDataSet' targetNamespace='NetFrameWork' xmlns:mstns='NetFrameWork' xmlns='NetFrameWork' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:msdata='urn:schemas-microsoft-com:xml-msdata' attributeFormDefault='qualified' elementFormDefault='qualified'> <xs:element name='myDataSet' msdata:IsDataSet='true' " + -#if NET_2_0 "msdata:UseCurrentLocale='true'" -#else - "msdata:Locale='fi-FI'" -#endif + @"> <xs:complexType> <xs:choice minOccurs='0' maxOccurs='unbounded'> @@ -1576,11 +1558,7 @@ namespace MonoTests.System.Data string xmlschema = @"<?xml version=""1.0"" encoding=""utf-16""?> <xs:schema id=""ExampleDataSet"" xmlns="""" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata""> <xs:element name=""ExampleDataSet"" msdata:IsDataSet=""true"" "; -#if NET_2_0 xmlschema = xmlschema + "msdata:UseCurrentLocale=\"true\""; -#else - xmlschema = xmlschema + "msdata:Locale=\"fi-FI\""; -#endif xmlschema = xmlschema + @"> <xs:complexType> <xs:choice minOccurs=""0"" maxOccurs=""unbounded""> @@ -1625,11 +1603,7 @@ namespace MonoTests.System.Data string xmlschema = @"<?xml version=""1.0"" encoding=""utf-16""?> <xs:schema id=""Example"" xmlns="""" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata""> "; -#if NET_2_0 xmlschema = xmlschema + " <xs:element name=\"Example\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\""; -#else - xmlschema = xmlschema + " <xs:element name=\"Example\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\""; -#endif xmlschema = xmlschema + @"> <xs:complexType> <xs:choice minOccurs=""0"" maxOccurs=""unbounded""> @@ -1673,11 +1647,7 @@ namespace MonoTests.System.Data string xmlschema = @"<?xml version=""1.0"" encoding=""utf-16""?> <xs:schema id=""Example"" xmlns="""" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata""> "+ -#if NET_2_0 " <xs:element name=\"Example\" msdata:IsDataSet=\"true\" msdata:UseCurrentLocale=\"true\"" -#else -" <xs:element name=\"Example\" msdata:IsDataSet=\"true\" msdata:Locale=\"fi-FI\"" -#endif + @"> <xs:complexType> <xs:choice minOccurs=""0"" maxOccurs=""unbounded""> @@ -1787,11 +1757,7 @@ namespace MonoTests.System.Data string xmlschema = @"<?xml version=""1.0"" encoding=""utf-16""?> <xs:schema id=""Example"" xmlns="""" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata""> "+ -#if NET_2_0 @" <xs:element name=""Example"" msdata:IsDataSet=""true"" msdata:UseCurrentLocale=""true""" -#else - @" <xs:element name=""Example"" msdata:IsDataSet=""true"" msdata:Locale=""fi-FI""" -#endif + @"> <xs:complexType> <xs:choice minOccurs=""0"" maxOccurs=""unbounded""> @@ -1851,11 +1817,7 @@ namespace MonoTests.System.Data string xml = @"<?xml version=""1.0"" encoding=""utf-16""?> <xs:schema id=""NewDataSet"" xmlns="""" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata"" xmlns:msprop=""urn:schemas-microsoft-com:xml-msprop""> " + -#if NET_2_0 @" <xs:element name=""NewDataSet"" msdata:IsDataSet=""true"" msdata:UseCurrentLocale=""true"" msprop:version=""version 2.1"">" -#else -@" <xs:element name=""NewDataSet"" msdata:IsDataSet=""true"" msdata:Locale=""fi-FI"" msprop:version=""version 2.1"">" -#endif + @" <xs:complexType> <xs:choice minOccurs=""0"" maxOccurs=""unbounded""> @@ -1893,11 +1855,7 @@ namespace MonoTests.System.Data string xml = @"<Example> <xs:schema id=""Example"" xmlns="""" xmlns:xs=""http://www.w3.org/2001/XMLSchema"" xmlns:msdata=""urn:schemas-microsoft-com:xml-msdata""> " + -#if NET_2_0 @" <xs:element name=""Example"" msdata:IsDataSet=""true"" msdata:UseCurrentLocale=""true"">" -#else -@" <xs:element name=""Example"" msdata:IsDataSet=""true"" msdata:Locale=""fi-FI"">" -#endif + @" <xs:complexType> <xs:choice minOccurs=""0"" maxOccurs=""unbounded""> @@ -2292,7 +2250,6 @@ namespace MonoTests.System.Data writer.GetStringBuilder ().ToString ())); } -#if NET_2_0 // it is basically a test for XmlSerializer, but I need it // here to not add dependency on sys.data.dll in sys.xml test. @@ -2619,7 +2576,6 @@ namespace MonoTests.System.Data } #endregion // DataSet.CreateDataReader Tests and DataSet.Load Tests -#endif } diff --git a/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs b/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs index 6e338558389..69525dac28c 100644 --- a/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetTest2.cs @@ -3154,7 +3154,6 @@ namespace MonoTests.System.Data Assert.AreEqual(0, pc.Count , "DS374"); } -#if NET_2_0 // Test for bug #76517 [Test] public void SchemaSerializationModeTest () { @@ -3168,7 +3167,6 @@ namespace MonoTests.System.Data //ok } } -#endif ///<?xml version="1.0" encoding="utf-16"?> ///<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> @@ -3485,7 +3483,6 @@ namespace MonoTests.System.Data Assert.AreEqual (typeof (string), ds.Tables [0].Columns [0].DataType, "#5"); } -#if NET_2_0 [Test] public void MergeTest_SameDataSet_536194 () { @@ -3498,9 +3495,7 @@ namespace MonoTests.System.Data dataSet.Merge(dataTable); Assert.AreEqual (1, dataSet.Tables.Count, "1"); } -#endif -#if NET_2_0 [Test] public void LoadTest1 () { @@ -3597,7 +3592,6 @@ namespace MonoTests.System.Data i++; } } -#endif private void AssertDataTableValues (DataTable dt) { Assert.AreEqual ("data1", dt.Rows[0]["_ID"], "1"); diff --git a/mcs/class/System.Data/Test/System.Data/DataSetTypedDataSetTest.cs b/mcs/class/System.Data/Test/System.Data/DataSetTypedDataSetTest.cs index 72cbc19e776..357c2b3ef5b 100644 --- a/mcs/class/System.Data/Test/System.Data/DataSetTypedDataSetTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataSetTypedDataSetTest.cs @@ -197,7 +197,6 @@ namespace MonoTests.System.Data DataRow[] drArr2 = ds.Orders[0].GetChildRows(ds.Relations[0]); Assert.AreEqual(drArr1 ,drArr2,"TDS25"); -#if NET_2_0 //now test serialization of a typed dataset generated by microsoft's xsd.exe DataSet1 ds1 = new DataSet1(); ds1.DataTable1.AddDataTable1Row("test"); @@ -247,7 +246,6 @@ namespace MonoTests.System.Data } else { Assert.Fail("Invalid entry for Column1"); } -#endif } protected void T_Changing(object sender, myTypedDataSet.OrdersRowChangeEvent e) diff --git a/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs b/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs index 053825e3501..4e1c161cd69 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableCollectionTest2.cs @@ -472,7 +472,6 @@ namespace MonoTests.System.Data ds.Tables.RemoveAt(0); //Parent table } -#if NET_2_0 [Test] public void AddTable_DiffNamespaceTest () { @@ -550,6 +549,5 @@ namespace MonoTests.System.Data Assert.Fail ("#5"); } catch (ArgumentException e) { } } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data/DataTableLoadRowTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableLoadRowTest.cs index 06925e6b602..cc2ca7dbceb 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableLoadRowTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableLoadRowTest.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.Data; @@ -553,4 +552,3 @@ namespace MonoTests.System.Data.SqlClient } } -#endif // NET_2_0 diff --git a/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs index 13f46ad9858..8950dc2edfe 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableReadWriteXmlTest.cs @@ -23,7 +23,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data; using System.IO; @@ -373,4 +372,3 @@ namespace MonoTests.System.Data } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/DataTableReadXmlSchemaTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableReadXmlSchemaTest.cs index 2a11c21a033..c7d78cff768 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableReadXmlSchemaTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableReadXmlSchemaTest.cs @@ -29,7 +29,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -642,4 +641,3 @@ namespace MonoTests.System.Data } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/DataTableReaderTest.cs b/mcs/class/System.Data/Test/System.Data/DataTableReaderTest.cs index 9d04ece51b8..4ad9e57c96f 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableReaderTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableReaderTest.cs @@ -29,7 +29,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data; @@ -795,4 +794,3 @@ namespace MonoTests.System.Data } } -#endif // NET_2_0 diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs index bed6e55e50c..8a41f8fc57c 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableTest2.cs @@ -2404,7 +2404,6 @@ namespace MonoTests.System.Data Assert.AreEqual (6, result [0][0], "# incorrect sorting order"); } -#if NET_2_0 [Test] public void DataTable_Clone () { @@ -2521,7 +2520,6 @@ namespace MonoTests.System.Data Assert.AreEqual (2, t3.Rows.Count, "#4"); Assert.AreEqual (1, t3.Rows [0][1], "#5"); } -#endif internal class DataRowsComparer : IComparer<DataRow> { diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs index c706778c67b..605655bb369 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableTest3.cs @@ -23,7 +23,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data; using System.IO; @@ -757,4 +756,3 @@ namespace MonoTests.System.Data } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs index c7cb3a35e85..0c6af80cc23 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableTest4.cs @@ -23,7 +23,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data; using System.Collections; @@ -2057,4 +2056,3 @@ namespace MonoTests.System.Data } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs b/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs index 0cacc8ea9ef..ef11b3d520a 100644 --- a/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs +++ b/mcs/class/System.Data/Test/System.Data/DataTableTest5.cs @@ -23,7 +23,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; using System.Data; @@ -1149,4 +1148,3 @@ namespace MonoTests.System.Data } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/DataViewTest.cs b/mcs/class/System.Data/Test/System.Data/DataViewTest.cs index ac68e08fbb3..0772177a2ab 100644 --- a/mcs/class/System.Data/Test/System.Data/DataViewTest.cs +++ b/mcs/class/System.Data/Test/System.Data/DataViewTest.cs @@ -438,7 +438,6 @@ namespace MonoTests.System.Data AssertEquals ("#4", 2, table.Columns.Count); } -#if NET_2_0 private bool dvInitialized; private void OnDataViewInitialized (object src, EventArgs args) { @@ -473,7 +472,6 @@ namespace MonoTests.System.Data AssertEquals ("#4", 2, table.Columns.Count); AssertEquals("DataViewInitialized #5", dvInitialized, true); } -#endif [Test] [ExpectedException(typeof(ArgumentException))] @@ -937,7 +935,6 @@ table changed. [Test] public void DefaultColumnNameAddListChangedTest () { -#if NET_2_0 string result = @"setting table... ---- OnListChanged PropertyDescriptorChanged,0,0 ----- UpdateIndex : True @@ -956,30 +953,6 @@ table was set. ---- OnListChanged PropertyDescriptorAdded,0,0 add a column with an empty name. "; -#else - string result = @"setting table... ----- OnListChanged PropertyDescriptorChanged,0,0 ------ UpdateIndex : True ----- OnListChanged Reset,-1,-1 -table was set. ----- OnListChanged PropertyDescriptorChanged,0,0 ----- OnListChanged PropertyDescriptorAdded,0,0 - default named column added. ----- OnListChanged PropertyDescriptorAdded,0,0 - non-default named column added. ----- OnListChanged PropertyDescriptorChanged,0,0 ----- OnListChanged PropertyDescriptorAdded,0,0 - another default named column added (Column2). ----- OnListChanged PropertyDescriptorAdded,0,0 - add a column with the same name as the default columnnames. ----- OnListChanged PropertyDescriptorChanged,0,0 ----- OnListChanged PropertyDescriptorAdded,0,0 - add a column with a null name. ----- OnListChanged PropertyDescriptorChanged,0,0 ----- OnListChanged PropertyDescriptorAdded,0,0 - add a column with an empty name. -"; -#endif eventWriter = new StringWriter (); DataTable dt = new DataTable ("table"); ComplexEventSequence1View dv = diff --git a/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs b/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs index 58ca232fb53..54f46f24bfe 100644 --- a/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/DataViewTest2.cs @@ -1166,7 +1166,6 @@ namespace MonoTests.System.Data Assert.AreEqual(DataViewRowState.CurrentRows, view.RowStateFilter, "#4"); } -#if NET_2_0 [Test] public void TestEquals_SameTableDiffViewProp() { @@ -1342,6 +1341,5 @@ namespace MonoTests.System.Data Assert.AreEqual (2, newTable1.Rows [1][1], "#16"); Assert.AreEqual (1, newTable1.Rows [2][1], "#17"); } -#endif } } diff --git a/mcs/class/System.Data/Test/System.Data/DataViewTest_IBindingListView.cs b/mcs/class/System.Data/Test/System.Data/DataViewTest_IBindingListView.cs index 36cc577f134..e0bec75934a 100644 --- a/mcs/class/System.Data/Test/System.Data/DataViewTest_IBindingListView.cs +++ b/mcs/class/System.Data/Test/System.Data/DataViewTest_IBindingListView.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -125,4 +124,3 @@ namespace MonoTests.System.Data } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs b/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs index 591fef23f04..c8c7cfcc7a0 100644 --- a/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs +++ b/mcs/class/System.Data/Test/System.Data/ForeignKeyConstraintTest2.cs @@ -610,7 +610,6 @@ namespace MonoTests.System.Data return ds1; } -#if NET_2_0 [Test] public void ForeignConstraint_DateTimeModeTest() { @@ -632,7 +631,6 @@ namespace MonoTests.System.Data Assert.Fail("#1"); } catch (InvalidOperationException e) {} } -#endif [Test] // bug #79689 public void ParentChildSameColumn () diff --git a/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs b/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs index 2e0fe018304..fa627afb1b3 100644 --- a/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs +++ b/mcs/class/System.Data/Test/System.Data/XmlDataLoaderTest.cs @@ -23,7 +23,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; using System.Data; @@ -80,4 +79,3 @@ namespace MonoTests.System.Data } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs b/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs index 9bff68d0b92..e39b5f5298d 100644 --- a/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs +++ b/mcs/class/System.Data/Test/System.Data/XmlDataReaderTest.cs @@ -23,7 +23,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Data; using System.Collections; @@ -252,5 +251,4 @@ namespace MonoTests.System.Data } } } -#endif diff --git a/mcs/class/System.Data/Test/System.Data/XmlExportOfTypedDataSetTest.cs b/mcs/class/System.Data/Test/System.Data/XmlExportOfTypedDataSetTest.cs index 541eabcb8e1..4debdad00d4 100644 --- a/mcs/class/System.Data/Test/System.Data/XmlExportOfTypedDataSetTest.cs +++ b/mcs/class/System.Data/Test/System.Data/XmlExportOfTypedDataSetTest.cs @@ -6,7 +6,6 @@ namespace MonoTests.System.Data [TestFixture] public class XmlExportOfTypedDataSetTest { -#if NET_2_0 [Test] public void ExportXmlSerializable_NestedClassMapping () { @@ -31,6 +30,5 @@ namespace MonoTests.System.Data xmlSchemaExporter.ExportMembersMapping (xmlMembersMapping); } -#endif } } diff --git a/mcs/class/System.Design/System.Windows.Forms.Design/ImageListImageEditor.cs b/mcs/class/System.Design/System.Windows.Forms.Design/ImageListImageEditor.cs index cea7263b86e..ebc8fc03cab 100644 --- a/mcs/class/System.Design/System.Windows.Forms.Design/ImageListImageEditor.cs +++ b/mcs/class/System.Design/System.Windows.Forms.Design/ImageListImageEditor.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && DRAWING_DESIGN_DEP +#if DRAWING_DESIGN_DEP using System; using System.ComponentModel; diff --git a/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionListsChangedEventArgsTest.cs b/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionListsChangedEventArgsTest.cs index e1aa61ef555..17c40819817 100644 --- a/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionListsChangedEventArgsTest.cs +++ b/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionListsChangedEventArgsTest.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.Collections; @@ -49,4 +48,3 @@ namespace MonoTests.System.ComponentModel.Design } } } -#endif diff --git a/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionMethodItemTest.cs b/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionMethodItemTest.cs index d8b9e375ddb..a3faac771c4 100644 --- a/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionMethodItemTest.cs +++ b/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionMethodItemTest.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.Collections; @@ -53,4 +52,3 @@ namespace MonoTests.System.ComponentModel.Design } } } -#endif diff --git a/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionPropertyItemTest.cs b/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionPropertyItemTest.cs index 06713a64f22..608f180abe9 100644 --- a/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionPropertyItemTest.cs +++ b/mcs/class/System.Design/Test/System.ComponentModel.Design/DesignerActionPropertyItemTest.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.Collections; @@ -52,4 +51,3 @@ namespace MonoTests.System.ComponentModel.Design } } } -#endif diff --git a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderBaseNameTests.cs b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderBaseNameTests.cs index 7000f91e70a..73d9c5a9721 100644 --- a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderBaseNameTests.cs +++ b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderBaseNameTests.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 NUnit.Framework; using System; @@ -171,4 +170,3 @@ namespace MonoTests.System.Resources.Tools { } } -#endif diff --git a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderCodeDomTest.cs b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderCodeDomTest.cs index 25a73944cbf..30bc1e1f465 100644 --- a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderCodeDomTest.cs +++ b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderCodeDomTest.cs @@ -28,7 +28,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 NUnit.Framework; using System; @@ -356,4 +355,3 @@ namespace MonoTests.System.Resources.Tools { } } -#endif diff --git a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderNamespaceTests.cs b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderNamespaceTests.cs index f6112a56d1f..2b6f050c108 100644 --- a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderNamespaceTests.cs +++ b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderNamespaceTests.cs @@ -28,7 +28,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 NUnit.Framework; using System; @@ -335,4 +334,3 @@ namespace MonoTests.System.Resources.Tools { } } -#endif diff --git a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderOtherTests.cs b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderOtherTests.cs index 949b8c386ce..d755b347bc4 100644 --- a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderOtherTests.cs +++ b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderOtherTests.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 NUnit.Framework; using System; @@ -228,4 +227,3 @@ namespace MonoTests.System.Resources.Tools { } -#endif diff --git a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResourceNameTests.cs b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResourceNameTests.cs index 6ad71e83935..a494d6630d1 100644 --- a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResourceNameTests.cs +++ b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResourceNameTests.cs @@ -28,7 +28,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 NUnit.Framework; using System; @@ -299,4 +298,3 @@ namespace MonoTests.System.Resources.Tools { } } -#endif diff --git a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResxFileTests.cs b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResxFileTests.cs index 1a61887dd53..2d89a4a556e 100644 --- a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResxFileTests.cs +++ b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderResxFileTests.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 NUnit.Framework; using System; @@ -185,4 +184,3 @@ namespace MonoTests.System.Resources.Tools { } } -#endif diff --git a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderVerifyResourceNameTests.cs b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderVerifyResourceNameTests.cs index 83d277ed410..224f4ed2207 100644 --- a/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderVerifyResourceNameTests.cs +++ b/mcs/class/System.Design/Test/System.Resources.Tools/StronglyTypedResourceBuilderVerifyResourceNameTests.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 NUnit.Framework; using System; @@ -118,4 +117,3 @@ namespace MonoTests.System.Resources.Tools { } } -#endif diff --git a/mcs/class/System.Design/Test/System.Windows.Forms.Design/MenuCommandsTest.cs b/mcs/class/System.Design/Test/System.Windows.Forms.Design/MenuCommandsTest.cs index 108262666df..41119b0dd3f 100644 --- a/mcs/class/System.Design/Test/System.Windows.Forms.Design/MenuCommandsTest.cs +++ b/mcs/class/System.Design/Test/System.Windows.Forms.Design/MenuCommandsTest.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.Collections; @@ -66,4 +65,3 @@ namespace MonoTests.System.Windows.Forms.Design } } } -#endif diff --git a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesDirectoryEntryTest.cs b/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesDirectoryEntryTest.cs index 56ee8f98851..cecbc7e1fb0 100644 --- a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesDirectoryEntryTest.cs +++ b/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesDirectoryEntryTest.cs @@ -251,9 +251,6 @@ namespace MonoTests.System.DirectoryServices de = new DirectoryEntry();
Assert.AreEqual(de.AuthenticationType,AuthenticationTypes.None);
-#if !NET_2_0
- Assert.AreEqual (de.Password, null);
-#endif
Assert.AreEqual(de.Path,String.Empty);
Assert.AreEqual(de.UsePropertyCache,true);
Assert.AreEqual(de.Username,null);
@@ -267,9 +264,6 @@ namespace MonoTests.System.DirectoryServices Assert.AreEqual(de.AuthenticationType,AuthenticationTypes.None);
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
-#if !NET_2_0
- Assert.AreEqual(de.Password,null);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -297,9 +291,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -319,9 +310,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -360,9 +348,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -382,9 +367,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -404,9 +386,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -426,9 +405,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -486,9 +462,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -508,9 +481,6 @@ namespace MonoTests.System.DirectoryServices //Assert.AreEqual(de.Guid,new Guid("0b045012-1d97-4f94-9d47-87cbf6dada46"));
Assert.AreEqual(de.Name,GetName (configuration.BaseDn));
//Assert.AreEqual(de.NativeGuid,null);
-#if !NET_2_0
- Assert.AreEqual(de.Password,configuration.Password);
-#endif
Assert.AreEqual(de.Path,configuration.ConnectionString);
Assert.AreEqual(de.SchemaClassName,"organization");
Assert.AreEqual(de.UsePropertyCache,true);
@@ -1100,53 +1070,6 @@ namespace MonoTests.System.DirectoryServices Assert.AreEqual(de.Parent.Path.ToLower(),(configuration.ServerRoot + "ou=Human Resources,ou=people" + ((configuration.BaseDn.Length == 0) ? String.Empty : ("," + configuration.BaseDn))).ToLower());
}
-#if !NET_2_0
- [Test]
- public void DirectoryEntry_Password()
- {
- string wrongPassword = "some wrong password";
-
- de = new DirectoryEntry();
-
- Assert.AreEqual(de.Password,null);
-
- de.Password = configuration.Password;
- Assert.AreEqual(de.Password,configuration.Password);
-
- de.Password = "";
- Assert.AreEqual(de.Password,String.Empty);
-
- de.Password = wrongPassword;
- Assert.AreEqual(de.Password,wrongPassword);
-
-
- de = new DirectoryEntry(configuration.ConnectionString);
-
- de.Password = configuration.Password;
- Assert.AreEqual(de.Password,configuration.Password);
-
- de.Password = "";
- Assert.AreEqual(de.Password,String.Empty);
-
- de.Password = wrongPassword;
- Assert.AreEqual(de.Password,wrongPassword);
-
-
- de = new DirectoryEntry(configuration.ConnectionString,
- configuration.Username,
- configuration.Password,
- configuration.AuthenticationType);
-
- de.Password = configuration.Password;
- Assert.AreEqual(de.Password,configuration.Password);
-
- de.Password = "";
- Assert.AreEqual(de.Password,String.Empty);
-
- de.Password = wrongPassword;
- Assert.AreEqual(de.Password,wrongPassword);
- }
-#endif
[Test]
public void DirectoryEntry_Path()
@@ -1341,9 +1264,6 @@ namespace MonoTests.System.DirectoryServices Assert.AreEqual(schemaEntry.Path.ToLower(),"LDAP://schema/domainDNS".ToLower());
Assert.AreEqual(schemaEntry.Name,"domainDNS");
Assert.AreEqual(schemaEntry.Username,null);
-#if !NET_2_0
- Assert.AreEqual(schemaEntry.Password,null);
-#endif
Assert.AreEqual(schemaEntry.UsePropertyCache,true);
Assert.AreEqual(schemaEntry.SchemaClassName,"Class");
Assert.AreEqual(schemaEntry.AuthenticationType,AuthenticationTypes.None);
@@ -1355,9 +1275,6 @@ namespace MonoTests.System.DirectoryServices Assert.AreEqual(schemaEntry.Path,configuration.ServerRoot + "schema/organization");
Assert.AreEqual(schemaEntry.Name,"organization");
Assert.AreEqual(schemaEntry.Username,null);
-#if !NET_2_0
- Assert.AreEqual(schemaEntry.Password,null);
-#endif
Assert.AreEqual(schemaEntry.UsePropertyCache,true);
Assert.AreEqual(schemaEntry.SchemaClassName,"Class");
Assert.AreEqual(schemaEntry.AuthenticationType,AuthenticationTypes.None);
@@ -1372,9 +1289,6 @@ namespace MonoTests.System.DirectoryServices Assert.AreEqual(schemaEntry.Path,configuration.ServerRoot + "schema/organization");
Assert.AreEqual(schemaEntry.Name,"organization");
Assert.AreEqual(schemaEntry.Username,configuration.Username);
-#if !NET_2_0
- Assert.AreEqual(schemaEntry.Password,configuration.Password);
-#endif
Assert.AreEqual(schemaEntry.UsePropertyCache,true);
Assert.AreEqual(schemaEntry.SchemaClassName,"Class");
Assert.AreEqual(schemaEntry.AuthenticationType,configuration.AuthenticationType);
diff --git a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesPermissionTest.cs b/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesPermissionTest.cs index 1f885d0e1e6..6e0d8503938 100644 --- a/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesPermissionTest.cs +++ b/mcs/class/System.DirectoryServices/Test/System.DirectoryServices/DirectoryServicesPermissionTest.cs @@ -86,9 +86,7 @@ namespace MonoTests.System.DirectoryServices { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentException))]
-#endif
public void PermissionState_Bad ()
{
PermissionState ps = (PermissionState)77;
@@ -211,11 +209,7 @@ namespace MonoTests.System.DirectoryServices { public void IsSubset_Null ()
{
DirectoryServicesPermission dsp = new DirectoryServicesPermission (PermissionState.None);
-#if NET_2_0
Assert.IsTrue (dsp.IsSubsetOf (null), "null");
-#else
- Assert.IsFalse (dsp.IsSubsetOf (null), "null");
-#endif
}
[Test]
@@ -317,12 +311,7 @@ namespace MonoTests.System.DirectoryServices { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
-#else
- // Problem inherited from ResourcePermissionBase
- [ExpectedException (typeof (NullReferenceException))]
-#endif
public void FromXml_Null ()
{
DirectoryServicesPermission dsp = new DirectoryServicesPermission (PermissionState.None);
@@ -330,9 +319,7 @@ namespace MonoTests.System.DirectoryServices { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentException))]
-#endif
public void FromXml_WrongTag ()
{
DirectoryServicesPermission dsp = new DirectoryServicesPermission (PermissionState.None);
@@ -344,9 +331,7 @@ namespace MonoTests.System.DirectoryServices { }
[Test]
-#if NET_2_0
[ExpectedException (typeof (ArgumentException))]
-#endif
public void FromXml_WrongTagCase ()
{
DirectoryServicesPermission dsp = new DirectoryServicesPermission (PermissionState.None);
diff --git a/mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs b/mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs index 5c10f44b195..276efdfde2a 100644 --- a/mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs +++ b/mcs/class/System.Drawing/Test/DrawingTest/Test/Image.cs @@ -263,11 +263,7 @@ namespace Test.Sys.Drawing { sr.Read(buffer, 0, 4);
sr.Close();
-#if NET_2_0
int i = 1;
-#else
- int i = 0;
-#endif
Assert.AreEqual('P', buffer[i++]);
Assert.AreEqual('N', buffer[i++]);
Assert.AreEqual('G', buffer[i++]);
diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/TestToolboxItem.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/TestToolboxItem.cs index 9fbabd7685d..e6d883884a9 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/TestToolboxItem.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Design/TestToolboxItem.cs @@ -59,7 +59,6 @@ namespace MonoTests.System.Drawing.Design { { return GetType (host, an, tn, r); } -#if NET_2_0 public object Filter (string propertyName, object value) { return FilterPropertyValue (propertyName, value); @@ -74,7 +73,6 @@ namespace MonoTests.System.Drawing.Design { { return ValidatePropertyValue (propertyName, value); } -#endif } [TestFixtureSetUp] @@ -96,7 +94,6 @@ namespace MonoTests.System.Drawing.Design { Assert.AreEqual (typeof (ToolboxItemFilterAttribute[]), item.Filter.GetType (), "Filter/Type"); Assert.AreEqual (0, item.Filter.Count, "Filter"); Assert.AreEqual (String.Empty, item.TypeName, "TypeName"); -#if NET_2_0 Assert.IsNull (item.Company, "Company"); Assert.AreEqual (".NET Component", item.ComponentType, "ComponentType"); Assert.IsNull (item.DependentAssemblies, "DependentAssemblies"); @@ -104,7 +101,6 @@ namespace MonoTests.System.Drawing.Design { Assert.IsFalse (item.IsTransient, "IsTransient"); Assert.AreEqual (0, item.Properties.Count, "Properties"); Assert.AreEqual (String.Empty, item.Version, "Version"); -#endif } [Test] @@ -121,7 +117,6 @@ namespace MonoTests.System.Drawing.Design { Assert.AreEqual (0, item.Filter.Count, "Filter"); item.TypeName = null; Assert.AreEqual (String.Empty, item.TypeName, "TypeName"); -#if NET_2_0 item.Company = null; Assert.AreEqual (String.Empty, item.Company, "Company"); // can't assign null without a NRE @@ -134,7 +129,6 @@ namespace MonoTests.System.Drawing.Design { Assert.AreEqual (9, item.Properties.Count, "Properties"); item.Lock (); Assert.AreEqual (9, item.Properties.Count, "Properties/Lock"); -#endif } [Test] @@ -214,7 +208,6 @@ namespace MonoTests.System.Drawing.Design { item.Lock (); } -#if NET_2_0 [Test] public void TestNewProperties () { @@ -445,6 +438,5 @@ namespace MonoTests.System.Drawing.Design { // only documented case new OurToolboxItem ()._ValidatePropertyValue ("IsTransient", new object ()); } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs index c48dd5b3f88..50139e908b2 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Design/UITypeEditorTest.cs @@ -60,9 +60,7 @@ namespace MonoTests.System.Drawing.Design { Assert.IsFalse (editor.GetPaintValueSupported (), "GetPaintValueSupported()"); Assert.IsFalse (editor.GetPaintValueSupported (null), "GetPaintValueSupported(null)"); -#if NET_2_0 Assert.IsFalse (editor.IsDropDownResizable, "IsDropDownResizable"); -#endif } [Test] diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/IconCodecTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/IconCodecTest.cs index e6c3aacdee5..d8da270c896 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Imaging/IconCodecTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Imaging/IconCodecTest.cs @@ -124,9 +124,7 @@ namespace MonoTests.System.Drawing.Imaging { Assert.AreEqual (1, bmp.FrameDimensionsList.Length, "FrameDimensionsList"); Assert.AreEqual (0, bmp.PropertyIdList.Length, "PropertyIdList"); Assert.AreEqual (0, bmp.PropertyItems.Length, "PropertyItems"); -#if NET_2_0 Assert.IsNull (bmp.Tag, "Tag"); -#endif Assert.AreEqual (96.0f, bmp.HorizontalResolution, "HorizontalResolution"); Assert.AreEqual (96.0f, bmp.VerticalResolution, "VerticalResolution"); Assert.AreEqual (16, bmp.Width, "bmp.Width"); @@ -295,9 +293,7 @@ namespace MonoTests.System.Drawing.Imaging { Assert.AreEqual (1, bmp.FrameDimensionsList.Length, "FrameDimensionsList"); Assert.AreEqual (0, bmp.PropertyIdList.Length, "PropertyIdList"); Assert.AreEqual (0, bmp.PropertyItems.Length, "PropertyItems"); -#if NET_2_0 Assert.IsNull (bmp.Tag, "Tag"); -#endif Assert.AreEqual (96.0f, bmp.HorizontalResolution, "HorizontalResolution"); Assert.AreEqual (96.0f, bmp.VerticalResolution, "VerticalResolution"); Assert.AreEqual (32, bmp.Width, "bmp.Width"); @@ -509,9 +505,7 @@ namespace MonoTests.System.Drawing.Imaging { Assert.AreEqual (1, bmp.FrameDimensionsList.Length, "FrameDimensionsList"); Assert.AreEqual (0, bmp.PropertyIdList.Length, "PropertyIdList"); Assert.AreEqual (0, bmp.PropertyItems.Length, "PropertyItems"); -#if NET_2_0 Assert.IsNull (bmp.Tag, "Tag"); -#endif Assert.AreEqual (96.0f, bmp.HorizontalResolution, "HorizontalResolution"); Assert.AreEqual (96.0f, bmp.VerticalResolution, "VerticalResolution"); Assert.AreEqual (48, bmp.Width, "bmp.Width"); @@ -738,9 +732,7 @@ namespace MonoTests.System.Drawing.Imaging { Assert.AreEqual (1, bmp.FrameDimensionsList.Length, "FrameDimensionsList"); Assert.AreEqual (0, bmp.PropertyIdList.Length, "PropertyIdList"); Assert.AreEqual (0, bmp.PropertyItems.Length, "PropertyItems"); -#if NET_2_0 Assert.IsNull (bmp.Tag, "Tag"); -#endif Assert.AreEqual (96.0f, bmp.HorizontalResolution, "HorizontalResolution"); Assert.AreEqual (96.0f, bmp.VerticalResolution, "VerticalResolution"); Assert.AreEqual (64, bmp.Width, "bmp.Width"); @@ -1003,9 +995,7 @@ namespace MonoTests.System.Drawing.Imaging { Assert.AreEqual (1, bmp.FrameDimensionsList.Length, "FrameDimensionsList"); Assert.AreEqual (0, bmp.PropertyIdList.Length, "PropertyIdList"); Assert.AreEqual (0, bmp.PropertyItems.Length, "PropertyItems"); -#if NET_2_0 Assert.IsNull (bmp.Tag, "Tag"); -#endif Assert.AreEqual (96.0f, bmp.HorizontalResolution, "HorizontalResolution"); Assert.AreEqual (96.0f, bmp.VerticalResolution, "VerticalResolution"); Assert.AreEqual (96, bmp.Width, "bmp.Width"); @@ -1944,9 +1934,7 @@ namespace MonoTests.System.Drawing.Imaging { Assert.AreEqual (1, bmp.FrameDimensionsList.Length, "FrameDimensionsList"); Assert.AreEqual (0, bmp.PropertyIdList.Length, "PropertyIdList"); Assert.AreEqual (0, bmp.PropertyItems.Length, "PropertyItems"); -#if NET_2_0 Assert.IsNull (bmp.Tag, "Tag"); -#endif Assert.AreEqual (96.0f, bmp.HorizontalResolution, "HorizontalResolution"); Assert.AreEqual (96.0f, bmp.VerticalResolution, "VerticalResolution"); Assert.AreEqual (16, bmp.Width, "bmp.Width"); diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Printing/MarginsTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Printing/MarginsTest.cs index dd36b1a7060..1a3704aca17 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Printing/MarginsTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Printing/MarginsTest.cs @@ -49,10 +49,8 @@ namespace MonoTests.System.Drawing.Printing { Assert.AreEqual ("[Margins Left=100 Right=100 Top=100 Bottom=100]", m.ToString (), "ToString"); Margins clone = (Margins) m.Clone (); Assert.AreEqual (m, clone, "clone"); -#if NET_2_0 Assert.IsTrue (m == clone, "=="); Assert.IsFalse (m != clone, "!="); -#endif } [Test] @@ -68,10 +66,8 @@ namespace MonoTests.System.Drawing.Printing { // bottom smaller than top Margins m3 = new Margins (10, 20, Int32.MaxValue, 0); Assert.IsFalse (m2.GetHashCode () == m3.GetHashCode (), "GetHashCode"); -#if NET_2_0 Assert.IsTrue (m1 != m2, "m1 != m2"); Assert.IsFalse (m1 == m2, "m1 == m2"); -#endif } [Test] @@ -115,10 +111,8 @@ namespace MonoTests.System.Drawing.Printing { { Margins m1 = null; Margins m2 = null; -#if NET_2_0 Assert.IsTrue (m1 == m2, "null==null"); Assert.IsFalse (m1 != m2, "null!=null"); -#endif } } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PageSourceTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PageSourceTest.cs index d1e3ce78106..ccfab50dc95 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PageSourceTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PageSourceTest.cs @@ -34,7 +34,6 @@ namespace MonoTests.System.Drawing.Printing [TestFixture] public class PaperSourceTest { -#if NET_2_0 [Test] public void KindTest () { @@ -91,7 +90,6 @@ namespace MonoTests.System.Drawing.Printing Assert.AreEqual ((PaperSourceKind)(int.MinValue), ps.Kind, "Kind #7"); Assert.AreEqual (int.MinValue, ps.RawKind, "RawKind #7"); } -#endif } diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PaperSizeTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PaperSizeTest.cs index 5fe9db57868..78420984b62 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PaperSizeTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PaperSizeTest.cs @@ -34,7 +34,6 @@ namespace MonoTests.System.Drawing.Printing [TestFixture] public class PaperSizeTest { -#if NET_2_0 [Test] public void PaperSizeKindTest() { @@ -131,7 +130,6 @@ namespace MonoTests.System.Drawing.Printing Assert.Fail ("should not have thrown #1b"); } } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs index 1f38dfd130a..908b1140ca5 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing.Printing/PrintingPermissionTest.cs @@ -374,9 +374,6 @@ namespace MonoTests.System.Drawing.Printing { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongClass () { PrintingPermission pp = new PrintingPermission (PermissionState.None); @@ -416,9 +413,6 @@ namespace MonoTests.System.Drawing.Printing { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_NoVersion () { PrintingPermission pp = new PrintingPermission (PermissionState.None); @@ -463,7 +457,6 @@ namespace MonoTests.System.Drawing.Printing { Unification (String.Format (PermissionPattern, fx20version)); } -#if NET_2_0 [Test] [Category ("NotWorking")] [ExpectedException (typeof (FileLoadException))] @@ -471,12 +464,5 @@ namespace MonoTests.System.Drawing.Printing { { Type.GetType (String.Format (PermissionPattern, "9.99.999.9999")); } -#else - [Test] - public void Unification_FromFx99 () - { - Unification (String.Format (PermissionPattern, "9.99.999.9999")); - } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs index ff6d12c0ada..34cb3aa1909 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/ColorConverter.cs @@ -418,13 +418,8 @@ namespace MonoTests.System.Drawing { [Test] public void GetStandardValues () { -#if NET_2_0 Assert.AreEqual ((int)KnownColor.MenuHighlight, colconv.GetStandardValues ().Count); Assert.AreEqual ((int)KnownColor.MenuHighlight, colconv.GetStandardValues (null).Count); -#else - Assert.AreEqual ((int)KnownColor.YellowGreen, colconv.GetStandardValues ().Count); - Assert.AreEqual ((int)KnownColor.YellowGreen, colconv.GetStandardValues (null).Count); -#endif } [Test] diff --git a/mcs/class/System.Drawing/Test/System.Drawing/FontFamilyTest.cs b/mcs/class/System.Drawing/Test/System.Drawing/FontFamilyTest.cs index de6b2142aa1..3de56a52152 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/FontFamilyTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/FontFamilyTest.cs @@ -76,10 +76,8 @@ namespace MonoTests.System.Drawing { private void CheckMono (FontFamily ff) { Assert.IsTrue (ff.Equals (FontFamily.GenericMonospace), "GenericMonospace"); -#if NET_2_0 // note: Mono has this behaviour on both 1.1 and 2.0 profiles Assert.AreEqual (ff.Name.GetHashCode (), ff.GetHashCode (), "GetHashCode"); -#endif } [Test] @@ -130,10 +128,8 @@ namespace MonoTests.System.Drawing { { FontFamily ff = new FontFamily (GenericFontFamilies.SansSerif); Assert.IsTrue (ff.Equals (FontFamily.GenericSansSerif), "GenericSansSerif"); -#if NET_2_0 // note: Mono has this behaviour on both 1.1 and 2.0 profiles Assert.AreEqual (ff.Name.GetHashCode (), ff.GetHashCode (), "GetHashCode"); -#endif } [Test] @@ -141,10 +137,8 @@ namespace MonoTests.System.Drawing { { FontFamily ff = new FontFamily (GenericFontFamilies.Serif); Assert.IsTrue (ff.Equals (FontFamily.GenericSerif), "GenericSerif"); -#if NET_2_0 // note: Mono has this behaviour on both 1.1 and 2.0 profiles Assert.AreEqual (ff.Name.GetHashCode (), ff.GetHashCode (), "GetHashCode"); -#endif } [Test] diff --git a/mcs/class/System.Drawing/Test/System.Drawing/PenTest.cs b/mcs/class/System.Drawing/Test/System.Drawing/PenTest.cs index a02b634350d..8ceeb112c59 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/PenTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/PenTest.cs @@ -235,11 +235,7 @@ namespace MonoTests.System.Drawing { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Brush_Null () { default_pen.Brush = null; diff --git a/mcs/class/System.Drawing/Test/System.Drawing/RegionCas.cs b/mcs/class/System.Drawing/Test/System.Drawing/RegionCas.cs index 9cd6acbd03e..14f1661a625 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/RegionCas.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/RegionCas.cs @@ -76,7 +76,6 @@ namespace MonoCasTests.System.Drawing { { Region.FromHrgn (IntPtr.Zero); } -#if NET_2_0 [Test] [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] [ExpectedException (typeof (SecurityException))] @@ -92,6 +91,5 @@ namespace MonoCasTests.System.Drawing { { new Region ().ReleaseHrgn (IntPtr.Zero); } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/SystemFontsTest.cs b/mcs/class/System.Drawing/Test/System.Drawing/SystemFontsTest.cs index 86a0fa71f52..6811e253df7 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/SystemFontsTest.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/SystemFontsTest.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.Drawing; @@ -150,4 +149,3 @@ namespace MonoTests.System.Drawing { } } -#endif diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs index d2114123308..71fa94ba587 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestBitmap.cs @@ -136,7 +136,6 @@ namespace MonoTests.System.Drawing { { using (Bitmap bmp = new Bitmap (100, 100, PixelFormat.Format32bppRgb)) { Rectangle rect = new Rectangle (0, 0, bmp.Width, bmp.Height); -#if NET_2_0 BitmapData bd = new BitmapData (); try { bmp.LockBits (rect, ImageLockMode.ReadWrite, PixelFormat.Format8bppIndexed, bd); @@ -146,9 +145,6 @@ namespace MonoTests.System.Drawing { Assert.AreEqual (IntPtr.Zero, bd.Scan0, "Scan0"); throw; } -#else - bmp.LockBits (rect, ImageLockMode.ReadWrite, PixelFormat.Format8bppIndexed); -#endif } } @@ -233,7 +229,6 @@ namespace MonoTests.System.Drawing { bmp.UnlockBits (null); } } -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentException))] public void LockBits_BitmapData_Null () @@ -303,14 +298,9 @@ namespace MonoTests.System.Drawing { bmp.UnlockBits (data); } } -#endif [Test] -#if NET_2_0 [ExpectedException (typeof (InvalidOperationException))] -#else - [ExpectedException (typeof (Exception))] -#endif public void Format1bppIndexed () { using (Bitmap bmp = new Bitmap (1, 1, PixelFormat.Format1bppIndexed)) { @@ -321,11 +311,7 @@ namespace MonoTests.System.Drawing { } [Test] -#if NET_2_0 [ExpectedException (typeof (InvalidOperationException))] -#else - [ExpectedException (typeof (Exception))] -#endif public void Format4bppIndexed () { using (Bitmap bmp = new Bitmap (1, 1, PixelFormat.Format4bppIndexed)) { @@ -336,11 +322,7 @@ namespace MonoTests.System.Drawing { } [Test] -#if NET_2_0 [ExpectedException (typeof (InvalidOperationException))] -#else - [ExpectedException (typeof (Exception))] -#endif public void Format8bppIndexed () { using (Bitmap bmp = new Bitmap (1, 1, PixelFormat.Format8bppIndexed)) { @@ -1196,11 +1178,7 @@ namespace MonoTests.System.Drawing { } [Test] -#if NET_2_0 [Category ("NotWorking")] // http://bugzilla.ximian.com/show_bug.cgi?id=80558 -#else - [ExpectedException (typeof (InvalidOperationException))] -#endif public void XmlSerialize () { new XmlSerializer (typeof (Bitmap)); @@ -1529,9 +1507,6 @@ namespace MonoTests.System.Drawing { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (InvalidOperationException))] -#endif public void XmlSerialization () { new XmlSerializer (typeof (Bitmap)); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs index a5d2eb58db9..c5df6c531ed 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestColor.cs @@ -1315,7 +1315,6 @@ namespace MonoTests.System.Drawing { Compare (KnownColor.Window, GetSysColorIndex.COLOR_WINDOW); Compare (KnownColor.WindowFrame, GetSysColorIndex.COLOR_WINDOWFRAME); Compare (KnownColor.WindowText, GetSysColorIndex.COLOR_WINDOWTEXT); -#if NET_2_0 Compare (KnownColor.ButtonFace, GetSysColorIndex.COLOR_BTNFACE); Compare (KnownColor.ButtonHighlight, GetSysColorIndex.COLOR_BTNHIGHLIGHT); Compare (KnownColor.ButtonShadow, GetSysColorIndex.COLOR_BTNSHADOW); @@ -1323,7 +1322,6 @@ namespace MonoTests.System.Drawing { Compare (KnownColor.GradientInactiveCaption, GetSysColorIndex.COLOR_GRADIENTINACTIVECAPTION); Compare (KnownColor.MenuBar, GetSysColorIndex.COLOR_MENUBAR); Compare (KnownColor.MenuHighlight, GetSysColorIndex.COLOR_MENUHIGHLIGHT); -#endif } } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs index f01160f3b76..c4e928612e7 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestFont.cs @@ -188,11 +188,7 @@ namespace MonoTests.System.Drawing{ [Test] [SecurityPermission (SecurityAction.Assert, UnmanagedCode = true)] - #if NET_2_0 [ExpectedException (typeof (AccessViolationException))] - #else - [ExpectedException (typeof (NullReferenceException))] - #endif public void ToLogFont_Null () { Font f = new Font ("Arial", 10); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs index aefcbc7a781..6f8e3a61406 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestGraphics.cs @@ -1236,11 +1236,7 @@ namespace MonoTests.System.Drawing { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void EndContainer_Null () { Bitmap bitmap = new Bitmap (20, 20); @@ -2634,7 +2630,6 @@ namespace MonoTests.System.Drawing { } } } -#if NET_2_0 [Test] public void TestReleaseHdc () { @@ -2672,7 +2667,6 @@ namespace MonoTests.System.Drawing { } } } -#endif [Test] public void VisibleClipBound () { @@ -3449,7 +3443,6 @@ namespace MonoTests.System.Drawing { } } } -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentNullException))] public void DrawImageUnscaledAndClipped_Null () @@ -3481,7 +3474,6 @@ namespace MonoTests.System.Drawing { } } } -#endif [Test] [ExpectedException (typeof (ArgumentNullException))] diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs index 203dfe34794..b24af54e3d6 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestIcon.cs @@ -206,7 +206,6 @@ namespace MonoTests.System.Drawing { { new Icon (typeof (Icon), null); } -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentException))] public void Constructor_StreamNull_Size () @@ -227,7 +226,6 @@ namespace MonoTests.System.Drawing { { new Icon ((string) null, 32, 32); } -#endif [Test] public void TestProperties () @@ -510,7 +508,6 @@ namespace MonoTests.System.Drawing { } -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentException))] public void ExtractAssociatedIcon_Null () @@ -531,7 +528,6 @@ namespace MonoTests.System.Drawing { { Icon.ExtractAssociatedIcon ("does-not-exists.png"); } -#endif private static bool RunningOnUnix { get { @@ -544,14 +540,12 @@ namespace MonoTests.System.Drawing { [TestFixture] public class IconFullTrustTest { -#if NET_2_0 [Test] public void ExtractAssociatedIcon () { string filename_dll = Assembly.GetExecutingAssembly ().Location; Assert.IsNotNull (Icon.ExtractAssociatedIcon (filename_dll), "dll"); } -#endif [Test] public void HandleRoundtrip () diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs index 1b430ae52e2..e064a4337a3 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestImage.cs @@ -168,9 +168,6 @@ namespace MonoTests.System.Drawing{ } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // MS 1.x throws an ArgumentNullException in this case -#endif public void Stream_Unlocked () { try { @@ -195,9 +192,6 @@ namespace MonoTests.System.Drawing{ } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // MS 1.x throws an ArgumentNullException in this case -#endif public void Stream_Locked () { Image img = null; @@ -213,11 +207,7 @@ namespace MonoTests.System.Drawing{ } [Test] -#if NET_2_0 [Category ("NotWorking")] // http://bugzilla.ximian.com/show_bug.cgi?id=80558 -#else - [ExpectedException (typeof (InvalidOperationException))] -#endif public void XmlSerialize () { new XmlSerializer (typeof (Image)); @@ -230,9 +220,7 @@ namespace MonoTests.System.Drawing{ // as Image Assert.AreEqual (327683, img.Flags, "Flags"); Assert.IsTrue (img.RawFormat.Equals (ImageFormat.Wmf), "Wmf"); -#if NET_2_0 Assert.IsNull (img.Tag, "Tag"); -#endif } [Test] @@ -274,9 +262,7 @@ namespace MonoTests.System.Drawing{ // as Image Assert.AreEqual (327683, img.Flags, "Flags"); Assert.IsTrue (img.RawFormat.Equals (ImageFormat.Emf), "Emf"); -#if NET_2_0 Assert.IsNull (img.Tag, "Tag"); -#endif } [Test] @@ -383,9 +369,6 @@ namespace MonoTests.System.Drawing{ } [Test] -#if !NET_2_0 - [ExpectedException (typeof (InvalidOperationException))] -#endif public void XmlSerialization () { new XmlSerializer (typeof (Image)); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs index 4176be6e714..ef4752ae037 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestImageConverter.cs @@ -399,11 +399,7 @@ namespace MonoTests.System.Drawing [Test] public void TestGetProperties () { -#if NET_2_0 int basecount = 1; -#else - int basecount = 0; -#endif PropertyDescriptorCollection propsColl; propsColl = imgConv.GetProperties (null, image, null); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs index 619aa766a51..71bb2abec8b 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestPoint.cs @@ -196,7 +196,6 @@ namespace MonoTests.System.Drawing{ Assert.AreEqual ("{X=1,Y=0}", pt1_0.ToString (), "#2"); Assert.AreEqual ("{X=0,Y=1}", pt0_1.ToString (), "#3"); } -#if NET_2_0 [Test] public void AddTest () @@ -223,7 +222,6 @@ namespace MonoTests.System.Drawing{ Assert.AreEqual (pt1_0, Point.Subtract (pt1_1, new Size (0, 1)), "#1"); Assert.AreEqual (pt0_1, Point.Subtract (pt1_1, new Size (1, 0)), "#2"); } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs index b96d2065395..0a0a6d0914f 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestPointConverter.cs @@ -253,11 +253,7 @@ namespace MonoTests.System.Drawing } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void TestCreateInstance_CaseSensitive () { Hashtable ht = new Hashtable (); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs index 206adfb7bae..43f18d14d10 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestPointF.cs @@ -178,7 +178,6 @@ namespace MonoTests.System.Drawing point.Y.ToString (culture)); } -#if NET_2_0 [Test] public void AddTest () @@ -193,7 +192,6 @@ namespace MonoTests.System.Drawing Assert.AreEqual (new PointF (2, 1), PointF.Subtract (new PointF (4, 4), new Size (2, 3)), "SUBTEST#1"); Assert.AreEqual (new PointF (3, 3), PointF.Subtract (new PointF (5, 6), new SizeF (2, 3)), "SUBTEST#2"); } -#endif } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs index 9f48a9e623a..aa0b9e68ae9 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestRectangleConverter.cs @@ -305,11 +305,7 @@ namespace MonoTests.System.Drawing } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void TestCreateInstance_CaseSensitive () { Hashtable ht = new Hashtable (); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs index 29bb158d5f4..d57515cab06 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestRegion.cs @@ -1529,9 +1529,7 @@ namespace MonoTests.System.Drawing Assert.IsFalse (r.IsInfinite (graphic), "!Infinite"); IntPtr h = r.GetHrgn (graphic); Assert.IsFalse (h == IntPtr.Zero, "Handle!=0"); -#if NET_2_0 r.ReleaseHrgn (h); -#endif } [Test] @@ -1547,9 +1545,7 @@ namespace MonoTests.System.Drawing Assert.IsFalse (r.IsEmpty (graphic), "!Empty"); Assert.IsTrue (r.IsInfinite (graphic), "Infinite"); Assert.AreEqual (IntPtr.Zero, r.GetHrgn (graphic), "Handle==0"); -#if NET_2_0 r.ReleaseHrgn (h); -#endif } [Test] @@ -1559,10 +1555,8 @@ namespace MonoTests.System.Drawing IntPtr h1 = r.GetHrgn (graphic); IntPtr h2 = r.GetHrgn (graphic); Assert.IsFalse (h1 == h2, "Handle_1!=Handle_2"); -#if NET_2_0 r.ReleaseHrgn (h1); r.ReleaseHrgn (h2); -#endif } [Test] @@ -1576,10 +1570,8 @@ namespace MonoTests.System.Drawing IntPtr h2 = r2.GetHrgn (graphic); Assert.IsFalse (h2 == IntPtr.Zero, "Handle_2!=0"); Assert.IsFalse (h1 == h2, "Handle_1!=Handle_2"); -#if NET_2_0 r1.ReleaseHrgn (h1); r2.ReleaseHrgn (h2); -#endif } [Test] @@ -1588,7 +1580,6 @@ namespace MonoTests.System.Drawing { Region.FromHrgn (IntPtr.Zero); } -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentNullException))] public void ReleaseHrng_Zero () @@ -1605,6 +1596,5 @@ namespace MonoTests.System.Drawing Assert.IsFalse (IntPtr.Zero == ptr, "ptr"); r.ReleaseHrgn (ptr); } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs index 9b5e3e33e2b..335bcbca3fa 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestSize.cs @@ -197,7 +197,6 @@ namespace MonoTests.System.Drawing Assert.AreEqual (new Size (1, 0).GetHashCode (), sz1_0.GetHashCode (), "#1"); } -#if NET_2_0 [Test] public void AddTest () { @@ -211,7 +210,6 @@ namespace MonoTests.System.Drawing Assert.AreEqual (sz1_0, Size.Subtract (sz1_1, sz0_1), "SUB#1"); Assert.AreEqual (sz0_1, Size.Subtract (sz1_1, sz1_0), "SUB#2"); } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs index 7b0f751b612..7e10230544a 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeConverter.cs @@ -256,11 +256,7 @@ namespace MonoTests.System.Drawing } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void TestCreateInstance_CaseSensitive () { Hashtable ht = new Hashtable (); diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs index d2535120d83..dc94bcf1a12 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeF.cs @@ -209,7 +209,6 @@ namespace MonoTests.System.Drawing size.Height.ToString (culture)); } -#if NET_2_0 [Test] public void AddTest () { @@ -223,7 +222,6 @@ namespace MonoTests.System.Drawing Assert.AreEqual (sz11_0, SizeF.Subtract (sz11_99, new SizeF (0.0F, 9.9F)), "SUB#1"); Assert.AreEqual (sz0_11, SizeF.Subtract (new SizeF (1.1F, 1.1F), new SizeF (1.1F, 0.0F)), "SUB#2"); } -#endif } } diff --git a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs index 63c1a1410b9..3277b2281cf 100644 --- a/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs +++ b/mcs/class/System.Drawing/Test/System.Drawing/TestSizeFConverter.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -474,4 +473,3 @@ namespace MonoTests.System.Drawing } -#endif diff --git a/mcs/class/System.Messaging/Test/System.Messaging/MessageQueuePermissionAttributeTest.cs b/mcs/class/System.Messaging/Test/System.Messaging/MessageQueuePermissionAttributeTest.cs index 9a39df8939d..505ff6ff5da 100644 --- a/mcs/class/System.Messaging/Test/System.Messaging/MessageQueuePermissionAttributeTest.cs +++ b/mcs/class/System.Messaging/Test/System.Messaging/MessageQueuePermissionAttributeTest.cs @@ -172,9 +172,7 @@ namespace MonoTests.System.Messaging { case 13:
case 32:
case 92:
-#if NET_2_0
case 133:
-#endif
case 160:
// known invalid chars
break;
diff --git a/mcs/class/System.Runtime.Remoting/Test/GenericTest.cs b/mcs/class/System.Runtime.Remoting/Test/GenericTest.cs index f755e4386a6..519686785c9 100644 --- a/mcs/class/System.Runtime.Remoting/Test/GenericTest.cs +++ b/mcs/class/System.Runtime.Remoting/Test/GenericTest.cs @@ -5,7 +5,6 @@ // Robert Jordan <robertj@gmx.net> // -#if NET_2_0 using System; using System.Collections; @@ -250,4 +249,3 @@ namespace MonoTests.Remoting } } -#endif diff --git a/mcs/class/System.Runtime.Remoting/Test/IpcCalls.cs b/mcs/class/System.Runtime.Remoting/Test/IpcCalls.cs index 4031d339ba9..f541519defa 100644 --- a/mcs/class/System.Runtime.Remoting/Test/IpcCalls.cs +++ b/mcs/class/System.Runtime.Remoting/Test/IpcCalls.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.Runtime.Remoting; @@ -90,4 +89,3 @@ namespace MonoTests.Remoting } } -#endif diff --git a/mcs/class/System.Runtime.Remoting/Test/IpcChannelTest.cs b/mcs/class/System.Runtime.Remoting/Test/IpcChannelTest.cs index 74d97cdf10a..54a4146701f 100644 --- a/mcs/class/System.Runtime.Remoting/Test/IpcChannelTest.cs +++ b/mcs/class/System.Runtime.Remoting/Test/IpcChannelTest.cs @@ -5,7 +5,6 @@ // Robert Jordan (robertj@gmx.net) // -#if NET_2_0 using System; using System.Collections; @@ -115,4 +114,3 @@ namespace MonoTests.Remoting } } -#endif diff --git a/mcs/class/System.Runtime.Serialization.Formatters.Soap/Test/SerializationCallbackTest.cs b/mcs/class/System.Runtime.Serialization.Formatters.Soap/Test/SerializationCallbackTest.cs index f3580532bfc..bd49e18db70 100644 --- a/mcs/class/System.Runtime.Serialization.Formatters.Soap/Test/SerializationCallbackTest.cs +++ b/mcs/class/System.Runtime.Serialization.Formatters.Soap/Test/SerializationCallbackTest.cs @@ -4,7 +4,6 @@ // Author: Robert Jordan (robertj@gmx.net) // -#if NET_2_0 using System; using System.Diagnostics; @@ -238,4 +237,3 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Soap } } -#endif diff --git a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/KnownTypeAttributeTest.cs b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/KnownTypeAttributeTest.cs index fba20d46c27..112957aee33 100644 --- a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/KnownTypeAttributeTest.cs +++ b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/KnownTypeAttributeTest.cs @@ -25,7 +25,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections.Generic; @@ -167,4 +166,3 @@ namespace MonoTests.System.Runtime.Serialization } } } -#endif diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs index 3c196ae7df8..d836c1e4ff2 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/AlgorithmIdentifier.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP namespace System.Security.Cryptography.Pkcs { diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs index 503245c912e..352b6a3b179 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsRecipientCollection.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; using System.Security.Cryptography.X509Certificates; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsSigner.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsSigner.cs index 791698d3cef..120c607c1fc 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsSigner.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/CmsSigner.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Security.Cryptography.X509Certificates; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs index 38c633c0c6a..32b675abb28 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/ContentInfo.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using Mono.Security; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/EnvelopedCms.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/EnvelopedCms.cs index 2f2986b092a..1f57f5c5516 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/EnvelopedCms.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/EnvelopedCms.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; using System.Security.Cryptography.X509Certificates; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyAgreeRecipientInfo.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyAgreeRecipientInfo.cs index 1a6d38ccfcc..00e785beea1 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyAgreeRecipientInfo.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyAgreeRecipientInfo.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP namespace System.Security.Cryptography.Pkcs { diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyTransRecipientInfo.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyTransRecipientInfo.cs index b6c281393a5..c22e9ebf20f 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyTransRecipientInfo.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/KeyTransRecipientInfo.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9Attribute.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9Attribute.cs index 2aec1c8cb1e..d41c06c8d6b 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9Attribute.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9Attribute.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs index 32ede3da9a1..d21e84ca31f 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9ContentType.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using Mono.Security; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs index a09cf056475..21b8a46eb98 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescription.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Text; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs index edb25a61344..66d2153bd6c 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9DocumentName.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Text; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs index 1c76b370b5b..0fb59b4582b 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9MessageDigest.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using Mono.Security; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs index 05846d1c14b..e1e7920bc8c 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/Pkcs9SigningTime.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Globalization; using System.Text; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/PublicKeyInfo.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/PublicKeyInfo.cs index 887b16c8926..3f9d554e2dd 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/PublicKeyInfo.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/PublicKeyInfo.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfo.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfo.cs index ee4aa3f582f..eecbcc5ffc6 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfo.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfo.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoCollection.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoCollection.cs index 6a30f6fbaa8..631e38653f1 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoCollection.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoCollection.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System; using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoEnumerator.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoEnumerator.cs index 600684f2619..2735c3172d2 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoEnumerator.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/RecipientInfoEnumerator.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System; using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs index 9a89ec8941b..52ddd84da3d 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignedCms.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.Xml; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfo.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfo.cs index bab190eeaf6..bdac1d51118 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfo.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfo.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Security.Cryptography.X509Certificates; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoCollection.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoCollection.cs index bfd360c3caf..2f53b3f0db4 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoCollection.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoCollection.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoEnumerator.cs b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoEnumerator.cs index 36b6ba491c4..32a165faf08 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoEnumerator.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Pkcs/SignerInfoEnumerator.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System; using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoX509Data.cs b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoX509Data.cs index 99e77d2cf62..74280cb9151 100644 --- a/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoX509Data.cs +++ b/mcs/class/System.Security/System.Security.Cryptography.Xml/KeyInfoX509Data.cs @@ -59,7 +59,7 @@ namespace System.Security.Cryptography.Xml { AddCertificate (cert); } -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP public KeyInfoX509Data (X509Certificate cert, X509IncludeOption includeOption) { if (cert == null) diff --git a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttribute.cs b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttribute.cs index 659ef2fb965..bdbf42fe779 100644 --- a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttribute.cs +++ b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttribute.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs index 6261ff4b09a..891de021239 100644 --- a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs +++ b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeCollection.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; diff --git a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeEnumerator.cs b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeEnumerator.cs index ec422437934..39092f9be43 100644 --- a/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeEnumerator.cs +++ b/mcs/class/System.Security/System.Security.Cryptography/CryptographicAttributeEnumerator.cs @@ -27,7 +27,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && SECURITY_DEP +#if SECURITY_DEP using System.Collections; diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs index ce5e92b2dd2..d7c55ee7ea1 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/AlgorithmIdentifierTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -139,4 +138,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs index bc669bb6a95..12fd6ed3b73 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -47,4 +46,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientTest.cs index c05141afb35..6ba658660a9 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsRecipientTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -105,4 +104,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsSignerTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsSignerTest.cs index 0f7b21b3bfc..e2aa7f91f4f 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsSignerTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CmsSignerTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -293,4 +292,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ContentInfoTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ContentInfoTest.cs index 5864c165ae6..d6296476ed6 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ContentInfoTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/ContentInfoTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -238,4 +237,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CryptographicAttributeTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CryptographicAttributeTest.cs index a7fcd841707..8af8daf7de0 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CryptographicAttributeTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/CryptographicAttributeTest.cs @@ -7,7 +7,6 @@ // (C) 2003 Motus Technologies Inc. (http://www.motus.com) // -#if NET_2_0 using NUnit.Framework; @@ -99,4 +98,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/EnvelopedCmsTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/EnvelopedCmsTest.cs index 2706cdfb034..23fbded4d36 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/EnvelopedCmsTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/EnvelopedCmsTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -393,4 +392,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/KeyTransRecipientInfoTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/KeyTransRecipientInfoTest.cs index 20b86b1e442..a4317975815 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/KeyTransRecipientInfoTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/KeyTransRecipientInfoTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -98,4 +97,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9AttributeTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9AttributeTest.cs index 319668c08cf..46221e8542c 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9AttributeTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9AttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -144,4 +143,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9ContentTypeTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9ContentTypeTest.cs index 57c7e97d58d..eb46b761eb6 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9ContentTypeTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9ContentTypeTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -91,4 +90,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescriptionTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescriptionTest.cs index 4564e833bf7..f4daab89b47 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescriptionTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentDescriptionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -105,4 +104,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentNameTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentNameTest.cs index 0a683e9e554..8e151f90fa9 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentNameTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9DocumentNameTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -113,4 +112,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9MessageDigestTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9MessageDigestTest.cs index f9d5fb26e50..a0ed9d116e9 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9MessageDigestTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9MessageDigestTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -81,4 +80,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9SigningTimeTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9SigningTimeTest.cs index 1767d49992b..9558b88afe1 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9SigningTimeTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkcs9SigningTimeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -227,4 +226,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/PkitsTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/PkitsTest.cs index 42fb30719d9..1722359b388 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/PkitsTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/PkitsTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -162,4 +161,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkits_4_01_SignatureVerification.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkits_4_01_SignatureVerification.cs index 0f1ff8174cb..0bdc6d348a7 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkits_4_01_SignatureVerification.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/Pkits_4_01_SignatureVerification.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -238,4 +237,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs index 03f2962231d..d8f1b12fadc 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignedCmsTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -454,4 +453,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoCollectionTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoCollectionTest.cs index 5e82de1f266..59941a1a752 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoCollectionTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -136,4 +135,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoTest.cs index 96e0d58f5e4..50e6376ac1e 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SignerInfoTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -104,4 +103,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SubjectIdentifierTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SubjectIdentifierTest.cs index 9a8f1a50f9d..1418e8cc460 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SubjectIdentifierTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Pkcs/SubjectIdentifierTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoTests.System.Security.Cryptography.Pkcs { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UICas.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UICas.cs index 94f9eaaa2c6..192ade125cb 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UICas.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UICas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -205,4 +204,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UITest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UITest.cs index 079316d6b17..4d97499fb16 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UITest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.X509Certificates/X509Certificate2UITest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -130,4 +129,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs index f12c1bc2419..ff8ffb6689b 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/DataReferenceTest.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.Security.Cryptography; @@ -53,4 +52,3 @@ namespace MonoTests.System.Security.Cryptography.Xml { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs index 45bab5fda11..6949154ec0b 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/EncryptedXmlTest.cs @@ -7,7 +7,6 @@ // Copyright (C) 2006 Novell, Inc (http://www.novell.com) // -#if NET_2_0 using System; using System.Collections; @@ -296,4 +295,3 @@ namespace MonoTests.System.Security.Cryptography.Xml } } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs index 2f6a78e544c..58cdf2d830e 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/KeyInfoX509DataTest.cs @@ -66,7 +66,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { static byte[] x509crl = { 0x30, 0x82, 0x01, 0x05, 0x30, 0x72, 0x02, 0x01, 0x01, 0x30, 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x30, 0x51, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x55, 0x53, 0x31, 0x18, 0x30, 0x16, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x0F, 0x55, 0x2E, 0x53, 0x2E, 0x20, 0x47, 0x6F, 0x76, 0x65, 0x72, 0x6E, 0x6D, 0x65, 0x6E, 0x74, 0x31, 0x0C, 0x30, 0x0A, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x03, 0x44, 0x6F, 0x44, 0x31, 0x1A, 0x30, 0x18, 0x06, 0x03, 0x55, 0x04, 0x03, 0x13, 0x11, 0x41, 0x72, 0x6D, 0x65, 0x64, 0x20, 0x46, 0x6F, 0x72, 0x63, 0x65, 0x73, 0x20, 0x52, 0x6F, 0x6F, 0x74, 0x17, 0x0D, 0x30, 0x32, 0x31, 0x30, 0x31, 0x31, 0x31, 0x33, 0x31, 0x32, 0x35, 0x30, 0x5A, 0x30, 0x0B, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x03, 0x81, 0x81, 0x00, 0x7D, 0xA2, 0xD1, 0x19, 0x6D, 0x0F, 0x0F, 0xCB, 0xE4, 0xA3, 0xBE, 0xE0, 0x36, 0x0A, 0xF3, 0x4C, 0x9B, 0xAF, 0xE6, 0x4F, 0xF6, 0xE3, 0xAF, 0xCF, 0x55, 0xF3, 0xC6, 0xDB, 0xAB, 0x4C, 0x16, 0x32, 0xAA, 0x73, 0xAD, 0xCC, 0xDC, 0x32, 0x33, 0x60, 0xDF, 0x8B, 0xCC, 0x93, 0xB5, 0x4F, 0x6A, 0xEC, 0x70, 0x53, 0xAF, 0xCF, 0x07, 0x0F, 0xA0, 0xCD, 0x66, 0xAC, 0x00, 0x57, 0xC6, 0x5C, 0x5D, 0x21, 0xB1, 0xBD, 0x30, 0x89, 0x8E, 0x77, 0x8D, 0xD4, 0x69, 0x7E, 0xC0, 0x36, 0x7E, 0xD2, 0xD8, 0x20, 0x71, 0x08, 0x80, 0xD2, 0xCB, 0x74, 0x8B, 0xD8, 0x42, 0x17, 0x04, 0x99, 0x80, 0xA4, 0x52, 0x70, 0x2E, 0xC0, 0xE3, 0x8C, 0x0B, 0xFF, 0x79, 0xB7, 0x45, 0x77, 0xDC, 0xC5, 0xCF, 0x43, 0x98, 0x91, 0x7D, 0xF1, 0x01, 0xF7, 0x53, 0xD7, 0xC6, 0x51, 0x35, 0xF0, 0x89, 0xCC, 0xC1, 0xFF, 0xE2, 0x89 }; -#if NET_2_0 [Test] public void Constructor_Empty () { @@ -85,40 +84,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { { KeyInfoX509Data data = new KeyInfoX509Data ((X509Certificate)null); } -#else - [Test] - [ExpectedException (typeof (CryptographicException))] - public void Constructor_Empty () - { - KeyInfoX509Data data = new KeyInfoX509Data (); - XmlElement invalid = data.GetXml (); - } - - [Test] - public void Constructor_X509Certificate_Null () - { - KeyInfoX509Data data = new KeyInfoX509Data ((X509Certificate)null); - } - - [Test] - [ExpectedException (typeof (ArgumentNullException))] - [Category ("NotWorking")] - public void Constructor_X509Certificate_Null_GetXml () - { - KeyInfoX509Data data = new KeyInfoX509Data ((X509Certificate)null); - XmlElement invalid = data.GetXml (); - // note: even if we add a check in GetXml this will makes another unit - // test fails. We clearly are not doing this the same way as MS does. - } - - [Test] - [ExpectedException (typeof (ArgumentNullException))] - public void Constructor_X509CertificateByteArray_Null_GetXml () - { - KeyInfoX509Data data = new KeyInfoX509Data ((byte[])null); - XmlElement invalid = data.GetXml (); - } -#endif [Test] public void Constructor_X509CertificateByteArray_Null () { @@ -144,7 +109,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { Assert.AreEqual ((data2.GetXml ().OuterXml), (data3.GetXml ().OuterXml), "data2==data3"); } -#if NET_2_0 [Test] public void Constructor_X509Certificate_X509IncludeOption () { @@ -199,42 +163,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { KeyInfoX509Data data = new KeyInfoX509Data (); data.AddIssuerSerial ("issuer", null); } -#else - [Test] - public void AddCertificate_Null () - { - KeyInfoX509Data data = new KeyInfoX509Data (); - data.AddCertificate (null); - } - - - [Test] - [ExpectedException (typeof (NullReferenceException))] - public void AddCertificate_Null_GetXml () - { - KeyInfoX509Data data = new KeyInfoX509Data (); - data.AddCertificate (null); - XmlElement empty = data.GetXml (); - } - - [Test] - public void AddIssuerSerial_Null_Serial () - { - KeyInfoX509Data data = new KeyInfoX509Data (); - data.AddIssuerSerial (null, "serial"); - XmlElement empty = data.GetXml (); - Assert.AreEqual (empty.OuterXml, "<X509Data xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><X509IssuerSerial><X509IssuerName></X509IssuerName><X509SerialNumber>serial</X509SerialNumber></X509IssuerSerial></X509Data>"); - } - - [Test] - public void AddIssuerSerial_Issuer_Null () - { - KeyInfoX509Data data = new KeyInfoX509Data (); - data.AddIssuerSerial ("issuer", null); - XmlElement empty = data.GetXml (); - Assert.AreEqual (empty.OuterXml, "<X509Data xmlns=\"http://www.w3.org/2000/09/xmldsig#\"><X509IssuerSerial><X509IssuerName>issuer</X509IssuerName><X509SerialNumber></X509SerialNumber></X509IssuerSerial></X509Data>"); - } -#endif [Test] public void AddSubjectKeyId_Byte_Null () @@ -249,7 +177,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { // beta2 bug - throw an ArgumentNullException (a little too late) // Assert.AreEqual ("<X509Data xmlns=\"http://www.w3.org/2000/09/xmldsig#\" />", data.GetXml ().OuterXml); } -#if NET_2_0 [Test] [Category ("NotWorking")] // beta2 bug [ExpectedException (typeof (NullReferenceException))] @@ -272,7 +199,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { Assert.AreEqual (1, data.SubjectKeyIds.Count, "SubjectKeyIds"); Assert.IsNull (data.SubjectNames, "SubjectNames"); } -#endif [Test] public void AddSubjectName_Null () { diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs index a776b19274f..8920ac34218 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/ReferenceTest.cs @@ -158,11 +158,9 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 [Category ("NotDotNet")] // MS throws a NullReferenceException (reported as FDBK25886) but only when executed in NUnit // http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=3596d1e3-362b-40bd-bca9-2e8be75261ff -#endif public void AddAllTransforms () { // adding an empty hash value diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs index b850fa5f359..d96e26fd0b4 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedInfoTest.cs @@ -147,11 +147,9 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 // urn:foo is'nt accepted when calling GetXml [ExpectedException (typeof (CryptographicException))] [Category ("NotWorking")] -#endif public void GetXmlWithSetProperty () { XmlDocument doc = new XmlDocument (); diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs index 4c7c6131087..0a71f570a9e 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/SignedXmlTest.cs @@ -75,10 +75,8 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 [Ignore ("2.0 throws a NullReferenceException - reported as FDBK25892")] // http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=02dd9730-d1ad-4170-8c82-36858c55fbe2 -#endif [ExpectedException (typeof (ArgumentNullException))] public void Constructor_XmlDocument_Null () { @@ -100,9 +98,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (CryptographicException))] -#endif public void Constructor_XmlElement_WithoutLoadXml () { XmlDocument doc = new XmlDocument (); @@ -341,11 +336,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { // Compute the signature. byte[] secretkey = Encoding.Default.GetBytes ("password"); HMACSHA1 hmac = new HMACSHA1 (secretkey); -#if NET_2_0 Assert.AreEqual (0, signedXml.KeyInfo.Count, "KeyInfo"); -#else - Assert.IsNull (signedXml.KeyInfo, "KeyInfo"); -#endif Assert.IsNull (signedXml.SignatureLength, "SignatureLength"); Assert.IsNull (signedXml.SignatureMethod, "SignatureMethod"); Assert.IsNull (signedXml.SignatureValue, "SignatureValue"); @@ -353,11 +344,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { signedXml.ComputeSignature (hmac); -#if NET_2_0 Assert.AreEqual (0, signedXml.KeyInfo.Count, "KeyInfo"); -#else - Assert.IsNull (signedXml.KeyInfo, "KeyInfo"); -#endif Assert.IsNull (signedXml.SignatureLength, "SignatureLength"); Assert.AreEqual (SignedXml.XmlDsigHMACSHA1Url, signedXml.SignatureMethod, "SignatureMethod"); Assert.AreEqual (20, signedXml.SignatureValue.Length, "SignatureValue"); @@ -480,7 +467,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { AsymmetricAlgorithm aa2 = sxe.PublicGetPublicKey (); Assert.IsNull (aa2, "Second Public Key is null"); } -#if NET_2_0 [Test] // [ExpectedException (typeof (ArgumentNullException))] public void AddObject_Null () @@ -497,16 +483,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { SignedXml sx = new SignedXml (); sx.AddReference (null); } -#else - [Test] - public void Add_Null () - { - SignedXml sx = new SignedXml (); - // no ArgumentNull exceptions for those - sx.AddObject (null); - sx.AddReference (null); - } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public void GetXml_WithoutInfo () @@ -553,9 +529,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (CryptographicException))] -#endif public void CheckSignatureEmpty () { SignedXml sx = new SignedXml (); @@ -681,7 +654,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { Assert.IsNull (sign.GetIdElement (new XmlDocument (), null)); } -#if NET_2_0 [Test] [Category ("NotWorking")] // bug #79483 public void DigestValue_CRLF () @@ -1374,7 +1346,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { // verify MS-generated signature Assert.IsTrue (sign.CheckSignature (new HMACRIPEMD160 (hmackey))); } -#endif // CVE-2009-0217 // * a 0-length signature is the worse case - it accepts anything // * between 1-7 bits length are considered invalid (not a multiple of 8) @@ -1502,7 +1473,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { SignedXml sign = GetSignedXml (xml); Assert.IsTrue (sign.CheckSignature (new HMACSHA1 (Encoding.ASCII.GetBytes ("secret")))); } -#if NET_2_0 [Test] [Category ("NotDotNet")] // will fail until a fix is available public void VerifyHMAC_SmallerHalfLength () @@ -1521,7 +1491,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { SignedXml sign = GetSignedXml (xml); Assert.IsTrue (sign.CheckSignature (new HMACSHA256 (Encoding.ASCII.GetBytes ("secret")))); } -#endif [Test] public void VerifyHMAC_FullLength () { diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs index c831ed020e6..ab9d2bb2e30 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/TransformTest.cs @@ -74,13 +74,11 @@ namespace MonoTests.System.Security.Cryptography.Xml { [TestFixture] public class TransformTest { -#if NET_2_0 [Test] [ExpectedException (typeof (NullReferenceException))] public void GetDigestedOutput_Null () { new ConcreteTransform ().GetDigestedOutput (null); } -#endif } } diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs index 4ed8a0204b5..a2a2c841eb8 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDecryptionTransformTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -70,4 +69,3 @@ namespace MonoTests.System.Security.Cryptography.Xml { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs index 43cf7df2afc..abb64bb34b5 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NTransformTest.cs @@ -507,7 +507,6 @@ namespace MonoTests.System.Security.Cryptography.Xml { Assert.AreEqual (xml, output); } -#if NET_2_0 [Test] public void PrefixlessNamespaceOutput () { @@ -545,6 +544,5 @@ namespace MonoTests.System.Security.Cryptography.Xml { { new XmlDsigExcC14NTransform ().GetDigestedOutput (null); } -#endif } } diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs index a97701123cf..a3608afc000 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigC14NWithCommentsTransformTest.cs @@ -97,11 +97,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { Assert.AreEqual (null, xnl, "Default InnerXml"); } -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#else - // LAMESPEC: input MUST be one of InputType - but no exception is thrown (not documented) -#endif public void LoadInputWithUnsupportedType () { byte[] bad = { 0xBA, 0xD }; @@ -129,19 +125,15 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 [ExpectedException (typeof (SecurityException))] -#endif public void C14NSpecExample1_WithoutResolver () { using (StreamWriter sw = new StreamWriter ("doc.dtd", false, Encoding.ASCII)) { sw.Write ("<!-- presence, not content, required -->"); sw.Close (); } -#if NET_2_0 if (!SecurityManager.SecurityEnabled) NUnit.Framework.Assert.Ignore ("SecurityManager isn't enabled."); -#endif string res = ExecuteXmlDSigC14NTransform (C14NSpecExample1Input, false); Assert.AreEqual (C14NSpecExample1Output, res, "Example 1 from c14n spec - PIs, Comments, and Outside of Document Element (with comments)"); } @@ -203,10 +195,8 @@ namespace MonoTests.System.Security.Cryptography.Xml { vreader.ValidationType = ValidationType.None; vreader.EntityHandling = EntityHandling.ExpandCharEntities; doc.Load (vreader); -#if NET_2_0 if (resolver) transform.Resolver = new XmlUrlResolver (); -#endif transform.LoadInput (doc); return Stream2String ((Stream)transform.GetOutput ()); } diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs index 50fb9ba480f..7b56a240055 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NTransformTest.cs @@ -19,7 +19,6 @@ // output XML. So, they are *not* from c14n specification. // -#if NET_2_0 using System; using System.IO; @@ -598,4 +597,3 @@ namespace MonoTests.System.Security.Cryptography.Xml { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs index 7d1ca4b4071..9562da1864e 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigExcC14NWithCommentsTransformTest.cs @@ -14,7 +14,6 @@ // (C) 2008 Gert Driesen // -#if NET_2_0 using System; using System.IO; @@ -140,4 +139,3 @@ namespace MonoTests.System.Security.Cryptography.Xml { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs index a3fa4215609..43bb7f079bb 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXPathTransformTest.cs @@ -86,9 +86,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 [Ignore ("throws a NullReferenceException - but it's (kind of internal)")] -#endif public void GetInnerXml () { XmlNodeList xnl = transform.UnprotectedGetInnerXml (); @@ -105,9 +103,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { XmlNodeList inner = InnerXml (""); // empty transform.LoadInnerXml (inner); XmlNodeList xnl = (XmlNodeList) transform.GetOutput (); -#if NET_2_0 Assert.AreEqual (0, xnl.Count, "Count"); -#endif } private XmlDocument GetDoc () @@ -132,9 +128,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void LoadInputAsXmlDocument () { XmlDocument doc = GetDoc (); @@ -142,11 +136,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { XmlNodeList inner = InnerXml ("//*/title"); transform.LoadInnerXml (inner); XmlNodeList xnl = (XmlNodeList) transform.GetOutput (); -#if NET_2_0 Assert.AreEqual (73, xnl.Count); -#else - Assert.AreEqual (47, xnl.Count); -#endif } [Test] @@ -182,9 +172,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void LoadInputAsStream () { XmlDocument doc = GetDoc (); @@ -196,11 +184,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { XmlNodeList inner = InnerXml ("//*/title"); transform.LoadInnerXml (inner); XmlNodeList xnl = (XmlNodeList) transform.GetOutput (); -#if NET_2_0 Assert.AreEqual (73, xnl.Count); -#else - Assert.AreEqual (47, xnl.Count); -#endif } [Test] @@ -291,39 +275,22 @@ namespace MonoTests.System.Security.Cryptography.Xml { doc.LoadXml ("<element xmlns='urn:foo'><foo><bar>test</bar></foo></element>"); t.LoadInput (doc); nl = (XmlNodeList) t.GetOutput (); -#if NET_2_0 Assert.AreEqual (0, nl.Count, "1"); -#else - Assert.AreEqual (1, nl.Count, "1"); -#endif doc.LoadXml ("<element xmlns='urn:foo'><foo xmlns='urn:bar'><bar>test</bar></foo></element>"); t.LoadInput (doc); nl = (XmlNodeList) t.GetOutput (); -#if NET_2_0 Assert.AreEqual (0, nl.Count, "2"); -#else - Assert.AreEqual (2, nl.Count, "2"); -#endif doc.LoadXml ("<element xmlns='urn:foo' xmlns:x='urn:x'><foo xmlns='urn:bar'><bar>test</bar></foo></element>"); t.LoadInput (doc); nl = (XmlNodeList) t.GetOutput (); -#if NET_2_0 Assert.AreEqual (0, nl.Count, "3"); -#else - Assert.AreEqual (3, nl.Count, "3"); -#endif doc.LoadXml ("<envelope><Signature xmlns='http://www.w3.org/2000/09/xmldsig#'><XPath>blah</XPath></Signature></envelope>"); t.LoadInput (doc); nl = (XmlNodeList) t.GetOutput (); -#if NET_2_0 Assert.AreEqual (0, nl.Count, "4"); -#else - Assert.AreEqual (1, nl.Count, "4"); - Assert.AreEqual (XmlNodeType.Attribute, nl [0].NodeType, "NodeType"); -#endif } } } diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs index 2074c79333b..cc44b12d4c5 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlDsigXsltTransformTest.cs @@ -117,11 +117,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void EmptyXslt () { string test = "<Test>XmlDsigXsltTransform</Test>"; @@ -158,15 +154,10 @@ namespace MonoTests.System.Security.Cryptography.Xml { transform.LoadInnerXml (doc.ChildNodes); Stream s = (Stream) transform.GetOutput (); } -#if NET_2_0 catch (Exception e) { // we must deal with an internal exception result = (e.GetType ().ToString ().EndsWith ("XsltLoadException")); result = true; -#else - catch (XsltCompileException) { - result = true; -#endif } finally { Assert.IsTrue (result, "Exception not thrown"); @@ -174,11 +165,7 @@ namespace MonoTests.System.Security.Cryptography.Xml { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void OnlyInner () { string test = "<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\" xmlns=\"http://www.w3.org/TR/xhtml1/strict\" version=\"1.0\">"; diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs index ecc16f62a46..ab05a297dc4 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography.Xml/XmlLicenseTransformTest.cs @@ -13,7 +13,6 @@ // (C) 2008 Gert Driesen // -#if NET_2_0 using System; using System.IO; @@ -90,4 +89,3 @@ namespace MonoTests.System.Security.Cryptography.Xml { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCas.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCas.cs index 804dc18a2d2..c98b6c2341f 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCas.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -74,4 +73,3 @@ namespace MonoCasTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionCas.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionCas.cs index 3a70665d4e8..9ea196b0989 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionCas.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -76,4 +75,3 @@ namespace MonoCasTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionTest.cs index 5b58cb0c610..895c3d24e38 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -224,4 +223,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorCas.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorCas.cs index 4da810c6e1f..61ce72e4f52 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorCas.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -81,4 +80,3 @@ namespace MonoCasTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorTest.cs index edd4f8684a9..c732799402b 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeObjectEnumeratorTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -113,4 +112,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeTest.cs index 6f7543b2601..90a4dbe2d7e 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/CryptographicAttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -94,4 +93,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataCas.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataCas.cs index d552b927cf8..bc2e6aeb406 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataCas.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -171,4 +170,3 @@ namespace MonoCasTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataTest.cs index 41c39862fbd..f18ca734af9 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedDataTest.cs @@ -8,7 +8,6 @@ // Copyright (C) 2005 Novell, Inc (http://www.novell.com) // -#if NET_2_0 using NUnit.Framework; @@ -157,4 +156,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryCas.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryCas.cs index c9d01d46e35..2d98ae52cb5 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryCas.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -167,4 +166,3 @@ namespace MonoCasTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryTest.cs b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryTest.cs index 3e751691cbf..dab36660d2f 100644 --- a/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Cryptography/ProtectedMemoryTest.cs @@ -8,7 +8,6 @@ // Copyright (C) 2005 Novell, Inc (http://www.novell.com) // -#if NET_2_0 using NUnit.Framework; @@ -142,4 +141,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Security/Test/System.Security.Permissions/DataProtectionPermissionAttributeTest.cs b/mcs/class/System.Security/Test/System.Security.Permissions/DataProtectionPermissionAttributeTest.cs index 6e42c88429c..2ad9a384775 100644 --- a/mcs/class/System.Security/Test/System.Security.Permissions/DataProtectionPermissionAttributeTest.cs +++ b/mcs/class/System.Security/Test/System.Security.Permissions/DataProtectionPermissionAttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -198,4 +197,3 @@ namespace MonoTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs b/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs index ca996539d33..f566ec2c3df 100644 --- a/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs +++ b/mcs/class/System.Security/Test/standalone_tests/xmldsig.cs @@ -258,13 +258,6 @@ DumpSignedXml (s); // some documents references other documents in the directory Directory.SetCurrentDirectory ("phaos-xmldsig-three"); foreach (FileInfo fi in new DirectoryInfo (".").GetFiles ("signature-*.xml")) { -#if !NET_2_0 - if ((fi.Name.IndexOf ("exclusive") >= 0) && (!exc14n)) { - Console.WriteLine ("NOT RUN: " + fi.Name + " : System.Security.dll cannot validate exclusive-c14n."); - skip++; - continue; - } -#endif if ((fi.Name.IndexOf ("md5") >= 0) && (!hmacmd5)) { Console.WriteLine ("NOT RUN: " + fi.Name + " : System.Security.dll doesn't support HMAC-MD5."); skip++; diff --git a/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs b/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs index 1b2d4d957b6..6b404fb974a 100644 --- a/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs +++ b/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionAttributeTest.cs @@ -128,9 +128,7 @@ namespace MonoTests.System.ServiceProcess { case 13: case 32: case 92: -#if NET_2_0 case 133: -#endif case 160: // known invalid chars break; @@ -153,9 +151,7 @@ namespace MonoTests.System.ServiceProcess { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void ServiceName_Empty () { ServiceControllerPermissionAttribute a = new ServiceControllerPermissionAttribute (SecurityAction.Assert); diff --git a/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionTest.cs b/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionTest.cs index 68666c883a5..a9b3f2a06b9 100644 --- a/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionTest.cs +++ b/mcs/class/System.ServiceProcess/Test/System.ServiceProcess/ServiceControllerPermissionTest.cs @@ -83,9 +83,7 @@ namespace MonoTests.System.ServiceProcess { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void PermissionState_Bad () { PermissionState ps = (PermissionState)77; @@ -214,11 +212,7 @@ namespace MonoTests.System.ServiceProcess { public void IsSubset_Null () { ServiceControllerPermission scp = new ServiceControllerPermission (PermissionState.None); -#if NET_2_0 Assert.IsTrue (scp.IsSubsetOf (null), "null"); -#else - Assert.IsFalse (scp.IsSubsetOf (null), "null"); -#endif } [Test] @@ -337,12 +331,7 @@ namespace MonoTests.System.ServiceProcess { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - // Problem inherited from ResourcePermissionBase - [ExpectedException (typeof (NullReferenceException))] -#endif public void FromXml_Null () { ServiceControllerPermission scp = new ServiceControllerPermission (PermissionState.None); @@ -350,9 +339,7 @@ namespace MonoTests.System.ServiceProcess { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTag () { ServiceControllerPermission scp = new ServiceControllerPermission (PermissionState.None); @@ -364,9 +351,7 @@ namespace MonoTests.System.ServiceProcess { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTagCase () { ServiceControllerPermission scp = new ServiceControllerPermission (PermissionState.None); diff --git a/mcs/class/System.Transactions/System.Transactions/Configuration/DefaultSettingsSection.cs b/mcs/class/System.Transactions/System.Transactions/Configuration/DefaultSettingsSection.cs index 784df48d06f..23431165ecd 100644 --- a/mcs/class/System.Transactions/System.Transactions/Configuration/DefaultSettingsSection.cs +++ b/mcs/class/System.Transactions/System.Transactions/Configuration/DefaultSettingsSection.cs @@ -7,7 +7,7 @@ // (C) 2010 Pablo Ruiz. // -#if NET_2_0 && !MOBILE +#if !MOBILE using System; using System.Collections.Generic; diff --git a/mcs/class/System.Transactions/System.Transactions/Configuration/MachineSettingsSection.cs b/mcs/class/System.Transactions/System.Transactions/Configuration/MachineSettingsSection.cs index 2091b8c3b24..10f81999789 100644 --- a/mcs/class/System.Transactions/System.Transactions/Configuration/MachineSettingsSection.cs +++ b/mcs/class/System.Transactions/System.Transactions/Configuration/MachineSettingsSection.cs @@ -7,7 +7,7 @@ // (C) 2010 Pablo Ruiz. // -#if NET_2_0 && !MOBILE +#if !MOBILE using System; using System.Collections.Generic; diff --git a/mcs/class/System.Transactions/System.Transactions/Configuration/TransactionsSectionGroup.cs b/mcs/class/System.Transactions/System.Transactions/Configuration/TransactionsSectionGroup.cs index 3a4e7aa05c7..9e7b0be2d73 100644 --- a/mcs/class/System.Transactions/System.Transactions/Configuration/TransactionsSectionGroup.cs +++ b/mcs/class/System.Transactions/System.Transactions/Configuration/TransactionsSectionGroup.cs @@ -7,7 +7,7 @@ // (C) 2010 Pablo Ruiz. // -#if NET_2_0 && !MOBILE +#if !MOBILE using System; using System.Collections.Generic; diff --git a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs index aefa417073e..be3201d18c6 100644 --- a/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs +++ b/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs @@ -56,7 +56,7 @@ namespace System.Web.Services.Description { ServiceDescriptionCollection serviceDescriptions; ServiceDescriptionImportStyle style; -#if NET_2_0 && !MOBILE +#if !MOBILE CodeGenerationOptions options; CodeDomProvider codeGenerator = new CSharpCodeProvider (); ImportContext context; @@ -100,7 +100,7 @@ namespace System.Web.Services.Description { set { style = value; } } -#if NET_2_0 && !MOBILE +#if !MOBILE [System.Runtime.InteropServices.ComVisible(false)] public CodeGenerationOptions CodeGenerationOptions { get { return options; } @@ -165,7 +165,7 @@ namespace System.Web.Services.Description { } #endif -#if NET_2_0 && !MOBILE +#if !MOBILE [MonoTODO] // where to use Verbose and Extensions in options? public static StringCollection GenerateWebReferences ( diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/DiagnosticsElementTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/DiagnosticsElementTest.cs index ad9b2929dcd..8a3d209e0c0 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/DiagnosticsElementTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/DiagnosticsElementTest.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.Web.Services.Configuration; @@ -58,4 +57,3 @@ namespace MonoTests.System.Web.Services { } } -#endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/ProtocolElementTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/ProtocolElementTest.cs index 4bf56383f73..9d211921dd8 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/ProtocolElementTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/ProtocolElementTest.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.Web.Services.Configuration; @@ -60,4 +59,3 @@ namespace MonoTests.System.Web.Services { } } -#endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs index 5a097584ca0..67802853c6d 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapEnvelopeProcessingElementTest.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.Web.Services.Configuration; @@ -67,4 +66,3 @@ namespace MonoTests.System.Web.Services { } } -#endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs index 92294f4218d..3853733befb 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapExtensionTypeElementTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/SoapExtensionTypeElementTest.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.Configuration; @@ -91,4 +90,3 @@ namespace MonoTests.System.Web.Services { } } -#endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/TypeElementTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/TypeElementTest.cs index ed2fd31363a..9d69a220798 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/TypeElementTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/TypeElementTest.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.Web.Services.Configuration; @@ -68,4 +67,3 @@ namespace MonoTests.System.Web.Services.Configuration { } } -#endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs index b63abef4238..f1680a3a7ff 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.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.Web.Services.Configuration; @@ -56,4 +55,3 @@ namespace MonoTests.System.Web.Services { } } -#endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsiProfilesElementTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsiProfilesElementTest.cs index 54ab9b7e029..46721532630 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsiProfilesElementTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Configuration/WsiProfilesElementTest.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.Web.Services; @@ -60,4 +59,3 @@ namespace MonoTests.System.Web.Services { } } -#endif diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionReflectorTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionReflectorTest.cs index 3fdd90de507..2b6e21893b9 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionReflectorTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionReflectorTest.cs @@ -27,7 +27,6 @@ namespace MonoTests.System.Web.Services.Description [TestFixture] public class ServiceDescriptionReflectorTest { -#if NET_2_0 [Test] public void ReflectNullableInt () { @@ -49,7 +48,6 @@ namespace MonoTests.System.Web.Services.Description XmlSchemaElement e2 = s.Items [0] as XmlSchemaElement; Assert.IsTrue (e2.IsNillable); } -#endif [Test] [Category ("NotWorking")] public void IncludeTest () @@ -70,20 +68,12 @@ namespace MonoTests.System.Web.Services.Description Assert.AreEqual (string.Format(CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<wsdl:definitions xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\" xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\"" + " xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\"" + " xmlns:tns=\"http://tempuri.org/\" xmlns:s=\"http://www.w3.org/2001/XMLSchema\"" + " xmlns:soap12=\"http://schemas.xmlsoap.org/wsdl/soap12/\"" + " xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" targetNamespace=\"http://tempuri.org/\"" + " xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">{0}" + -#else - "<wsdl:definitions xmlns:http=\"http://schemas.xmlsoap.org/wsdl/http/\" xmlns:soap=\"http://schemas.xmlsoap.org/wsdl/soap/\"" + - " xmlns:s=\"http://www.w3.org/2001/XMLSchema\" xmlns:soapenc=\"http://schemas.xmlsoap.org/soap/encoding/\"" + - " xmlns:tns=\"http://tempuri.org/\" xmlns:tm=\"http://microsoft.com/wsdl/mime/textMatching/\"" + - " xmlns:mime=\"http://schemas.xmlsoap.org/wsdl/mime/\" targetNamespace=\"http://tempuri.org/\"" + - " xmlns:wsdl=\"http://schemas.xmlsoap.org/wsdl/\">{0}" + -#endif " <wsdl:types>{0}" + " <s:schema elementFormDefault=\"qualified\" targetNamespace=\"http://tempuri.org/\">{0}" + " <s:element name=\"EchoString\">{0}" + @@ -152,11 +142,7 @@ namespace MonoTests.System.Web.Services.Description " </wsdl:operation>{0}" + " </wsdl:portType>{0}" + " <wsdl:binding name=\"IncludeTestServicesSoap\" type=\"tns:IncludeTestServicesSoap\">{0}" + -#if NET_2_0 " <soap:binding transport=\"http://schemas.xmlsoap.org/soap/http\" />{0}" + -#else - " <soap:binding transport=\"http://schemas.xmlsoap.org/soap/http\" style=\"document\" />{0}" + -#endif " <wsdl:operation name=\"EchoString\">{0}" + " <soap:operation soapAction=\"http://tempuri.org/EchoString\" style=\"document\" />{0}" + " <wsdl:input>{0}" + @@ -176,7 +162,6 @@ namespace MonoTests.System.Web.Services.Description " </wsdl:output>{0}" + " </wsdl:operation>{0}" + " </wsdl:binding>{0}" + -#if NET_2_0 " <wsdl:binding name=\"IncludeTestServicesSoap12\" type=\"tns:IncludeTestServicesSoap\">{0}" + " <soap12:binding transport=\"http://schemas.xmlsoap.org/soap/http\" />{0}" + " <wsdl:operation name=\"EchoString\">{0}" + @@ -198,7 +183,6 @@ namespace MonoTests.System.Web.Services.Description " </wsdl:output>{0}" + " </wsdl:operation>{0}" + " </wsdl:binding>{0}" + -#endif " <wsdl:service name=\"IncludeTestServices\">{0}" + #if ONLY_1_1 " <documentation xmlns=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + @@ -206,11 +190,9 @@ namespace MonoTests.System.Web.Services.Description " <wsdl:port name=\"IncludeTestServicesSoap\" binding=\"tns:IncludeTestServicesSoap\">{0}" + " <soap:address location=\"http://localhost/IncludeTestServices.asmx\" />{0}" + " </wsdl:port>{0}" + -#if NET_2_0 " <wsdl:port name=\"IncludeTestServicesSoap12\" binding=\"tns:IncludeTestServicesSoap12\">{0}" + " <soap12:address location=\"http://localhost/IncludeTestServices.asmx\" />{0}" + " </wsdl:port>{0}" + -#endif " </wsdl:service>{0}" + "</wsdl:definitions>", Environment.NewLine), sw.ToString (), "#5"); } @@ -230,13 +212,8 @@ namespace MonoTests.System.Web.Services.Description Assert.IsNotNull (r.ServiceDescriptions ["www.DefaultNamespace.org"], "#1-1"); ServiceDescription sd = r.ServiceDescriptions ["urn:localBinding:local"]; Assert.IsNotNull (sd, "#1-2"); -#if NET_2_0 // Soap and Soap12 Assert.AreEqual (2, sd.Bindings.Count, "#2-2.0"); -#else - // Soap - Assert.AreEqual (1, sd.Bindings.Count, "#2-1.1"); -#endif Binding b = sd.Bindings [0]; Assert.AreEqual ("Local", b.Name, "#3"); } @@ -264,7 +241,6 @@ namespace MonoTests.System.Web.Services.Description Assert.AreEqual (String.Empty, sob.SoapAction); } -#if NET_2_0 [Test] public void Bug332150 () { @@ -307,7 +283,6 @@ namespace MonoTests.System.Web.Services.Description // Make sure the map for service client is properly created new Bug360241SoapHttpClientProtocol (); } -#endif public class IncludeTestServices : WebService { @@ -343,7 +318,6 @@ namespace MonoTests.System.Web.Services.Description { } -#if NET_2_0 public class NullableContainer { [WebMethod (Description="Test nullables")] @@ -352,7 +326,6 @@ namespace MonoTests.System.Web.Services.Description return null; } } -#endif // bug #78953 [WebServiceAttribute (Namespace = "www.DefaultNamespace.org")] @@ -430,7 +403,6 @@ namespace MonoTests.System.Web.Services.Description } } -#if NET_2_0 [WebService (Namespace = "http://tempuri.org/")] [WebServiceBinding (ConformsTo = WsiProfiles.BasicProfile1_1)] public abstract class Bug332150SecureWebService : WebService @@ -477,7 +449,6 @@ namespace MonoTests.System.Web.Services.Description public class Bug360241SoapHttpClientProtocol : SoapHttpClientProtocol { } -#endif } } diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs index a0c0489d701..943d903a4dc 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Description/ServiceDescriptionTest.cs @@ -55,7 +55,6 @@ namespace MonoTests.System.Web.Services.Description Assert.AreEqual (String.Empty, sd.RetrievalUrl, "#2"); } -#if NET_2_0 [Test] public void Namespaces () { @@ -189,7 +188,6 @@ namespace MonoTests.System.Web.Services.Description ServiceDescription sd = ServiceDescription.Read (XmlReader.Create (new StringReader ("<definitions xmlns='http://schemas.xmlsoap.org/wsdl/'><hoge/></definitions>")), true); Assert.IsTrue (sd.ValidationWarnings.Count > 0); } -#endif } diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/WebClientProtocolTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/WebClientProtocolTest.cs index 643e587dedd..78ea003bc86 100644 --- a/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/WebClientProtocolTest.cs +++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Protocols/WebClientProtocolTest.cs @@ -42,7 +42,6 @@ namespace MonoTests.System.Web.Services.Protocols { } -#if NET_2_0 [Test] public void TestUseDefaultCredentials () { Poker client = new Poker (); @@ -56,6 +55,5 @@ namespace MonoTests.System.Web.Services.Protocols client.Credentials = CredentialCache.DefaultCredentials; Assert.IsTrue (client.UseDefaultCredentials, "#5"); } -#endif } }
\ No newline at end of file diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/ListBox.cs b/mcs/class/System.Web/System.Web.UI.WebControls/ListBox.cs index d8d5b9441dc..c3517c57754 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/ListBox.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/ListBox.cs @@ -49,7 +49,7 @@ namespace System.Web.UI.WebControls { } [Browsable(false)] -#if NET_2_0 && HAVE_CONTROL_ADAPTERS +#if HAVE_CONTROL_ADAPTERS public virtual new #else public override @@ -60,7 +60,7 @@ namespace System.Web.UI.WebControls { } [Browsable(false)] -#if NET_2_0 && HAVE_CONTROL_ADAPTERS +#if HAVE_CONTROL_ADAPTERS public virtual new #else public override @@ -71,7 +71,7 @@ namespace System.Web.UI.WebControls { } [Browsable(false)] -#if NET_2_0 && HAVE_CONTROL_ADAPTERS +#if HAVE_CONTROL_ADAPTERS public virtual new #else public override diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs b/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs index f808807a364..6a6f99a07b2 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/Panel.cs @@ -54,9 +54,6 @@ namespace System.Web.UI.WebControls { string image = BackImageUrl; if (image != "") { image = ResolveClientUrl (image); -#if !NET_2_0 // see HtmlTextWriter.WriteStyleAttribute(string, string, bool) - image = String.Concat ("url(", image, ")"); -#endif w.AddStyleAttribute (HtmlTextWriterStyle.BackgroundImage, image); } diff --git a/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs b/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs index 1840e3cf479..6bf945c5a2e 100644 --- a/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs +++ b/mcs/class/System.Web/System.Web.UI.WebControls/TextBox.cs @@ -370,7 +370,7 @@ namespace System.Web.UI.WebControls { } } -#if NET_2_0 && HAVE_CONTROL_ADAPTERS +#if HAVE_CONTROL_ADAPTERS protected virtual new #else protected override diff --git a/mcs/class/System.Web/Test/System.Web.Caching/AggregateCacheDependencyTest.cs b/mcs/class/System.Web/Test/System.Web.Caching/AggregateCacheDependencyTest.cs index 074c13d3b9e..50d556607a0 100644 --- a/mcs/class/System.Web/Test/System.Web.Caching/AggregateCacheDependencyTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Caching/AggregateCacheDependencyTest.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.IO; using System.Text; @@ -173,4 +172,3 @@ namespace MonoTests.System.Web.Caching } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/AppResourcesCompilerTest.cs b/mcs/class/System.Web/Test/System.Web.Compilation/AppResourcesCompilerTest.cs index 2529adb156f..4c83cf7c903 100644 --- a/mcs/class/System.Web/Test/System.Web.Compilation/AppResourcesCompilerTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Compilation/AppResourcesCompilerTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Web; using System.Web.Compilation; @@ -58,4 +57,3 @@ namespace MonoTests.System.Web.Compilation } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/AppSettingsExpressionBuilderTest.cs b/mcs/class/System.Web/Test/System.Web.Compilation/AppSettingsExpressionBuilderTest.cs index a836410fa33..7bf07e3c7a5 100644 --- a/mcs/class/System.Web/Test/System.Web.Compilation/AppSettingsExpressionBuilderTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Compilation/AppSettingsExpressionBuilderTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -237,4 +236,3 @@ namespace MonoTests.System.Web.Compilation } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/ClientBuildManagerParameterTest.cs b/mcs/class/System.Web/Test/System.Web.Compilation/ClientBuildManagerParameterTest.cs index e339d76de76..10e5f224c12 100644 --- a/mcs/class/System.Web/Test/System.Web.Compilation/ClientBuildManagerParameterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Compilation/ClientBuildManagerParameterTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -55,4 +54,3 @@ namespace MonoTests.System.Web.Compilation { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs index 9adcf765873..e26d38a9b18 100644 --- a/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Compilation/TemplateControlCompilerTest.cs @@ -20,7 +20,6 @@ namespace MonoTests.System.Web.Compilation { } -#if NET_2_0 public class BindTestDataItem { int data; @@ -42,7 +41,6 @@ namespace MonoTests.System.Web.Compilation { return new List <BindTestDataItem> {new BindTestDataItem (0), new BindTestDataItem (1)}; } } -#endif [TestFixture] public class TemplateControlCompilerTest @@ -62,7 +60,6 @@ namespace MonoTests.System.Web.Compilation { WebTest.CopyResource (GetType (), "DuplicateControlsInClientComment.aspx", "DuplicateControlsInClientComment.aspx"); WebTest.CopyResource (GetType (), "TagsNestedInClientTag.aspx", "TagsNestedInClientTag.aspx"); WebTest.CopyResource (GetType (), "ConditionalClientComments.aspx", "ConditionalClientComments.aspx"); -#if NET_2_0 WebTest.CopyResource (GetType (), "InvalidPropertyBind1.aspx", "InvalidPropertyBind1.aspx"); WebTest.CopyResource (GetType (), "InvalidPropertyBind2.aspx", "InvalidPropertyBind2.aspx"); WebTest.CopyResource (GetType (), "InvalidPropertyBind3.aspx", "InvalidPropertyBind3.aspx"); @@ -83,7 +80,6 @@ namespace MonoTests.System.Web.Compilation { WebTest.CopyResource (GetType (), "NestedParserFileText.aspx", "NestedParserFileText.aspx"); WebTest.CopyResource (GetType (), "TagWithExpressionWithinAttribute.aspx", "TagWithExpressionWithinAttribute.aspx"); WebTest.CopyResource (GetType (), "EnumConverter_Bug578586.aspx", "EnumConverter_Bug578586.aspx"); -#endif } [Test] @@ -94,7 +90,6 @@ namespace MonoTests.System.Web.Compilation { new WebTest ("ReadOnlyPropertyBind.aspx").Run (); } -#if NET_2_0 // Test for bug #449970 [Test] public void MasterPageContentPlaceHolderInTemplate () @@ -272,7 +267,6 @@ namespace MonoTests.System.Web.Compilation { HtmlDiff.AssertAreEqual (originalHtml, renderedHtml, "#A1"); } -#endif [Test (Description="Bug #323719")] public void TagsNestedInClientTag () { diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/AnonymousIdentificationSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/AnonymousIdentificationSectionTest.cs index bcd3aae0ab8..743ef5db1bf 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/AnonymousIdentificationSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/AnonymousIdentificationSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -92,4 +91,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyCollectionTest.cs index 38b936b64ca..748e92c0d91 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -70,4 +69,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyInfoTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyInfoTest.cs index a67845b8403..2067faa8f3b 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyInfoTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/AssemblyInfoTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -69,4 +68,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/AuthenticationSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/AuthenticationSectionTest.cs index 362ccb577eb..f3dbf81eeb8 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/AuthenticationSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/AuthenticationSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -57,4 +56,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleCollectionTest.cs index 9d783704834..ed991a787d4 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -106,4 +105,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleTest.cs index 768a4d0d014..d153d4ef08f 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationRuleTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -187,4 +186,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationSectionTest.cs index 5483120c820..a585253919b 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/AuthorizationSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -54,4 +53,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/BufferModeSettingsTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/BufferModeSettingsTest.cs index 6a209b7ea12..7d66264a260 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/BufferModeSettingsTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/BufferModeSettingsTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -99,4 +98,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/BuildProviderTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/BuildProviderTest.cs index 4daee4ff5c7..64d5d02d371 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/BuildProviderTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/BuildProviderTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -88,4 +87,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/CacheSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/CacheSectionTest.cs index 7603994cebd..398803f9a4e 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/CacheSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/CacheSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -71,4 +70,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetSectionTest.cs index 9519a646813..fae3c5a1e74 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -53,4 +52,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetTest.cs index 225d0a29c54..491b6c0c065 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/ClientTargetTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -74,4 +73,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/CodeSubDirectoryTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/CodeSubDirectoryTest.cs index c2e1c540916..b34b364de87 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/CodeSubDirectoryTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/CodeSubDirectoryTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -76,4 +75,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/CompilationSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/CompilationSectionTest.cs index 707dd24c6f3..6069561e82b 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/CompilationSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/CompilationSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -71,4 +70,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorCollectionTest.cs index 3fee0ea0a8f..e261dacb2d0 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -129,4 +128,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorsSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorsSectionTest.cs index 07c914b3096..f9c7bbf6e34 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorsSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/CustomErrorsSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -54,4 +53,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/DeploymentSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/DeploymentSectionTest.cs index ab7097c2d47..3ebd8ce2e09 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/DeploymentSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/DeploymentSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -52,4 +51,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs index 2c8f4f1277e..8154e70c7a5 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/GlobalizationSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -182,4 +181,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/HealthMonitoringSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/HealthMonitoringSectionTest.cs index 46b209c138a..4c6e7770fe3 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/HealthMonitoringSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/HealthMonitoringSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -58,4 +57,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/HostingEnvironmentSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/HostingEnvironmentSectionTest.cs index 81a1752c595..3b3a185a8f6 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/HostingEnvironmentSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/HostingEnvironmentSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -70,4 +69,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs index 3df6febb6fc..f99158367cc 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/MachineKeyValidationConverterTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Web.Configuration; @@ -193,4 +192,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/NullableStringValidatorTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/NullableStringValidatorTest.cs index 9df624d2537..8e3081a2b4c 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/NullableStringValidatorTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/NullableStringValidatorTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -95,4 +94,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/ProfilePropertySettingsTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/ProfilePropertySettingsTest.cs index 63507c48b13..2510b92d966 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/ProfilePropertySettingsTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/ProfilePropertySettingsTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -84,4 +83,3 @@ namespace MonoTests.System.Web.Configuration { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/SiteMapSectionTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/SiteMapSectionTest.cs index a32e2560d6d..4d396d40064 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/SiteMapSectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/SiteMapSectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -52,4 +51,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Configuration/WebConfigurationManagerTest.cs b/mcs/class/System.Web/Test/System.Web.Configuration/WebConfigurationManagerTest.cs index dbd088a1b2c..3815fa7323d 100644 --- a/mcs/class/System.Web/Test/System.Web.Configuration/WebConfigurationManagerTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Configuration/WebConfigurationManagerTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -229,4 +228,3 @@ namespace MonoTests.System.Web.Configuration { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/AppDomainFactoryCas.cs b/mcs/class/System.Web/Test/System.Web.Hosting/AppDomainFactoryCas.cs index 08964025b23..7b0228f965b 100644 --- a/mcs/class/System.Web/Test/System.Web.Hosting/AppDomainFactoryCas.cs +++ b/mcs/class/System.Web/Test/System.Web.Hosting/AppDomainFactoryCas.cs @@ -62,9 +62,7 @@ namespace MonoCasTests.System.Web.Hosting { [Test] [AspNetHostingPermission (SecurityAction.Deny, Level = AspNetHostingPermissionLevel.Minimal)] -#if NET_2_0 [ExpectedException (typeof (SecurityException))] -#endif public void Constructor_Deny_AspNetHostingPermission () { new AppDomainFactory (); diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs b/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs index b7f4d5138d9..a00f205e6c9 100644 --- a/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Hosting/ApplicationHostTest.cs @@ -169,11 +169,7 @@ namespace MonoTests.System.Web.Hosting { //Assert.AreEqual (LoaderOptimization.NotSpecified, setup.LoaderOptimization); p ("LoaderOptimization is: ", setup.LoaderOptimization); Assert.AreEqual (0, string.Compare ( -#if NET_2_0 String.Format ("{0}{1}bin", tb, Path.DirectorySeparatorChar), -#else - "bin", -#endif setup.PrivateBinPath, true), "D9" ); Assert.AreEqual (setup.PrivateBinPathProbe, "*", "D10"); diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/HostingEnvironmentTest.cs b/mcs/class/System.Web/Test/System.Web.Hosting/HostingEnvironmentTest.cs index 2f039d02894..22f3996e76b 100644 --- a/mcs/class/System.Web/Test/System.Web.Hosting/HostingEnvironmentTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Hosting/HostingEnvironmentTest.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.Web.Hosting; using NUnit.Framework; @@ -120,5 +119,4 @@ namespace MonoTests.System.Web.Hosting { } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/ISAPIRuntimeCas.cs b/mcs/class/System.Web/Test/System.Web.Hosting/ISAPIRuntimeCas.cs index f54075acd4f..de0d00200d9 100644 --- a/mcs/class/System.Web/Test/System.Web.Hosting/ISAPIRuntimeCas.cs +++ b/mcs/class/System.Web/Test/System.Web.Hosting/ISAPIRuntimeCas.cs @@ -62,9 +62,7 @@ namespace MonoCasTests.System.Web.Hosting { [Test] [AspNetHostingPermission (SecurityAction.Deny, Level = AspNetHostingPermissionLevel.Minimal)] -#if NET_2_0 [ExpectedException (typeof (SecurityException))] -#endif public void Constructor_Deny_AspNetHostingPermission () { new ISAPIRuntime (); @@ -93,15 +91,9 @@ namespace MonoCasTests.System.Web.Hosting { try { isapi.ProcessRequest (IntPtr.Zero, 0); } -#if NET_2_0 catch (AccessViolationException) { // fx2.0 } -#else - catch (NullReferenceException) { - // fx1.x - } -#endif catch (NotImplementedException) { // mono } @@ -111,21 +103,17 @@ namespace MonoCasTests.System.Web.Hosting { catch (NotImplementedException) { // mono } -#if NET_2_0 try { isapi.InitializeLifetimeService (); } catch (NotImplementedException) { // mono } -#endif } [Test] [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] -#if NET_2_0 [ExpectedException (typeof (SecurityException))] -#endif public void StopProcessing_Deny_UnmanagedCode () { try { diff --git a/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs b/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs index 8e2904063f8..79098c3ca3a 100644 --- a/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Hosting/VirtualPathProviderTest.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; using System.IO; @@ -180,5 +179,4 @@ namespace MonoTests.System.Web.Hosting { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs b/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs index 6ae556ccfb5..fa477a7398e 100644 --- a/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Profile/ProfileInfoTest.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.Text; using System.Web; @@ -54,4 +53,3 @@ namespace MonoTests.System.Web.Profile { } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTest.cs b/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTest.cs index 63b9c466ddf..90518bfcf91 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTest.cs @@ -37,7 +37,6 @@ namespace MonoTests.System.Web.Security Assert.AreEqual ("/", FormsAuthentication.FormsCookiePath, "FormsCookiePath"); Assert.IsFalse (FormsAuthentication.RequireSSL, "RequireSSL"); Assert.IsTrue (FormsAuthentication.SlidingExpiration, "SlidingExpiration"); -#if NET_2_0 // MSDN: The default is an empty string ("") but null. Assert.AreEqual ("", FormsAuthentication.CookieDomain, "CookieDomain"); Assert.AreEqual (HttpCookieMode.UseDeviceProfile, FormsAuthentication.CookieMode, "CookieMode"); @@ -45,7 +44,6 @@ namespace MonoTests.System.Web.Security Assert.AreEqual ("/NunitWeb/default.aspx", FormsAuthentication.DefaultUrl); Assert.IsFalse (FormsAuthentication.EnableCrossAppRedirects, "EnableCrossAppRedirects"); Assert.AreEqual ("/NunitWeb/login.aspx", FormsAuthentication.LoginUrl, "LoginUrl"); -#endif } [Test] @@ -108,7 +106,6 @@ namespace MonoTests.System.Web.Security { FormsAuthentication.HashPasswordForStoringInConfigFile ("mono", "SHA256"); } -#if NET_2_0 [Test] [ExpectedException (typeof (NullReferenceException))] public void RedirectToLoginPage () @@ -139,7 +136,6 @@ namespace MonoTests.System.Web.Security // not throwing Assert.IsFalse (FormsAuthentication.Authenticate ("user", "password"), "string,string"); } -#endif [TestFixtureTearDown] public void TestFixtureTearDown() diff --git a/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTicketCas.cs b/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTicketCas.cs index 32473240947..8c24fbb6bb1 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTicketCas.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/FormsAuthenticationTicketCas.cs @@ -52,11 +52,7 @@ namespace MonoCasTests.System.Web.Security { ticket = new FormsAuthenticationTicket ("mine", false, Int32.MaxValue); } catch (NullReferenceException) { -#if NET_2_0 Assert.Fail ("this should work on 2.0"); -#else - Assert.Ignore ("fails with NullReferenceException on MS 1.x"); -#endif } Assert.AreEqual ("/", ticket.CookiePath, "CookiePath"); Assert.IsTrue (ticket.Expiration.Year >= 6088, "Expiration"); @@ -78,11 +74,7 @@ namespace MonoCasTests.System.Web.Security { ticket = new FormsAuthenticationTicket (1, "mine", DateTime.MinValue, DateTime.MaxValue, true, "data"); } catch (NullReferenceException) { -#if NET_2_0 Assert.Fail ("this should work on 2.0"); -#else - Assert.Ignore ("fails with NullReferenceException on MS 1.x"); -#endif } Assert.AreEqual ("/", ticket.CookiePath, "CookiePath"); Assert.AreEqual (DateTime.MaxValue, ticket.Expiration, "Expiration"); diff --git a/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderCollectionTest.cs index a5fca94a31b..c5eb2a20810 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderCollectionTest.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.Collections.Specialized; @@ -74,4 +73,3 @@ namespace MonoTests.System.Web.Security { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderTest.cs b/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderTest.cs index 6137fbd229f..5dcc0bcf894 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/MembershipProviderTest.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.Configuration.Provider; @@ -214,4 +213,3 @@ namespace MonoTests.System.Web.Security { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Security/MembershipTest.cs b/mcs/class/System.Web/Test/System.Web.Security/MembershipTest.cs index a42ca980f47..6169a23520b 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/MembershipTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/MembershipTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Text; @@ -90,4 +89,3 @@ namespace MonoTests.System.Web.Security { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Security/MembershipUserCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.Security/MembershipUserCollectionTest.cs index f6b33cb9f9e..cd2958f8565 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/MembershipUserCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/MembershipUserCollectionTest.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.Collections; @@ -152,4 +151,3 @@ namespace MonoTests.System.Web.Security { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Security/RolePrincipalTest.cs b/mcs/class/System.Web/Test/System.Web.Security/RolePrincipalTest.cs index 67de9b948fe..365073e0f24 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/RolePrincipalTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/RolePrincipalTest.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.Configuration.Provider; @@ -128,4 +127,3 @@ namespace MonoTests.System.Web.Security { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Security/RolesTest.cs b/mcs/class/System.Web/Test/System.Web.Security/RolesTest.cs index 7045f5f113f..912e8f4cc0f 100644 --- a/mcs/class/System.Web/Test/System.Web.Security/RolesTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Security/RolesTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -91,4 +90,3 @@ namespace MonoTests.System.Web.Security { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.SessionState/StateRuntimeCas.cs b/mcs/class/System.Web/Test/System.Web.SessionState/StateRuntimeCas.cs index 11a877c9570..8dfe0e67553 100644 --- a/mcs/class/System.Web/Test/System.Web.SessionState/StateRuntimeCas.cs +++ b/mcs/class/System.Web/Test/System.Web.SessionState/StateRuntimeCas.cs @@ -74,9 +74,7 @@ namespace MonoCasTests.System.Web.SessionState { [Test] [AspNetHostingPermission (SecurityAction.Deny, Level = AspNetHostingPermissionLevel.Minimal)] -#if NET_2_0 [ExpectedException (typeof (SecurityException))] -#endif public void Constructor_Deny_Minimal () { try { @@ -88,9 +86,7 @@ namespace MonoCasTests.System.Web.SessionState { } [Test] -#if NET_2_0 [AspNetHostingPermission (SecurityAction.PermitOnly, Level = AspNetHostingPermissionLevel.Minimal)] -#endif [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)] public void Constructor_PermitOnly_UnmanagedCodeMinimal () { @@ -133,7 +129,6 @@ namespace MonoCasTests.System.Web.SessionState { runtime.ProcessRequest (IntPtr.Zero, 0, null, 0, 0, 0, 0, 0, IntPtr.Zero); } -#if NET_2_0 [Test] [AspNetHostingPermission (SecurityAction.PermitOnly, Level = AspNetHostingPermissionLevel.Medium)] public void ProcessRequest10_PermitOnly_Medium () @@ -162,7 +157,6 @@ namespace MonoCasTests.System.Web.SessionState { runtime.ProcessRequest (IntPtr.Zero, 0, null, 0, 0, 0, 0, 0, 0, IntPtr.Zero); } -#endif [Test] [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)] diff --git a/mcs/class/System.Web/Test/System.Web.UI.Adapters/ControlAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.Adapters/ControlAdapterTest.cs index 5bc0ee8a220..8fc8ef7d7a8 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.Adapters/ControlAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.Adapters/ControlAdapterTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.Collections; @@ -413,4 +412,3 @@ namespace MonoTests.System.Web.UI.Adapters #endregion } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs index 1990089323b..4dd44ce0388 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.Adapters/PageAdapterTest.cs @@ -26,7 +26,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && !TARGET_DOTNET +#if !TARGET_DOTNET using NUnit.Framework; using System; using System.Collections; diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlAnchorTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlAnchorTest.cs index 560d45f4ea1..b9c4f5c80ce 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlAnchorTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlAnchorTest.cs @@ -45,12 +45,10 @@ namespace MonoTests.System.Web.UI.HtmlControls { base.RenderAttributes (writer); return writer; } -#if NET_2_0 public void Raise () { base.RaisePostBackEvent ("2.0"); } -#endif public void TrakState () { TrackViewState(); @@ -292,9 +290,7 @@ namespace MonoTests.System.Web.UI.HtmlControls { } [Test] -#if NET_2_0 [ExpectedException (typeof (NullReferenceException))] // since 2.0 RC :-( -#endif public void IPostBackEventHandler_RaisePostBackEvent () { TestHtmlAnchor a = new TestHtmlAnchor (); @@ -313,7 +309,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { HtmlTextWriter writer = a.GetWriter (); Assert.AreEqual (" href=\"http://127.0.0.1/\"", writer.InnerWriter.ToString (), "#01"); } -#if NET_2_0 [Test] [ExpectedException (typeof (NullReferenceException))] // since 2.0 RC :-( public void RaisePostBackEvent () @@ -341,6 +336,5 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.AreEqual (false, copy.CausesValidation, "A1"); Assert.AreEqual ("VG", copy.ValidationGroup, "A2"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlButtonTest.cs index 5fe8ea47fc9..5539ddb803a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlButtonTest.cs @@ -68,9 +68,7 @@ namespace MonoTests.System.Web.UI.HtmlControls { HtmlButtonPoker p = new HtmlButtonPoker (); Assert.IsTrue (p.CausesValidation, "A1"); -#if NET_2_0 Assert.AreEqual ("", p.ValidationGroup, "A2"); -#endif } [Test] @@ -93,16 +91,12 @@ namespace MonoTests.System.Web.UI.HtmlControls { { HtmlButtonPoker p = new HtmlButtonPoker (); p.CausesValidation = true; -#if NET_2_0 p.ValidationGroup = "VG"; -#endif object state = p.SaveState(); HtmlButtonPoker copy = new HtmlButtonPoker (); copy.LoadState (state); -#if NET_2_0 Assert.AreEqual ("VG", copy.ValidationGroup, "A1"); -#endif Assert.IsTrue (copy.CausesValidation, "A2"); } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlEmptyTagControlBuilderCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlEmptyTagControlBuilderCas.cs index 68b6faf743a..3f23b337839 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlEmptyTagControlBuilderCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlEmptyTagControlBuilderCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -46,4 +45,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormCas.cs index a70e1295325..c2622ca9fc8 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormCas.cs @@ -51,9 +51,7 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { unit.ViewState (); unit.Name_InsideNaming (); unit.RenderChildren (); -#if NET_2_0 unit.ControlCollection (); -#endif } public override Type Type { diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs index 1e396709536..58b7881c24a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlFormTest.cs @@ -55,12 +55,10 @@ namespace MonoTests.System.Web.UI.HtmlControls { } } -#if NET_2_0 public void SetContext () { SetContext (Context); } -#endif } public class FormPoker : HtmlForm { @@ -104,12 +102,10 @@ namespace MonoTests.System.Web.UI.HtmlControls { return sw.ToString (); } -#if NET_2_0 public ControlCollection GetControlCollection () { return CreateControlCollection(); } -#endif } class FUControl : UserControl { @@ -131,9 +127,7 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.AreEqual ("form", form.TagName, "TagName"); -#if NET_2_0 Assert.IsFalse (form.SubmitDisabledControls, "TagName"); -#endif } [Test] @@ -150,13 +144,11 @@ namespace MonoTests.System.Web.UI.HtmlControls { form.Target = null; Assert.AreEqual (String.Empty, form.Target, "Target"); -#if NET_2_0 form.DefaultButton = null; Assert.AreEqual (String.Empty, form.DefaultButton, "DefaultButton"); form.DefaultFocus = null; Assert.AreEqual (String.Empty, form.DefaultFocus, "DefaultFocus"); -#endif Assert.AreEqual (0, form.Attributes.Count, "Attributes.Count"); } @@ -167,7 +159,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { HtmlForm form = new HtmlForm (); IAttributeAccessor a = (IAttributeAccessor)form; -#if NET_2_0 /* not stored in Attributes */ form.DefaultButton = "defaultbutton"; Assert.IsNull (a.GetAttribute ("defaultbutton"), "A1"); @@ -175,7 +166,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { /* not stored in Attributes */ form.DefaultFocus = "defaultfocus"; Assert.IsNull (a.GetAttribute ("defaultfocus"), "A2"); -#endif form.Enctype = "enctype"; Assert.AreEqual ("enctype", a.GetAttribute ("enctype"), "A3"); @@ -191,16 +181,13 @@ namespace MonoTests.System.Web.UI.HtmlControls { form.ID = "hithere"; Assert.AreEqual ("hithere", form.Name, "A9"); -#if NET_2_0 form.SubmitDisabledControls = true; Assert.IsNull (a.GetAttribute ("submitdisabledcontrols"), "A10"); -#endif form.Target = "target"; Assert.AreEqual ("target", a.GetAttribute ("target"), "A11"); } -#if NET_2_0 #if !TARGET_DOTNET [Test] public void ActionStringWithQuery () @@ -238,7 +225,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { #endif Assert.AreEqual (" name=\"aspnetForm\" method=\"post\" action=\"someactionfile.aspx\"", attrs, "A2"); } -#endif [Test] public void ViewState () @@ -246,18 +232,14 @@ namespace MonoTests.System.Web.UI.HtmlControls { FormPoker form = new FormPoker(); FormPoker copy = new FormPoker(); -#if NET_2_0 form.DefaultButton = "defaultbutton"; form.DefaultFocus = "defaultfocus"; -#endif object state = form.SaveState(); copy.LoadState (state); -#if NET_2_0 Assert.AreEqual ("", copy.DefaultButton, "A1"); Assert.AreEqual ("defaultfocus", form.DefaultFocus, "A2"); -#endif } @@ -292,14 +274,9 @@ namespace MonoTests.System.Web.UI.HtmlControls { Page p = new Page(); FormPoker form = new FormPoker (); form.Page = p; -#if NET_2_0 HtmlDiff.AssertAreEqual ("<div>\r\n<input type=\"hidden\" name=\"__VIEWSTATE\" id=\"\r\n__VIEWSTATE\" value=\"\" />\r\n</div>", form.RenderChildren ().Trim (), "A1"); -#else - HtmlDiff.AssertAreEqual ("<input type=\"hidden\" name=\"__VIEWSTATE\" value=\"\" />", form.RenderChildren ().Trim (), "A1"); -#endif } -#if NET_2_0 [Test] public void ControlCollection () { @@ -309,6 +286,5 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.IsFalse (col.IsReadOnly, "A2"); Assert.AreEqual (0, col.Count, "A3"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadBuilderCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadBuilderCas.cs index e956954b497..586e8d83df3 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadBuilderCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadBuilderCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -46,4 +45,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadCas.cs index b8def68a695..2ca612d0914 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlHeadCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -45,4 +44,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs index fa50e3fc6b1..a9e39053d66 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputButtonTest.cs @@ -102,18 +102,14 @@ namespace MonoTests.System.Web.UI.HtmlControls { public void ViewState () { HtmlInputButtonPoker p = new HtmlInputButtonPoker (); -#if NET_2_0 p.CausesValidation = false; p.ValidationGroup = "VG"; -#endif object s = p.SaveState(); HtmlInputButtonPoker copy = new HtmlInputButtonPoker (); copy.LoadState (s); -#if NET_2_0 Assert.IsFalse (copy.CausesValidation, "A1"); Assert.AreEqual ("VG", p.ValidationGroup, "A2"); -#endif } [Test] @@ -127,22 +123,14 @@ namespace MonoTests.System.Web.UI.HtmlControls { p.Page = new Page (); p.CausesValidation = false; -#if NET_2_0 p.ValidationGroup = "VG"; Assert.AreEqual (3, p.Attributes.Count, "A1"); -#else - Assert.AreEqual (2, p.Attributes.Count, "A1"); -#endif tw.WriteBeginTag ("dummy"); p.DoRenderAttributes (tw); tw.Write ('>'); -#if NET_2_0 HtmlDiff.AssertAreEqual ("<dummy name type=\"button\" ValidationGroup=\"VG\" />", sw.ToString (), "A2"); -#else - HtmlDiff.AssertAreEqual ("<dummy name type=\"button\" />", sw.ToString (), "A2"); -#endif } [Test] @@ -214,9 +202,7 @@ namespace MonoTests.System.Web.UI.HtmlControls { public void RenderOnclick2 () { Page page = new Page (); -#if NET_2_0 page.EnableEventValidation = false; -#endif HtmlInputButtonPoker it = new HtmlInputButtonPoker ("button"); page.Controls.Add (it); it.ID = "id1"; @@ -240,9 +226,7 @@ namespace MonoTests.System.Web.UI.HtmlControls { public void RenderOnclick4 () { Page page = new Page (); -#if NET_2_0 page.EnableEventValidation = false; -#endif HtmlInputButtonPoker it = new HtmlInputButtonPoker ("submit"); page.Controls.Add (it); it.ID = "id1"; @@ -257,9 +241,7 @@ namespace MonoTests.System.Web.UI.HtmlControls { public void RenderOnclick5 () { Page page = new Page (); -#if NET_2_0 page.EnableEventValidation = false; -#endif RequiredFieldValidator val = new RequiredFieldValidator (); val.ControlToValidate = "id1"; page.Validators.Add (val); diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs index 7dc44005b4f..98ca3cccdc7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputCheckBoxTest.cs @@ -100,11 +100,7 @@ namespace MonoTests.System.Web.UI.HtmlControls { c.Checked = true; s = c.Render (); -#if NET_2_0 HtmlDiff.AssertAreEqual ("<input name=\"*1*\" id=\"*1*\" type=\"checkbox\" checked=\"checked\" />", s, "Render fail"); -#else - HtmlDiff.AssertAreEqual ("<input name=\"*1*\" type=\"checkbox\" id=\"*1*\" checked=\"checked\" />", s, "Render fail"); -#endif } } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputFileTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputFileTest.cs index 4aeedd419ec..f05d2634620 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputFileTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputFileTest.cs @@ -106,18 +106,14 @@ namespace MonoTests.System.Web.UI.HtmlControls { public void ViewState () { HtmlInputButtonPoker p = new HtmlInputButtonPoker (); -#if NET_2_0 p.CausesValidation = false; p.ValidationGroup = "VG"; -#endif object s = p.SaveState(); HtmlInputButtonPoker copy = new HtmlInputButtonPoker (); copy.LoadState (s); -#if NET_2_0 Assert.IsFalse (copy.CausesValidation, "A1"); Assert.AreEqual ("VG", p.ValidationGroup, "A2"); -#endif } #endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordCas.cs index e30a207c721..2c1bf1eb42a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -62,4 +61,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordTest.cs index aceef2d0eff..fba431df464 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputPasswordTest.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.Collections.Specialized; @@ -197,4 +196,3 @@ namespace MonoTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonCas.cs index 05c88f3d8e1..f2ad4aafe80 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonCas.cs @@ -56,11 +56,9 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { unit.IPostBackDataHandler_RaisePostBackEvent (); unit.IPostBackDataHandler_LoadPostData_WrongId (); unit.IPostBackDataHandler_LoadPostData (); -#if NET_2_0 unit.RaisePostBackEvent (); unit.LoadPostData_WrongId (); unit.LoadPostData (); -#endif } public override Type Type { diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonTest.cs index 11d18ce6ea9..67b8c100b73 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputRadioButtonTest.cs @@ -45,7 +45,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { base.RenderAttributes (writer); return writer.InnerWriter.ToString (); } -#if NET_2_0 public bool LoadPost (string key, NameValueCollection nvc) { return base.LoadPostData (key, nvc); @@ -55,7 +54,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { { base.RaisePostDataChangedEvent (); } -#endif } [TestFixture] @@ -241,7 +239,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.IsTrue (attrs.IndexOf ("value=\"hola<&\"") >= 0); } -#if NET_2_0 [Test] public void RaisePostBackEvent () { @@ -293,6 +290,5 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.IsFalse (rb.LoadPost ("id1", nvc), "LoadPostData"); Assert.AreEqual ("id1", rb.Value, "Value"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetCas.cs index ec34cf9ef3c..3130af259a8 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -60,4 +59,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetTest.cs index 414a5f2076b..fec70e314cf 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputResetTest.cs @@ -34,7 +34,6 @@ using System.Web.UI.HtmlControls; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System.Web.UI.HtmlControls { @@ -122,4 +121,3 @@ namespace MonoTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitCas.cs index 862a30f21a1..e690dc4d412 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -59,4 +58,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitTest.cs index 894f9ea1158..1f0f7abc3ba 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputSubmitTest.cs @@ -34,7 +34,6 @@ using System.Web.UI.HtmlControls; using NUnit.Framework; -#if NET_2_0 namespace MonoTests.System.Web.UI.HtmlControls { @@ -110,4 +109,3 @@ namespace MonoTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextCas.cs index 060e3c6ff1c..c26cd6c3d19 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextCas.cs @@ -55,10 +55,8 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { unit.RenderAttributes_Password (); unit.IPostBackDataHandler_RaisePostBackEvent (); unit.IPostBackDataHandler_LoadPostData (); -#if NET_2_0 unit.RaisePostBackEvent (); unit.LoadPostData (); -#endif } public override Type Type { diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs index 80f68f725b5..0480369c596 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlInputTextTest.cs @@ -87,7 +87,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { public string AttributeNewValue { get { return attr_new_value; } } -#if NET_2_0 public bool LoadPost (string key, NameValueCollection nvc) { return base.LoadPostData(key, nvc); @@ -97,7 +96,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { { base.RaisePostDataChangedEvent (); } -#endif } [TestFixture] @@ -198,16 +196,10 @@ namespace MonoTests.System.Web.UI.HtmlControls { it.Size = 4; it.ID = "mono"; it.Value = "s3kr3t"; -#if NET_2_0 // value is there, maybe because a new HtmlInputPassword class exists ? HtmlDiff.AssertAreEqual (" name=\"mono\" id=\"mono\" type=\"password\" maxlength=\"2\" size=\"4\" value=\"s3kr3t\" /", it.RenderAttributes (),"Render failed"); Assert.IsFalse (it.ViewStateValueChanged, "ViewStateValueChanged"); Assert.IsFalse (it.AttributeValueChanged, "AttributeValueChanged"); -#else - HtmlDiff.AssertAreEqual(" name=\"mono\" id=\"mono\" type=\"password\" maxlength=\"2\" size=\"4\" /", it.RenderAttributes(),"Render failed"); - Assert.IsTrue (it.ViewStateValueChanged, "ViewStateValueChanged"); - Assert.IsTrue (it.AttributeValueChanged, "AttributeValueChanged"); -#endif Assert.IsNull (it.ViewStateNewValue, "ViewStateNewValue"); Assert.IsNull (it.AttributeNewValue, "AttributeNewValue"); } @@ -275,7 +267,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.IsTrue (pbdh.LoadPostData ("id1", nvc), "LoadPostData"); Assert.AreEqual ("mono", it.Value, "Value"); } -#if NET_2_0 [Test] public void RaisePostBackEvent () { @@ -328,6 +319,5 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.IsTrue (it.LoadPost ("id1", nvc), "LoadPostData"); Assert.AreEqual ("mono", it.Value, "Value"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkCas.cs index ec4314d6691..090bbb68a5a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -60,4 +59,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkTest.cs index 120ac684b6b..32f9edd5c6e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlLinkTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -84,4 +83,3 @@ namespace MonoTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaCas.cs index 2f499e41e33..ab3b24c094e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -60,4 +59,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs index 7ee2fd46f27..47957d137b5 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlMetaTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using MonoTests.stand_alone.WebHarness; @@ -100,4 +99,3 @@ namespace MonoTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlSelectBuilderCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlSelectBuilderCas.cs index d46f2d893aa..6111273ee21 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlSelectBuilderCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlSelectBuilderCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -46,4 +45,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaCas.cs index 1e7ff8afd94..0cd88f7cab8 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaCas.cs @@ -57,10 +57,8 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { unit.AddParsedSubObject_DataBoundLiteralControl (); unit.IPostBackDataHandler_RaisePostBackEvent (); unit.IPostBackDataHandler_LoadPostData (); -#if NET_2_0 unit.RaisePostBackEvent (); unit.LoadPostData (); -#endif } public override Type Type { diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs index eb0eb0e3da1..b7eabf04461 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTextAreaTest.cs @@ -64,7 +64,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { { base.AddParsedSubObject (o); } -#if NET_2_0 public bool LoadPost (string key, NameValueCollection nvc) { return base.LoadPostData (key, nvc); @@ -74,7 +73,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { { base.RaisePostDataChangedEvent (); } -#endif } [TestFixture] @@ -205,19 +203,13 @@ namespace MonoTests.System.Web.UI.HtmlControls { UserControl ctrl = new UserControl (); ctrl.ID = "UC"; Page page = new Page (); -#if NET_2_0 page.EnableEventValidation = false; -#endif TestHtmlTextArea ta = new TestHtmlTextArea (); page.Controls.Add (ctrl); ctrl.Controls.Add (ta); ta.Name = "mono"; ta.ID = "go"; -#if NET_2_0 string expected = "<dummy name=\"UC$go\" id=\"UC_go\" />"; -#else - string expected = "<dummy name=\"UC:go\" id=\"UC_go\" />"; -#endif Assert.AreEqual (expected, ta.RenderAttributes ()); } @@ -330,7 +322,6 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.IsTrue (pbdh.LoadPostData ("id1", nvc), "LoadPostData"); Assert.AreEqual ("mono", ta.Value, "Value"); } -#if NET_2_0 [Test] public void RaisePostBackEvent () { @@ -383,6 +374,5 @@ namespace MonoTests.System.Web.UI.HtmlControls { Assert.IsTrue (ta.LoadPost ("id1", nvc), "LoadPostData"); Assert.AreEqual ("mono", ta.Value, "Value"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTitleCas.cs b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTitleCas.cs index ba162eb6303..a816b0d6bd1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTitleCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.HtmlControls/HtmlTitleCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -45,4 +44,3 @@ namespace MonoCasTests.System.Web.UI.HtmlControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/DataBoundControlAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/DataBoundControlAdapterTest.cs index 7cf05a52476..0b282d2d368 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/DataBoundControlAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/DataBoundControlAdapterTest.cs @@ -26,7 +26,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && !TARGET_DOTNET +#if !TARGET_DOTNET using NUnit.Framework; using System; using System.Collections; diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HideDisabledControlAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HideDisabledControlAdapterTest.cs index 0a1a0dbe847..0e1bb04417e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HideDisabledControlAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HideDisabledControlAdapterTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.Collections; @@ -98,4 +97,3 @@ namespace MonoTests.System.Web.UI.WebControls.Adapters #endregion } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HierarchicalDataBoundControlAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HierarchicalDataBoundControlAdapterTest.cs index df35c5f1735..29380fb7e6f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HierarchicalDataBoundControlAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/HierarchicalDataBoundControlAdapterTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.Collections; @@ -94,4 +93,3 @@ namespace MonoTests.System.Web.UI.WebControls.Adapters #endregion } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/MenuAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/MenuAdapterTest.cs index 48c7a176b37..804313f84ae 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/MenuAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/MenuAdapterTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.Collections; @@ -218,4 +217,3 @@ namespace MonoTests.System.Web.UI.WebControls.Adapters #endregion } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/WebControlAdapterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/WebControlAdapterTest.cs index 2351b53aaf1..12b2d0f0209 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/WebControlAdapterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls.Adapters/WebControlAdapterTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.Collections; @@ -165,4 +164,3 @@ namespace MonoTests.System.Web.UI.WebControls.Adapters #endregion } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/ConnectionInterfaceCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/ConnectionInterfaceCollectionTest.cs index 820ebb8a94c..70fd4f1d715 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/ConnectionInterfaceCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/ConnectionInterfaceCollectionTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; using NUnit.Framework; @@ -138,4 +137,3 @@ namespace MonoTests.System.Web.UI.WebControls.WebParts } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/WebPartTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/WebPartTest.cs index 17cef2d8f45..897ee42b673 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/WebPartTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls.WebParts/WebPartTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using NUnit.Framework; @@ -107,4 +106,3 @@ namespace MonoTests.System.Web.UI.WebControls.WebParts { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs index ff5c0a3c3ef..657480692d2 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/AccessDataSourceTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -174,4 +173,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/AutoGeneratedFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/AutoGeneratedFieldTest.cs index 8e31c5ac53e..ef59d185aac 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/AutoGeneratedFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/AutoGeneratedFieldTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using System; @@ -150,4 +149,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorCas.cs index 1a38bf1952b..8498b5f9317 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorCas.cs @@ -73,11 +73,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { Assert.AreEqual (p.GetCutoffYear (), 2029, "E1"); Assert.AreEqual (p.GetFullYear (29), 2029, "E2"); -#if NET_2_0 Assert.AreEqual (p.GetFullYear (30), 1930, "E3"); -#else - Assert.AreEqual (p.GetFullYear (30), 2030, "E3"); // XXX this is broken -#endif Assert.IsNotNull (p.GetDateElementOrder (), "E4"); } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorTest.cs index 2544683e788..0a53e08b759 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseCompareValidatorTest.cs @@ -116,9 +116,7 @@ namespace MonoTests.System.Web.UI.WebControls BaseCompareValidatorPoker p = new BaseCompareValidatorPoker (); Assert.AreEqual (ValidationDataType.String, p.Type, "CultureInvariantValues"); -#if NET_2_0 Assert.AreEqual (false, p.CultureInvariantValues, "CultureInvariantValues"); -#endif } [Test] @@ -128,10 +126,8 @@ namespace MonoTests.System.Web.UI.WebControls p.Type = ValidationDataType.Double; Assert.AreEqual (ValidationDataType.Double, p.Type, "CultureInvariantValues"); -#if NET_2_0 p.CultureInvariantValues = true; Assert.AreEqual (true, p.CultureInvariantValues, "CultureInvariantValues"); -#endif } [Test] @@ -140,17 +136,13 @@ namespace MonoTests.System.Web.UI.WebControls BaseCompareValidatorPoker p = new BaseCompareValidatorPoker (); p.Type = ValidationDataType.Double; -#if NET_2_0 p.CultureInvariantValues = true; -#endif BaseCompareValidatorPoker copy = new BaseCompareValidatorPoker (); copy.LoadState (p.SaveState ()); Assert.AreEqual (ValidationDataType.Double, copy.Type, "A1"); -#if NET_2_0 Assert.AreEqual (true, copy.CultureInvariantValues, "A1"); -#endif } [Test] @@ -522,11 +514,7 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (p.GetCutoffYear(), 2029, "E1"); Assert.AreEqual (p.GetFullYear (29), 2029, "E2"); -#if NET_2_0 Assert.AreEqual (p.GetFullYear (30), 1930, "E3"); -#else - Assert.AreEqual (p.GetFullYear (30), 2030, "E3"); // XXX this is broken -#endif Thread.CurrentThread.CurrentCulture = new CultureInfo ("en-GB", false); Assert.AreEqual (p.GetDateElementOrder (), "dmy", "E4"); @@ -538,7 +526,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (p.GetDateElementOrder (), "ymd", "E6"); } -#if NET_2_0 [Test] public void CultureInvariantValues_1 () { @@ -640,6 +627,5 @@ namespace MonoTests.System.Web.UI.WebControls tb1.Text = "24-12-2005"; v.Validate (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlCas.cs index 31a40d6be63..1a85e586a27 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -65,4 +64,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlTest.cs index 22ea1f3d760..b312107569c 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataBoundControlTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -198,4 +197,3 @@ namespace MonoTests.System.Web.UI.WebControls #endif } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListCas.cs index 85a8286b822..39bf1a7689f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListCas.cs @@ -68,7 +68,6 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.Render (); unit.Events (); unit.OnDataBinding (); -#if NET_2_0 unit.DataSourceID (); unit.EnsureDataBound_WithoutDataSourceID (); unit.EnsureDataBound_WithDataSourceID (); @@ -84,7 +83,6 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.OnLoad_WithPage (); unit.OnLoad_WithPageWithoutViewState (); unit.OnLoad_WithDataSource (); -#endif unit.IsBindableType (); } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListTest.cs index 732c7e975d8..82355fa4550 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BaseDataListTest.cs @@ -57,7 +57,6 @@ namespace MonoTests.System.Web.UI.WebControls { public StateBag StateBag { get { return base.ViewState; } } -#if NET_2_0 public bool IsDataBoundByDataSourceId { get { return base.IsBoundUsingDataSourceID; } } @@ -73,7 +72,6 @@ namespace MonoTests.System.Web.UI.WebControls { public DataSourceSelectArguments Arguments { get { return base.SelectArguments; } } -#endif public void Add (object o) { base.AddParsedSubObject (o); @@ -100,7 +98,6 @@ namespace MonoTests.System.Web.UI.WebControls { { OnSelectedIndexChanged (e); } -#if NET_2_0 public DataSourceSelectArguments CreateArguments () { return base.CreateDataSourceSelectArguments (); @@ -120,7 +117,6 @@ namespace MonoTests.System.Web.UI.WebControls { { base.EnsureDataBound (); } -#endif public bool DataBindingCalled { get { return dataBindingCalled; } set { dataBindingCalled = value; } @@ -131,7 +127,6 @@ namespace MonoTests.System.Web.UI.WebControls { dataBindingCalled = true; base.OnDataBinding (e); } -#if NET_2_0 private bool dataPropertyChangedCalled; private bool dataSourceViewChangedCalled; private bool initCalled; @@ -212,7 +207,6 @@ namespace MonoTests.System.Web.UI.WebControls { { base.OnPreRender (e); } -#endif } public class TestDataSource : IListSource { @@ -236,7 +230,6 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#if NET_2_0 public class Test2DataSource : WebControl, IDataSource { public DataSourceView GetView (string viewName) @@ -267,7 +260,6 @@ namespace MonoTests.System.Web.UI.WebControls { return al; } } -#endif [TestFixture] public class BaseDataListTest { @@ -315,9 +307,7 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (GridLines.Both, bdl.GridLines, "GridLines"); Assert.AreEqual (HorizontalAlign.NotSet, bdl.HorizontalAlign, "HorizontalAlign"); Assert.IsFalse (bdl.UseAccessibleHeader, "UseAccessibleHeader"); -#if NET_2_0 Assert.AreEqual (String.Empty, bdl.DataSourceID, "DataSourceID"); -#endif Assert.AreEqual (0, bdl.Attributes.Count, "Attributes.Count-2"); Assert.AreEqual (0, bdl.StateBag.Count, "ViewState.Count-2"); @@ -351,13 +341,9 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.IsNull (bdl.DataSource, "DataSource"); bdl.UseAccessibleHeader = false; Assert.IsFalse (bdl.UseAccessibleHeader, "UseAccessibleHeader"); -#if NET_2_0 bdl.DataSourceID = String.Empty; Assert.AreEqual (String.Empty, bdl.DataSourceID, "DataSourceID"); Assert.AreEqual (3, bdl.StateBag.Count, "ViewState.Count-3"); -#else - Assert.AreEqual (2, bdl.StateBag.Count, "ViewState.Count-3"); -#endif Assert.AreEqual (0, bdl.Attributes.Count, "Attributes.Count-2"); } @@ -545,7 +531,6 @@ namespace MonoTests.System.Web.UI.WebControls { bdl.DataBind (); Assert.IsTrue (bdl.DataBindingCalled, "After DataBind"); } -#if NET_2_0 [Test] public void DataSourceID () { @@ -792,7 +777,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.IsTrue (bdl.IsInitialized, "IsInitialized"); Assert.IsTrue (bdl.RequiresDataBind, "RequiresDataBind"); } -#endif [Test] public void IsBindableType () { diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BoundFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BoundFieldTest.cs index 44e784a3819..df66f3bca30 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BoundFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BoundFieldTest.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.Collections.Generic; @@ -557,4 +556,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BulletedListTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BulletedListTest.cs index e884d2ca32f..084730ccf30 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/BulletedListTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/BulletedListTest.cs @@ -28,7 +28,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 NUnit.Framework; using System; using System.Collections; @@ -405,4 +404,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonColumnTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonColumnTest.cs index 089b421f274..761e9250014 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonColumnTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonColumnTest.cs @@ -49,24 +49,20 @@ namespace MonoTests.System.Web.UI.WebControls { public void Defaults () { ButtonColumn bc = new ButtonColumn (); -#if NET_2_0 Assert.AreEqual ("", bc.ValidationGroup, "ValidationGroup"); Assert.AreEqual (false, bc.CausesValidation, "CausesValidation"); -#endif } [Test] public void AssignedProperties () { ButtonColumn bc = new ButtonColumn (); -#if NET_2_0 Assert.AreEqual ("", bc.ValidationGroup, "ValidationGroup#1"); bc.ValidationGroup = "test"; Assert.AreEqual ("test", bc.ValidationGroup, "ValidationGroup#2"); Assert.AreEqual (false, bc.CausesValidation, "CausesValidation#1"); bc.CausesValidation = true; Assert.AreEqual (true, bc.CausesValidation, "CausesValidation#2"); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldBaseTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldBaseTest.cs index 655eecf712e..22aa6712e1a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldBaseTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldBaseTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using System; @@ -127,4 +126,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldTest.cs index 1673d34008a..62b8b7ee327 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonFieldTest.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.Collections.Generic; @@ -206,4 +205,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonTest.cs index 836f214c655..1f154dc895b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ButtonTest.cs @@ -65,7 +65,6 @@ namespace MonoTests.System.Web.UI.WebControls base.Render (writer); return writer.InnerWriter.ToString (); } -#if NET_2_0 public new PostBackOptions GetPostBackOptions () { return base.GetPostBackOptions (); @@ -80,7 +79,6 @@ namespace MonoTests.System.Web.UI.WebControls { base.RaisePostBackEvent (eventArgument); } -#endif } @@ -111,19 +109,16 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (true, b.CausesValidation, "CausesValidation"); Assert.AreEqual (string.Empty, b.CommandArgument, "CommandArgument"); Assert.AreEqual (string.Empty, b.CommandName, "CommandName"); -#if NET_2_0 Assert.AreEqual (string.Empty, b.ValidationGroup, "ValidationGroup"); Assert.AreEqual (string.Empty, b.OnClientClick, "OnClientClick"); Assert.AreEqual (string.Empty, b.PostBackUrl, "PostBackUrl"); Assert.AreEqual (true, b.UseSubmitBehavior, "UseSubmitBehavior"); -#endif } [Test] public void AssignProperties () { Button b = new Button (); -#if NET_2_0 Assert.AreEqual (string.Empty, b.OnClientClick, "OnClientClick#1"); b.OnClientClick = "Test()"; Assert.AreEqual ("Test()", b.OnClientClick, "OnClientClick#2"); @@ -136,7 +131,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (string.Empty, b.ValidationGroup, "ValidationGroup#1"); b.ValidationGroup = "test"; Assert.AreEqual ("test", b.ValidationGroup, "ValidationGroup#2"); -#endif } [Test] @@ -148,7 +142,6 @@ namespace MonoTests.System.Web.UI.WebControls p.Text = "Hello"; Assert.AreEqual (p.Text, "Hello", "A2"); -#if NET_2_0 p.ValidationGroup = "VG1"; p.UseSubmitBehavior = false; p.OnClientClick = "ClientClick()"; @@ -157,7 +150,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (false, p.UseSubmitBehavior, "ViewState_UseSubmitBehavior#original"); Assert.AreEqual ("ClientClick()", p.OnClientClick, "ViewState_OnClientClick#original"); Assert.AreEqual ("PostBackUrl", p.PostBackUrl, "ViewState_PostBackUrl#original"); -#endif object state = p.SaveState (); @@ -165,12 +157,10 @@ namespace MonoTests.System.Web.UI.WebControls copy.LoadState (state); Assert.AreEqual (copy.Text, "Hello", "A4"); -#if NET_2_0 Assert.AreEqual (copy.ValidationGroup, "VG1", "A5"); Assert.AreEqual (false, copy.UseSubmitBehavior, "ViewState_UseSubmitBehavior#copy"); Assert.AreEqual ("ClientClick()", p.OnClientClick, "ViewState_OnClientClick#copy"); Assert.AreEqual ("PostBackUrl", p.PostBackUrl, "ViewState_PostBackUrl#copy"); -#endif } [Test] @@ -201,7 +191,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (-1, str.IndexOf ("hola"), "hola"); } -#if NET_2_0 [Test] public void Button_Render2 () { StringWriter sw = new StringWriter (); @@ -311,7 +300,6 @@ namespace MonoTests.System.Web.UI.WebControls { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs index 11c6169ea59..74ca0098945 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CalendarTest.cs @@ -457,10 +457,8 @@ namespace MonoTests.System.Web.UI.WebControls p.TitleFormat = TitleFormat.Month; p.TodaysDate = new DateTime (1999,1,1); p.VisibleDate = new DateTime (1998,1,1); -#if NET_2_0 p.Caption = "This is a Caption"; p.CaptionAlign = TableCaptionAlign.Right; -#endif p.DayHeaderStyle.BackColor = Color.Blue; p.DayStyle.BackColor = Color.Yellow; @@ -494,10 +492,8 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (new DateTime (1999,1,1), copy.TodaysDate, "TodaysDate"); Assert.AreEqual (new DateTime (1998,1,1), copy.VisibleDate, "VisibleDate"); -#if NET_2_0 Assert.AreEqual ("This is a Caption", copy.Caption, "Caption"); Assert.AreEqual (TableCaptionAlign.Right, copy.CaptionAlign, "CaptionAlign"); -#endif copy.ShowDayHeader = true; copy.ShowNextPrevMonth = true; diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CallBackTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CallBackTest.cs index 32cf47b17c7..148d01e7938 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CallBackTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CallBackTest.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; @@ -151,4 +150,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs index c987a0d3b41..56760e10227 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ChangePasswordTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Drawing; @@ -900,4 +899,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxCas.cs index 2a1e22e48ff..54aa5a22e39 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxCas.cs @@ -55,9 +55,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.TextAlign_Values (); unit.Render (); unit.CheckboxViewstateTextNull (); -#if NET_2_0 unit.CheckboxViewstateValidation (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxFieldTest.cs index 1e0ffb585d9..5645545eed1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxFieldTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using System; @@ -462,4 +461,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxListTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxListTest.cs index be2aad53e2d..1860f47b4bf 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxListTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxListTest.cs @@ -63,7 +63,6 @@ namespace MonoTests.System.Web.UI.WebControls { } -#if NET_2_0 public new bool HasFooter { get @@ -121,7 +120,6 @@ namespace MonoTests.System.Web.UI.WebControls { base.RenderItem(itemType,repeatIndex,repeatInfo,writer); return writer.InnerWriter.ToString (); } -#endif } [TestFixture] @@ -150,16 +148,13 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (c.RepeatLayout, RepeatLayout.Table, "A5"); Assert.AreEqual (c.TextAlign, TextAlign.Right, "A6"); -#if NET_2_0 Assert.AreEqual (false, c.HasFooter, "HasFooter"); Assert.AreEqual (false, c.HasHeader, "HasHeader"); Assert.AreEqual (false, c.HasSeparators, "HasSeparators"); Assert.AreEqual (0, c.RepeatedItemCount, "RepeatedItemCount"); Assert.AreEqual (null, c.DoGetItemStyle (ListItemType.Item, 0), "GetItemStyle"); -#endif } -#if NET_2_0 [Test] public void CheckBoxList_Bug377703_1 () { @@ -422,7 +417,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (2, c.RepeatedItemCount, "RepeatedItemCount#2"); } -#endif [Test] @@ -629,39 +623,21 @@ namespace MonoTests.System.Web.UI.WebControls { { CheckBoxList c = new CheckBoxList (); -#if NET_2_0 Render (c, "", "A1"); -#else - Render (c, "<table border=\"0\">\n\n</table>", "A1"); -#endif c.CellPadding = 1; -#if NET_2_0 Render (c, "", "A2"); -#else - Render (c, "<table border=\"0\" cellpadding=\"1\">\n\n</table>", "A2"); -#endif c = new CheckBoxList (); c.CellPadding = 1; -#if NET_2_0 Render (c, "", "A3"); -#else - Render (c, "<table border=\"0\" cellpadding=\"1\">\n\n</table>", "A3"); -#endif c = new CheckBoxList (); c.TextAlign = TextAlign.Left; -#if NET_2_0 Render (c, "", "A4"); -#else - Render (c, "<table border=\"0\">\n\n</table>", "A4"); -#endif } [Test] -#if NET_2_0 [Category("NotDotNet")] // MS's implementation throws NRE's from these -#endif public void Render () { #if NET_4_0 @@ -684,9 +660,7 @@ namespace MonoTests.System.Web.UI.WebControls { // bug 51648 [Test] -#if NET_2_0 [Category("NotDotNet")] // MS's implementation throws NRE's from these -#endif public void TestTabIndex () { CheckBoxList c = new CheckBoxList (); @@ -710,9 +684,7 @@ namespace MonoTests.System.Web.UI.WebControls { // bug 48802 [Test] -#if NET_2_0 [Category("NotDotNet")] // MS's implementation throws NRE's from these -#endif public void TestDisabled () { CheckBoxList c = new CheckBoxList (); @@ -733,7 +705,6 @@ namespace MonoTests.System.Web.UI.WebControls { #endif Render (c, exp, "C1"); } -#if NET_2_0 class TestCheckBoxList : CheckBoxList { public void CallVerifyMultiSelect() @@ -752,7 +723,6 @@ namespace MonoTests.System.Web.UI.WebControls { { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxTest.cs index 06af1d4e7f2..2bcb4c0f9b3 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CheckBoxTest.cs @@ -108,7 +108,6 @@ namespace MonoTests.System.Web.UI.WebControls { writer.AddStyleAttribute ("StyleAttribute", "StyleAttValue"); checker = true; } -#if NET_2_0 public new void RaisePostDataChangedEvent () { base.RaisePostDataChangedEvent (); @@ -149,7 +148,6 @@ namespace MonoTests.System.Web.UI.WebControls { } base.OnLoad (e); } -#endif } [TestFixture] @@ -169,12 +167,9 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (0, c.Attributes.Count, "Attributes.Count-2"); -#if NET_2_0 Assert.IsFalse (c.CausesValidation, "CausesValidation"); Assert.AreEqual (String.Empty, c.ValidationGroup, "ValidationGroup"); -#endif } -#if NET_2_0 [Test] public void InputAttributesTest () { @@ -238,7 +233,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (true, c.Checker, "AddAttributesToRender dosn't called fail"); HtmlDiff.AssertAreEqual ("<input Attribute=\"AttributeValue\" type=\"checkbox\" style=\"StyleAttribute:StyleAttValue;\" />", html, "Add Attributes To Render fail#2"); } -#endif [Test] public void NullProperties () @@ -363,7 +357,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual ("", c.Text); } -#if NET_2_0 [Test] public void CheckboxViewstateValidation () { @@ -449,6 +442,5 @@ namespace MonoTests.System.Web.UI.WebControls { { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CircleHotSpotTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CircleHotSpotTest.cs index fede2828ae6..d2552bdfc7e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CircleHotSpotTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CircleHotSpotTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -96,4 +95,3 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CommandFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CommandFieldTest.cs index 026f4e290fd..22f30a35f80 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CommandFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CommandFieldTest.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.Collections.Generic; @@ -238,4 +237,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompleteWizardStepTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompleteWizardStepTest.cs index b7b2391e7aa..e377cf8dea3 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompleteWizardStepTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompleteWizardStepTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Drawing; @@ -68,4 +67,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlCas.cs index 17d963d3bcb..ab701d26d27 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -67,4 +66,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlTest.cs index 74530197713..4d1cd6224e4 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeControlTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using NUnit.Framework; @@ -63,4 +62,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeDataBoundControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeDataBoundControlTest.cs index 5c5e5052147..cc7a4dbf6cc 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeDataBoundControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CompositeDataBoundControlTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -162,4 +161,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ContentTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ContentTest.cs index c9ef9601ad3..03edc47677b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ContentTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ContentTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using NUnit.Framework; @@ -182,4 +181,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ControlParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ControlParameterTest.cs index b0d61d68579..22fd355d563 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ControlParameterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ControlParameterTest.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.Collections.Generic; @@ -220,4 +219,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CookieParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CookieParameterTest.cs index 576550fc26b..c3b6fab1e17 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CookieParameterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CookieParameterTest.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.IO; @@ -157,4 +156,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardStepTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardStepTest.cs index 8b60e1360f8..b2db43621b6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardStepTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardStepTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Drawing; @@ -68,4 +67,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs index ff795378998..d52eb3b151e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CreateUserWizardTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Drawing; @@ -914,4 +913,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CrossPagePostingTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CrossPagePostingTest.cs index 737e3b407ee..905899e0ec6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CrossPagePostingTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CrossPagePostingTest.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; @@ -146,4 +145,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CustomValidatorTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CustomValidatorTest.cs index cb129d8f4d2..fd3226720a7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/CustomValidatorTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/CustomValidatorTest.cs @@ -150,13 +150,10 @@ namespace MonoTests.System.Web.UI.WebControls public void DefaultsNotWorking () { CustomValidatorTestClass c = new CustomValidatorTestClass (); -#if NET_2_0 Assert.AreEqual (false, c.ValidateEmptyText, "ValidateEmptyText"); -#endif } -#if NET_2_0 // Variable for checking events private bool checker; @@ -185,7 +182,6 @@ namespace MonoTests.System.Web.UI.WebControls { checker = true; } -#endif [Test] @@ -202,17 +198,10 @@ namespace MonoTests.System.Web.UI.WebControls c.Enabled = true; c.EnableViewState = true; -#if! NET_2_0 - Assert.AreEqual("<span style=\"color:Red;\">aw shucks</span>", c.Render(), "R1"); -#endif c.ClientValidationFunction = "Father to a sister of thought"; -#if! NET_2_0 - Assert.AreEqual("<span style=\"color:Red;\">aw shucks</span>", c.Render(), "R2"); -#endif } -#if NET_2_0 class Poker : CustomValidator { public string Render () @@ -237,7 +226,6 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif [Test] public void EmptyControlName () diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlCas.cs index 8bdeab0dd73..8ba283cbfb0 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -67,4 +66,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs index 67cf6946ee3..e710d0007ca 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataBoundControlTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -384,4 +383,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldCollectionTest.cs index b7f9131a81c..be5e6267b55 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldCollectionTest.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.Collections.Generic; @@ -211,4 +210,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldTest.cs index de80ee2a578..170e07d0821 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataControlFieldTest.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.Collections.Generic; @@ -254,4 +253,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs index 9535ff7a57e..1e1daa9a8a2 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataGridTest.cs @@ -41,11 +41,9 @@ using System.Collections; using System.Data; using System.ComponentModel; using System.Diagnostics; -#if NET_2_0 using System.Collections.Generic; using MonoTests.SystemWeb.Framework; using MonoTests.stand_alone.WebHarness; -#endif namespace MonoTests.System.Web.UI.WebControls { @@ -183,7 +181,6 @@ namespace MonoTests.System.Web.UI.WebControls { [TestFixture] public class DataGridTest { -#if NET_2_0 [TestFixtureSetUp()] public void FixtureSetup () { @@ -195,7 +192,6 @@ namespace MonoTests.System.Web.UI.WebControls { { WebTest.Unload (); } -#endif [Test] public void Defaults () @@ -232,11 +228,7 @@ namespace MonoTests.System.Web.UI.WebControls { public void TagName () { DataGridPoker p = new DataGridPoker (); -#if NET_2_0 Assert.AreEqual (p.GetTagName (), "table", "A1"); -#else - Assert.AreEqual (p.GetTagName (), "span", "A1"); -#endif } [Test] @@ -467,17 +459,10 @@ namespace MonoTests.System.Web.UI.WebControls { p.BackImageUrl = "foobar url"; // The styles get stored in the view state -#if NET_2_0 Assert.AreEqual (vs.Count, 0, "A1"); Assert.IsNull (vs ["BackImageUrl"], "A2"); Assert.IsNull (vs ["GridLines"], "A3"); Assert.IsNull (vs ["CellSpacing"], "A4"); -#else - Assert.AreEqual (vs.Count, 3, "A1"); - Assert.AreEqual (vs ["BackImageUrl"], "foobar url", "A2"); - Assert.AreEqual (vs ["GridLines"], GridLines.Both, "A3"); - Assert.AreEqual (vs ["CellSpacing"], 0, "A4"); -#endif } private bool cancel_command; @@ -960,11 +945,7 @@ namespace MonoTests.System.Web.UI.WebControls { p.TrackState (); object [] vs = (object []) p.SaveState (); -#if NET_2_0 Assert.AreEqual (vs.Length, 11, "A1"); -#else - Assert.AreEqual (vs.Length, 10, "A1"); -#endif // By default the viewstate is all null for (int i = 0; i < vs.Length; i++) @@ -1022,7 +1003,6 @@ namespace MonoTests.System.Web.UI.WebControls { columns = p.CreateColumns (source, true); vs = (object []) p.SaveState (); -#if NET_2_0 Assert.IsNull (vs [9], "A12"); p.BackImageUrl = "foobar url"; vs = (object []) p.SaveState (); @@ -1033,13 +1013,6 @@ namespace MonoTests.System.Web.UI.WebControls { object [] cols = (object []) vs [10]; Assert.AreEqual (cols.Length, 3, "A13"); -#else - Assert.IsNotNull (vs [9], "A12"); - Assert.AreEqual (vs [9].GetType (), typeof (object []), "A12"); - - object [] cols = (object []) vs [9]; - Assert.AreEqual (cols.Length, 3, "A13"); -#endif } [Test] @@ -1352,7 +1325,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (0, p.DataKeys.Count, "A3"); } -#if NET_2_0 public class data { private static ArrayList _data = new ArrayList (); @@ -1926,7 +1898,6 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif class MyTemplate : ITemplate { string text; diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyArrayTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyArrayTest.cs index fe8b2c8e863..aec41f20e4f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyArrayTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyArrayTest.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.Collections.Generic; @@ -112,4 +111,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyTest.cs index 568dc4bfa10..e34fa9b64f6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataKeyTest.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.Collections.Generic; @@ -233,4 +232,3 @@ namespace MonoTests.System.Web.UI.WebControls #endif } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListCas.cs index 6e7c76a4397..6687aae1649 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListCas.cs @@ -60,9 +60,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.SaveViewState (); unit.Events (); unit.BubbleEvent (); -#if NET_2_0 unit.SelectedValue_WithUnexistingDataKeyField (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListItemTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListItemTest.cs index 6ee39ea859c..af110da16a8 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListItemTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListItemTest.cs @@ -90,12 +90,10 @@ namespace MonoTests.System.Web.UI.WebControls { private void DataItemContainer (TestDataListItem dli, int index) { -#if NET_2_0 IDataItemContainer dic = (dli as IDataItemContainer); Assert.IsNull (dic.DataItem, "IDataItemContainer-DataItem"); Assert.AreEqual (index, dic.DataItemIndex, "IDataItemContainer-DataItemIndex"); Assert.AreEqual (index, dic.DisplayIndex, "IDataItemContainer-DisplayIndex"); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListTest.cs index d7423b6dfd4..54ae69e334b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataListTest.cs @@ -201,11 +201,7 @@ namespace MonoTests.System.Web.UI.WebControls { { TestDataList dl = new TestDataList (); CheckIRepeatInfoUser (dl); -#if NET_2_0 Assert.AreEqual ("table", dl.Tag, "TagName"); -#else - Assert.AreEqual ("span", dl.Tag, "TagName"); -#endif Assert.AreEqual (0, dl.Attributes.Count, "Attributes.Count-1"); Assert.AreEqual (0, dl.StateBag.Count, "ViewState.Count-1"); @@ -245,11 +241,7 @@ namespace MonoTests.System.Web.UI.WebControls { // in BaseDataList but couldn't be totally tested from there Assert.AreEqual (-1, dl.CellPadding, "CellPadding"); Assert.AreEqual (0, dl.CellSpacing, "CellSpacing"); -#if NET_2_0 Assert.AreEqual (GridLines.None, dl.GridLines, "GridLines"); -#else - Assert.AreEqual (GridLines.Both, dl.GridLines, "GridLines"); -#endif Assert.AreEqual (HorizontalAlign.NotSet, dl.HorizontalAlign, "HorizontalAlign"); Assert.AreEqual (0, dl.Attributes.Count, "Attributes.Count-2"); @@ -273,12 +265,8 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (GridLines.None, dl.GridLines, "GridLines"); dl.HorizontalAlign = HorizontalAlign.NotSet; Assert.AreEqual (HorizontalAlign.NotSet, dl.HorizontalAlign, "HorizontalAlign"); -#if NET_2_0 int sc = 0; // so the TableStyle isn't kept directly in the ViewState -#else - int sc = 4; -#endif Assert.AreEqual (sc++, dl.StateBag.Count, "ViewState.Count-2"); // now for the DataList properties @@ -365,12 +353,8 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (GridLines.Vertical, dl.GridLines, "GridLines"); dl.HorizontalAlign = HorizontalAlign.Center; Assert.AreEqual (HorizontalAlign.Center, dl.HorizontalAlign, "HorizontalAlign"); -#if NET_2_0 int sc = 0; // so the TableStyle isn't kept directly in the ViewState -#else - int sc = 4; -#endif Assert.AreEqual (sc++, dl.StateBag.Count, "ViewState.Count-2"); // now for the DataList properties @@ -408,15 +392,11 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.IsNotNull (dl.SeparatorTemplate, "SeparatorTemplate"); dl.EditItemIndex = 0; Assert.AreEqual (0, dl.EditItemIndex, "EditItemIndex"); -#if NET_2_0 dl.EditItemIndex = -1; -#endif Assert.AreEqual (sc++, dl.StateBag.Count, "ViewState.Count-2b"); dl.SelectedIndex = 0; Assert.AreEqual (0, dl.SelectedIndex, "SelectedIndex"); -#if NET_2_0 dl.SelectedIndex = -1; -#endif Assert.AreEqual (sc++, dl.StateBag.Count, "ViewState.Count-2c"); dl.ExtractTemplateRows = true; Assert.IsTrue (dl.ExtractTemplateRows, "ExtractTemplateRows"); @@ -616,24 +596,14 @@ namespace MonoTests.System.Web.UI.WebControls { dl.TrackState (); object[] vs = (object[]) dl.SaveState (); -#if NET_2_0 Assert.AreEqual (9, vs.Length, "Size"); -#else - Assert.AreEqual (8, vs.Length, "Size"); -#endif // By default the viewstate is all null int i = 0; for (; i < vs.Length; i++) Assert.IsNull (vs [i], "Empty-" + i); i = 0; -#if NET_2_0 i++; -#else - dl.GridLines = GridLines.Vertical; - vs = (object []) dl.SaveState (); - Assert.IsNotNull (vs[i++], "GridLines"); -#endif dl.ItemStyle.HorizontalAlign = HorizontalAlign.Center; vs = (object []) dl.SaveState (); Assert.IsNotNull (vs[i++], "ItemStyle"); @@ -661,15 +631,12 @@ namespace MonoTests.System.Web.UI.WebControls { dl.FooterStyle.HorizontalAlign = HorizontalAlign.Center; vs = (object []) dl.SaveState (); Assert.IsNotNull (vs[i++], "FooterStyle"); -#if NET_2_0 // GridLines was moved last dl.GridLines = GridLines.Vertical; vs = (object []) dl.SaveState (); Assert.IsNotNull (vs[i++], "GridLines"); -#endif } -#if NET_2_0 [Test] public void SelectedValue_SelectedIndex () { @@ -707,7 +674,6 @@ namespace MonoTests.System.Web.UI.WebControls { dl.DataKeyField = "mono"; Assert.IsNull (dl.SelectedValue, "SelectedValue"); } -#endif private bool cancelCommandEvent; private bool deleteCommandEvent; private bool editCommandEvent; @@ -1108,7 +1074,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (11, dl.Controls.Count, "#01"); } -#if NET_2_0 [Test] public void DataSourceID () { @@ -1126,7 +1091,6 @@ namespace MonoTests.System.Web.UI.WebControls { dl.CreateCH (); Assert.AreEqual (16, dl.Controls.Count, "#01"); } -#endif [Test] public void NControls6 () diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceControlTest.cs index ff34528f898..af5e33c80e6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceControlTest.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.Web; @@ -195,4 +194,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceViewTest.cs index 3164a70fb97..6532a2a92c1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DataSourceViewTest.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.Web; @@ -266,4 +265,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowCollectionTest.cs index 72815f302ac..a522fc1fe04 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -113,5 +112,4 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowTest.cs index 34dd77fb497..f5f240d655f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewRowTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -177,4 +176,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewTest.cs index 5b3a37097b1..5813d894d57 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DetailsViewTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -2824,7 +2823,6 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListCas.cs index c1b6272d152..3ab1e86c038 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListCas.cs @@ -55,9 +55,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.DropDownNamingTest (); unit.InitialSelectionMade (); unit.TestValueFieldAndTextFormat (); -#if NET_2_0 unit.DropDownNullWriterTest (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListTest.cs index 5f592e0ef4d..a5df3ee175e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/DropDownListTest.cs @@ -40,10 +40,8 @@ using System.Web.UI; using System.Web.UI.WebControls; using NUnit.Framework; using MonoTests.stand_alone.WebHarness; -#if NET_2_0 using System.Collections.Generic; using MonoTests.SystemWeb.Framework; -#endif namespace MonoTests.System.Web.UI.WebControls { @@ -173,7 +171,6 @@ namespace MonoTests.System.Web.UI.WebControls } -#if NET_2_0 public class DS : ObjectDataSource { public static List<string> GetList () @@ -246,7 +243,7 @@ namespace MonoTests.System.Web.UI.WebControls WebTest.CurrentTest.UserData = "Data_rebounded"; } #endregion -#endif + [Test] public void DropDownList_Defaults () { @@ -264,11 +261,8 @@ namespace MonoTests.System.Web.UI.WebControls [Test] public void DropDownListBasic () { DropDownListTestClass d = new DropDownListTestClass (); -#if NET_2_0 + Assert.AreEqual ("<select>\n\n</select>", d.Render (), "B1"); -#else - Assert.AreEqual("<select name>\n\n</select>", d.Render(), "B1"); -#endif d.ID = "blah"; Assert.AreEqual("<select name=\"blah\" id=\"blah\">\n\n</select>", d.Render(), "B2"); @@ -311,11 +305,7 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual(string.Empty, d.ToolTip, "P9"); d.ToolTip = "blah"; -#if NET_2_0 Assert.AreEqual ("blah", d.ToolTip, "P10"); -#else - Assert.AreEqual(string.Empty, d.ToolTip, "P10"); -#endif } [Test] @@ -392,11 +382,7 @@ namespace MonoTests.System.Web.UI.WebControls public void DropDownNamingTest () { NamingContainer container = new NamingContainer (); DropDownListTestClass child = new DropDownListTestClass (); -#if NET_2_0 Assert.AreEqual ("<select>\n\n</select>", child.Render (), "N1"); -#else - Assert.AreEqual ("<select name>\n\n</select>", child.Render (), "N1"); -#endif container.Controls.Add (child); // don't assume the generated id string s = child.Render (); @@ -447,21 +433,14 @@ namespace MonoTests.System.Web.UI.WebControls ddl.DataValueField = "Company"; ddl.DataTextFormatString = "This shouldn't show up = {0}"; ddl.DataBind (); -#if NET_2_0 + string exp = @"<select> <option value=""Novell Inc."">Novell Inc.</option> <option value=""Microsoft Corp."">Microsoft Corp.</option> <option value=""Google"">Google</option> </select>"; -#else - string exp = @"<select name> - <option value=""Novell Inc."">Novell Inc.</option> - <option value=""Microsoft Corp."">Microsoft Corp.</option> - <option value=""Google"">Google</option> -</select>"; -#endif HtmlDiff.AssertAreEqual(exp, ddl.Render(), "TestValueFieldAndTextFormat"); } @@ -478,7 +457,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.IsTrue (html.IndexOf ("<hola>") != -1, "#02"); } -#if NET_2_0 class VerifyMultiSelectDropDownList : DropDownList { public new virtual void VerifyMultiSelect() @@ -494,7 +472,6 @@ namespace MonoTests.System.Web.UI.WebControls VerifyMultiSelectDropDownList list = new VerifyMultiSelectDropDownList(); list.VerifyMultiSelect(); } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs index e0f2aac5fb8..5b2987fb5e0 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/EditCommandColumnTest.cs @@ -70,10 +70,8 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual(string.Empty, e.CancelText, "D2"); Assert.AreEqual(string.Empty, e.EditText, "D3"); Assert.AreEqual(string.Empty, e.UpdateText, "D4"); -#if NET_2_0 Assert.AreEqual (true, e.CausesValidation, "CausesValidation"); Assert.AreEqual (string.Empty, e.ValidationGroup, "ValidationGroup"); -#endif } [Test] @@ -93,12 +91,10 @@ namespace MonoTests.System.Web.UI.WebControls e.UpdateText = "Update? What update?"; Assert.AreEqual("Update? What update?", e.UpdateText, "D4"); -#if NET_2_0 e.CausesValidation = false; Assert.AreEqual (false, e.CausesValidation, "CausesValidation"); e.ValidationGroup = "test"; Assert.AreEqual ("test", e.ValidationGroup, "ValidationGroup"); -#endif } private string ControlMarkup(Control c) { @@ -349,7 +345,6 @@ namespace MonoTests.System.Web.UI.WebControls "</tr></table>", markup, "I2"); } -#if NET_2_0 [Test] [Category ("NunitWeb")] public void Validation_ValidatingValid () @@ -615,11 +610,9 @@ namespace MonoTests.System.Web.UI.WebControls private Control[] templateControls; } -#endif } } -#if NET_2_0 #region MyObjectDS public class MyObjectDS { @@ -650,4 +643,3 @@ public class MyObjectDS } } #endregion -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FileUploadTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FileUploadTest.cs index 65f06d5a66f..07b80989b00 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FileUploadTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FileUploadTest.cs @@ -24,7 +24,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using NUnit.Framework; using System.Threading; @@ -114,4 +113,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontInfoTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontInfoTest.cs index 4c1d102c2c7..b391dfd83fc 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontInfoTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontInfoTest.cs @@ -108,11 +108,7 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (true, copy.Font.Italic, "CopyFrom#1"); Assert.AreEqual (true, copy.Font.Bold, "CopyFrom#2"); -#if NET_2_0 Assert.AreEqual (false, copy.Font.Underline, "CopyFrom#3"); -#else - Assert.AreEqual (true, copy.Font.Underline, "CopyFrom#3"); -#endif } [Test] @@ -140,11 +136,7 @@ namespace MonoTests.System.Web.UI.WebControls copy2.Font.Overline = true; copy2.Font.CopyFrom (copy.Font); -#if NET_2_0 Assert.AreEqual (false, copy2.Font.Overline, "MergeWith#5"); -#else - Assert.AreEqual (true, copy2.Font.Overline, "MergeWith#5"); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitCas.cs index c62a22fc56b..a03a88f5dba 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitCas.cs @@ -41,11 +41,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { [TestFixture] [Category ("CAS")] -#if NET_2_0 public class FontUnitCas : AspNetHostingNone { -#else - public class FontUnitCas: AspNetHostingMinimal { -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Deny_Unrestricted () @@ -55,9 +51,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.FontUnitConstructors_Pixel (); unit.FontUnitConstructors_Point (); unit.UnitEquality (); -#if NET_2_0 unit.FontUnit_IFormatProviderToString (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitTest.cs index c40da8db48a..873b75f6c9b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FontUnitTest.cs @@ -86,7 +86,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (f1.Unit.IsEmpty, true, "A11"); } -#if NET_2_0 [Test] public void FontUnitConstructors6 () { @@ -104,7 +103,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (f1.Unit.Type, UnitType.Percentage, "A17"); Assert.AreEqual (f1.Unit.Value, 5.0, "A18"); } -#endif [Test] public void FontUnitConstructors_Em () @@ -312,7 +310,6 @@ namespace MonoTests.System.Web.UI.WebControls new FontUnit ("NotSet"); } -#if NET_2_0 class MyFormatProvider : IFormatProvider { public object GetFormat (Type format_type) @@ -366,6 +363,5 @@ namespace MonoTests.System.Web.UI.WebControls f1 = new FontUnit (5.0, UnitType.Percentage); Assert.AreEqual ("5%", f1.ToString (mfp), "T7"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormParameterTest.cs index 686ab4f080f..035fe1b23b6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormParameterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormParameterTest.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.IO; @@ -181,4 +180,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewCas.cs index 6f34be111ff..7f8e29f45c0 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -60,4 +59,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewRowTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewRowTest.cs index 0d89384df55..0d7f792e851 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewRowTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewRowTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -172,4 +171,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs index 416a8b9a1d1..b4d8d304db7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/FormViewTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -2671,4 +2670,3 @@ public class FormViewDataObject } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowCollectionTest.cs index ffd2a02a078..b5ab160aed7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowCollectionTest.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.Collections; @@ -119,4 +118,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowTest.cs index 8f21a02d154..2e5d32e8be2 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewRowTest.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.Web; @@ -88,4 +87,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs index 8836ff7df67..2f38ba4b556 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/GridViewTest.cs @@ -29,7 +29,6 @@ // ondatasourceviewchanged(),onpagepreload(),RaiseCallbackEvent(),RaisePostbackEvent -#if NET_2_0 using NUnit.Framework; @@ -3279,4 +3278,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HierarchicalDataBoundControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HierarchicalDataBoundControlTest.cs index 7c9a6c39c99..6e2e7e4957d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HierarchicalDataBoundControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HierarchicalDataBoundControlTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using NUnit.Framework; @@ -257,4 +256,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotCollectionTest.cs index 92c266f6502..ad93a49c7a4 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -100,4 +99,3 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotTest.cs index c3fee9622ed..7e18010d4ec 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HotSpotTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -201,4 +200,3 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HyperLinkFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HyperLinkFieldTest.cs index e58a3807245..a26f5968c5b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/HyperLinkFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/HyperLinkFieldTest.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.Collections.Generic; @@ -234,4 +233,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs index eb1666fd9ca..0cb462e7624 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageButtonTest.cs @@ -65,7 +65,6 @@ namespace MonoTests.System.Web.UI.WebControls base.Render (writer); return writer.InnerWriter.ToString (); } -#if NET_2_0 public new string Text { get @@ -88,7 +87,6 @@ namespace MonoTests.System.Web.UI.WebControls { base.RaisePostDataChangedEvent (); } -#endif } [TestFixture] @@ -102,7 +100,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (true, b.CausesValidation, "CausesValidation"); Assert.AreEqual (string.Empty, b.CommandArgument, "CommandArgument"); Assert.AreEqual (string.Empty, b.CommandName, "CommandName"); -#if NET_2_0 Assert.AreEqual (string.Empty, b.ValidationGroup, "ValidationGroup"); Assert.AreEqual (string.Empty, b.AppRelativeTemplateSourceDirectory, "AppRelativeTemplateSourceDirectory"); Assert.AreEqual (string.Empty, b.DescriptionUrl, "DescriptionUrl"); @@ -110,14 +107,12 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (false, b.GenerateEmptyAlternateText, "GenerateEmptyAlternateText"); Assert.AreEqual (string.Empty, b.PostBackUrl, "PostBackUrl"); Assert.AreEqual (string.Empty, b.OnClientClick, "OnClientClick"); -#endif } [Test] public void ImageButton_AssignedValues () { ImageButton b = new ImageButton (); -#if NET_2_0 Assert.AreEqual (string.Empty, b.ValidationGroup, "ValidationGroup#1"); b.ValidationGroup = "test"; Assert.AreEqual ("test", b.ValidationGroup, "ValidationGroup#2"); @@ -131,11 +126,9 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (true, b.EnableTheming, "EnableTheming#1"); b.EnableTheming = false; Assert.AreEqual (false, b.EnableTheming, "EnableTheming#2"); -#endif } -#if NET_2_0 [Test] [Category ("NunitWeb")] public void AppRelativeTemplateSourceDirectory () @@ -312,7 +305,6 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif [Test] public void ImageButton_Render () @@ -336,10 +328,8 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (p.CommandArgument, "arg", "A1"); p.CommandName = "cmd"; Assert.AreEqual (p.CommandName, "cmd", "A2"); -#if NET_2_0 p.ValidationGroup = "VG1"; Assert.AreEqual (p.ValidationGroup, "VG1", "A3"); -#endif object state = p.SaveState (); @@ -348,9 +338,7 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (copy.CommandArgument, "arg", "A4"); Assert.AreEqual (copy.CommandName, "cmd", "A5"); -#if NET_2_0 Assert.AreEqual (copy.ValidationGroup, "VG1", "A6"); -#endif } @@ -361,9 +349,7 @@ namespace MonoTests.System.Web.UI.WebControls HtmlTextWriter tw = new HtmlTextWriter (sw); Page page = new Page (); -#if NET_2_0 page.EnableEventValidation = false; -#endif ImageButton b = new ImageButton (); page.Controls.Add (b); page.RenderControl (tw); @@ -371,7 +357,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (true, sw.ToString().IndexOf ("type=\"image\"") != -1, "A2"); Assert.AreEqual (true, sw.ToString().IndexOf ("name=\"") != -1, "A3"); } -#if NET_2_0 [Test] [ExpectedException (typeof (NotSupportedException))] public void GenerateEmptyAlternateText_Exception () @@ -385,7 +370,6 @@ namespace MonoTests.System.Web.UI.WebControls { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageFieldTest.cs index 3397cb0f53e..1f9e1bea4ab 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageFieldTest.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.Collections.Generic; @@ -447,4 +446,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageMapTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageMapTest.cs index adbb6c25d37..64863d73e78 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageMapTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageMapTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -548,4 +547,3 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageTest.cs index 9b2a4d1608d..3bc92fa1244 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ImageTest.cs @@ -88,9 +88,7 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (String.Empty, i.ImageUrl, "ImageUrl"); // this was added in Fx 1.1 SP1 Assert.AreEqual (String.Empty, i.DescriptionUrl, "DescriptionUrl"); -#if NET_2_0 Assert.IsFalse (i.GenerateEmptyAlternateText, "GenerateEmptyAlternateText"); -#endif Assert.AreEqual ("img", i.Tag, "TagName"); Assert.AreEqual (0, i.Attributes.Count, "Attributes.Count-2"); } @@ -123,10 +121,8 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (0, i.Attributes.Count, "Attributes.Count"); Assert.AreEqual (1, i.StateBag.Count, "ViewState.Count-1"); -#if NET_2_0 i.GenerateEmptyAlternateText = false; Assert.AreEqual (2, i.StateBag.Count, "ViewState.Count-2"); -#endif } [Test] @@ -139,12 +135,8 @@ namespace MonoTests.System.Web.UI.WebControls { i.ImageAlign = ImageAlign.Top; i.ImageUrl = imageUrl; i.DescriptionUrl = "http://www.mono-project.com/"; -#if NET_2_0 i.GenerateEmptyAlternateText = true; Assert.AreEqual (5, i.StateBag.Count, "ViewState.Count"); -#else - Assert.AreEqual (4, i.StateBag.Count, "ViewState.Count"); -#endif Assert.AreEqual (0, i.Attributes.Count, "Attributes.Count"); i.AlternateText = null; @@ -152,17 +144,11 @@ namespace MonoTests.System.Web.UI.WebControls { i.ImageAlign = ImageAlign.NotSet; i.ImageUrl = null; i.DescriptionUrl = null; -#if NET_2_0 i.GenerateEmptyAlternateText = false; // ImageAlign and GenerateEmptyAlternateText can't be removed by returning to default value Assert.AreEqual (2, i.StateBag.Count, "ViewState.Count-2"); Assert.AreEqual (ImageAlign.NotSet, i.StateBag["ImageAlign"], "ImageAlign"); Assert.IsFalse ((bool)i.StateBag["GenerateEmptyAlternateText"], "GenerateEmptyAlternateText"); -#else - // ImageAlign can't be removed by returning to default value - Assert.AreEqual (1, i.StateBag.Count, "ViewState.Count-2"); - Assert.AreEqual (ImageAlign.NotSet, i.StateBag["ImageAlign"], "ImageAlign"); -#endif Assert.AreEqual (0, i.Attributes.Count, "Attributes.Count-2"); } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonCas.cs index 9e5ec7b5081..f82ea144fb2 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonCas.cs @@ -52,9 +52,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.ChildControl (); unit.ChildControlViewstate (); unit.TestEvents (); -#if NET_2_0 unit.TestValidationGroup (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonTest.cs index 07426090862..0cc1bf99c15 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LinkButtonTest.cs @@ -74,7 +74,6 @@ namespace MonoTests.System.Web.UI.WebControls base.Render (writer); return writer.InnerWriter.ToString (); } -#if NET_2_0 public new void RaisePostBackEvent (string eventArgument) { base.RaisePostBackEvent (eventArgument); @@ -84,7 +83,6 @@ namespace MonoTests.System.Web.UI.WebControls { return base.GetPostBackOptions (); } -#endif } @@ -98,14 +96,11 @@ namespace MonoTests.System.Web.UI.WebControls public void Defaults () { Poker b = new Poker (); -#if NET_2_0 Assert.AreEqual (string.Empty, b.OnClientClick, "OnClientClick"); Assert.AreEqual (string.Empty, b.PostBackUrl, "PostBackUrl"); Assert.AreEqual (string.Empty, b.ValidationGroup, "ValidationGroup"); -#endif } -#if NET_2_0 [Test] public void OnClientClick () { @@ -241,7 +236,6 @@ namespace MonoTests.System.Web.UI.WebControls WebTest.CurrentTest.UserData = list; } } -#endif [Test] public void ViewState () { @@ -375,7 +369,6 @@ namespace MonoTests.System.Web.UI.WebControls -#if NET_2_0 [Test] public void TestValidationGroup () { @@ -399,7 +392,6 @@ namespace MonoTests.System.Web.UI.WebControls { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxCas.cs index 4e2548e70b7..a4ce8856dcb 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxCas.cs @@ -52,9 +52,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.ViewState (); unit.Render1 (); unit.DoubleDataBind (); -#if NET_2_0 unit.RowsTooHigh (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxTest.cs index 00193ae6b75..a4880ad03c0 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListBoxTest.cs @@ -79,12 +79,12 @@ namespace MonoTests.System.Web.UI.WebControls base.Render (writer); return writer.InnerWriter.ToString (); } -#if NET_2_0 + public new virtual void VerifyMultiSelect() { base.VerifyMultiSelect(); } -#endif + } [TestFixture] @@ -127,18 +127,11 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (lb.SelectionMode, ListSelectionMode.Multiple, "A6"); lb.ToolTip = "foo"; -#if NET_2_0 Assert.AreEqual (lb.ToolTip, "foo", "A7"); -#else - Assert.AreEqual (lb.ToolTip, String.Empty, "A7"); // Always empty in 1.x -#endif } [Test] [Category ("NotWorking")] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentOutOfRangeException))] -#endif public void RowsTooHigh () { ListBox lb = new ListBox (); @@ -199,21 +192,14 @@ namespace MonoTests.System.Web.UI.WebControls l.Items.Add (i.ToString ()); l.SelectedIndex = l.Items.Count - 1; -#if NET_2_0 + string exp = @"<select size=""4""> <option value=""0"">0</option> <option value=""1"">1</option> <option selected=""selected"" value=""2"">2</option> </select>"; -#else - string exp = @"<select name size=""4""> - <option value=""0"">0</option> - <option value=""1"">1</option> - <option selected=""selected"" value=""2"">2</option> -</select>"; -#endif HtmlDiff.AssertAreEqual (exp, l.Render (), "Render1"); } @@ -238,21 +224,14 @@ namespace MonoTests.System.Web.UI.WebControls l.DataTextField = "Company"; l.DataBind (); l.DataBind (); -#if NET_2_0 + string exp = @"<select size=""4""> <option value=""Novell Inc."">Novell Inc.</option> <option value=""Microsoft Corp."">Microsoft Corp.</option> <option value=""Google"">Google</option> </select>"; -#else - string exp = @"<select name size=""4""> - <option value=""Novell Inc."">Novell Inc.</option> - <option value=""Microsoft Corp."">Microsoft Corp.</option> - <option value=""Google"">Google</option> -</select>"; -#endif HtmlDiff.AssertAreEqual (exp, l.Render (), "DoubleDataBind"); } @@ -366,7 +345,7 @@ namespace MonoTests.System.Web.UI.WebControls Assert.IsFalse (list.Items [3].Selected, "#14"); } -#if NET_2_0 + [Test] public void VerifyMultiSelectPositive() { @@ -696,7 +675,6 @@ namespace MonoTests.System.Web.UI.WebControls { WebTest.CurrentTest.UserData = "SelectedIndexChanged"; } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlCas.cs index 75e3f29e765..177ccb1a2c1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlCas.cs @@ -67,10 +67,8 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.SelectedIndex (); unit.Render (); unit.ItemsOk (); -#if NET_2_0 unit.ControlState (); unit.ItemsTooHigh (); -#endif } } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs index e534f1af0f6..1ddbeb08423 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ListControlTest.cs @@ -36,10 +36,8 @@ using System.Globalization; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; -#if NET_2_0 using MonoTests.stand_alone.WebHarness; using MonoTests.SystemWeb.Framework; -#endif namespace MonoTests.System.Web.UI.WebControls { @@ -83,7 +81,6 @@ namespace MonoTests.System.Web.UI.WebControls { return IsTrackingViewState; } -#if NET_2_0 public HtmlTextWriterTag GetTagKey () { return TagKey; @@ -104,7 +101,6 @@ namespace MonoTests.System.Web.UI.WebControls base.VerifyMultiSelect (); } -#endif } [TestFixture] @@ -142,7 +138,6 @@ namespace MonoTests.System.Web.UI.WebControls base.Render (writer); return writer.InnerWriter.ToString (); } -#if NET_2_0 ArrayList Databound () { ArrayList list = new ArrayList (); @@ -180,18 +175,15 @@ namespace MonoTests.System.Web.UI.WebControls { base.SetPostDataSelection(selectedItem); } -#endif } #endregion private Hashtable changed = new Hashtable (); -#if NET_2_0 [TestFixtureSetUp] public void SetUp () { WebTest.CopyResource (GetType (), "ListControlPage.aspx", "ListControlPage.aspx"); } -#endif [Test] public void DefaultProperties () @@ -208,15 +200,12 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (p.SelectedIndex, -1,"A8"); Assert.AreEqual (p.SelectedItem, null, "A9"); Assert.AreEqual (p.SelectedValue, String.Empty, "A10"); -#if NET_2_0 Assert.IsFalse (p.AppendDataBoundItems, "A11"); Assert.AreEqual (p.Text, "", "A12"); Assert.AreEqual (p.GetTagKey(), HtmlTextWriterTag.Select, "A13"); Assert.AreEqual (false, p.AppendDataBoundItems, "A14"); Assert.AreEqual (false, p.CausesValidation, "A15"); -#endif } -#if NET_2_0 [Test] public void AddAttributesToRender () @@ -403,7 +392,6 @@ namespace MonoTests.System.Web.UI.WebControls #endregion HtmlDiff.AssertAreEqual (orig, html, "MultipleSelect#3"); } -#endif [Test] public void CleanProperties () @@ -490,7 +478,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (p.Items.Count, 2, "A9"); } -#if NET_2_0 [Test] // Tests Save/Load ControlState public void ControlState () @@ -511,7 +498,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (-1, b.SelectedIndex, "A1"); } -#endif [Test] // Tests Save/Load/Track ViewState @@ -585,10 +571,8 @@ namespace MonoTests.System.Web.UI.WebControls p.DataTextFormatString = "DataTextFormatString"; p.DataValueField = "DataValueField"; p.SelectedIndex = 1; -#if NET_2_0 p.AppendDataBoundItems = true; p.Text = "Text"; -#endif Assert.AreEqual (p.ViewStateValue ("AutoPostBack"), false, "A1"); Assert.AreEqual (p.ViewStateValue ("DataMember"), "DataMember", "A2"); @@ -599,17 +583,13 @@ namespace MonoTests.System.Web.UI.WebControls "DataTextFormatString", "A5"); Assert.AreEqual (p.ViewStateValue ("DataValueField"), "DataValueField", "A6"); -#if NET_2_0 Assert.AreEqual (p.ViewStateValue ("AppendDataBoundItems"), true, "A7"); -#endif // None of these are saved Assert.AreEqual (p.ViewStateValue ("SelectedIndex"), null, "A8"); Assert.AreEqual (p.ViewStateValue ("SelectedItem"), null, "A9"); Assert.AreEqual (p.ViewStateValue ("SelectedValue"), null, "A10"); -#if NET_2_0 Assert.AreEqual (p.ViewStateValue ("Text"), null, "A11"); -#endif } @@ -649,18 +629,13 @@ namespace MonoTests.System.Web.UI.WebControls } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentOutOfRangeException))] -#endif public void ItemsTooHigh () { ListControlPoker l = new ListControlPoker (); l.Items.Add ("foo"); l.SelectedIndex = 1; -#if NET_2_0 Assert.AreEqual (-1, l.SelectedIndex, "#01"); -#endif } [Test] @@ -760,7 +735,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (3, p.Items.Count, "#01"); } -#if NET_2_0 [Test] public void DataBinding7 () { ListControlPoker p = new ListControlPoker (); @@ -888,7 +862,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual ("5", p.SelectedValue, "#07"); Assert.AreEqual (4, p.SelectedIndex, "#08"); } -#endif class Data { @@ -999,9 +972,6 @@ namespace MonoTests.System.Web.UI.WebControls } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentOutOfRangeException))] -#endif public void ValueNotFound1 () { ListControlPoker p = new ListControlPoker (); @@ -1021,7 +991,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual(null, p.SelectedItem, "SelectedItem"); Assert.AreEqual(-1, p.SelectedIndex, "SelectedIndex"); } -#if NET_2_0 [Test] [ExpectedException (typeof (HttpException))] public void VerifyMultiSelect_Exception () @@ -1064,7 +1033,6 @@ namespace MonoTests.System.Web.UI.WebControls { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginCas.cs index 7bb9cf2e95a..fb58e0b7e94 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -117,4 +116,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameCas.cs index 40b43e9a30a..43dbeff825f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -90,4 +89,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameTest.cs index e762ece86f6..2a015971d05 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginNameTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -299,4 +298,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusCas.cs index b0629b3ef0e..61f8cabaff6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -66,4 +65,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusTest.cs index 65dc7b722a5..9cb3afefd5d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginStatusTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -315,5 +314,4 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs index dff23da0e49..d5793aaeb15 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -257,14 +256,12 @@ namespace MonoTests.System.Web.UI.WebControls { return new HtmlTextWriter (sw); } -#if NET_2_0 [TestFixtureSetUp] public void SetUp () { WebTest.CopyResource (GetType (), "NoEventValidation.aspx", "NoEventValidation.aspx"); WebTest.CopyResource (GetType (), "LoginDisplayRememberMe.aspx", "LoginDisplayRememberMe.aspx"); } -#endif [Test] public void ReadOnlyFields () @@ -1140,4 +1137,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginViewTest.cs index bb79e2ed981..adfdb75988c 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/LoginViewTest.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.Collections; @@ -266,4 +265,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MappingUrlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MappingUrlTest.cs index c57994bf5ce..f8c2cc5922b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MappingUrlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MappingUrlTest.cs @@ -29,7 +29,6 @@ // ************IMPORTANT********** // Note: This test completed ,but cannot be run by Framework limitations! -#if NET_2_0 using System; using System.Web; @@ -71,4 +70,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MasterPageTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MasterPageTest.cs index dfba12c6b6c..bb975164366 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MasterPageTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MasterPageTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using NUnit.Framework; using System; @@ -319,4 +318,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MenuTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MenuTest.cs index 8e072b86b95..c4defa6b5dc 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MenuTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MenuTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using NUnit.Framework; @@ -2045,4 +2044,3 @@ namespace MonoTests.System.Web.UI.WebControls #endif } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MultiViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MultiViewTest.cs index b7addaf1aba..df0776470f0 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/MultiViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/MultiViewTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -603,4 +602,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceTest.cs index 0ee29d66905..05fa013c7af 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -1746,4 +1745,3 @@ namespace MonoTests.System.Web.UI.WebControls #endregion } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceViewTest.cs index 6fde3781cb3..e6f461ffb81 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ObjectDataSourceViewTest.cs @@ -33,7 +33,6 @@ // OBJECT DATA SOURCE DEFAULT DATA -#if NET_2_0 using NUnit.Framework; using System; @@ -1587,4 +1586,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/PagerSettingsTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/PagerSettingsTest.cs index dfe61e55a86..44f80f7588e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/PagerSettingsTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/PagerSettingsTest.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.Web; @@ -140,4 +139,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs index 7e0399b0bd9..fdca6bf66bc 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ParameterTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -350,4 +349,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/PasswordRecoveryTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/PasswordRecoveryTest.cs index 55cbfda00fd..d687efc56fe 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/PasswordRecoveryTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/PasswordRecoveryTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Drawing; @@ -484,4 +483,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/PolygonHotSpotTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/PolygonHotSpotTest.cs index 5146e83a3ff..89c64de2102 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/PolygonHotSpotTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/PolygonHotSpotTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -77,4 +76,3 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/QueryStringParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/QueryStringParameterTest.cs index 52ad6f0f071..3ede1872c61 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/QueryStringParameterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/QueryStringParameterTest.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.IO; @@ -157,4 +156,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonListTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonListTest.cs index 76ef7320184..c78edd26fbd 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonListTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonListTest.cs @@ -62,7 +62,6 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#if NET_2_0 class PokerRadioButtonList : RadioButtonList { public StateBag StateBag @@ -133,7 +132,6 @@ namespace MonoTests.System.Web.UI.WebControls { base.VerifyMultiSelect(); } } -#endif #endregion [Test] @@ -160,12 +158,8 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (5, r.CellPadding, "setting"); string s = r.Render (); -#if NET_2_0 // FIXME: missing some info to start rendering ? Assert.AreEqual (String.Empty, s, "htmloutput"); -#else - Assert.IsTrue (s.ToLower ().IndexOf ("cellpadding=\"5\"") != -1, "htmloutput"); -#endif } [Test] @@ -176,15 +170,10 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (5, r.CellSpacing, "setting"); string s = r.Render (); -#if NET_2_0 // FIXME: missing some info to start rendering ? Assert.AreEqual (String.Empty, s, "htmloutput"); -#else - Assert.IsTrue (s.ToLower ().IndexOf ("cellspacing=\"5\"") != -1, "htmloutput"); -#endif } -#if NET_2_0 [Test] [Category ("NunitWeb")] public void Render () @@ -209,21 +198,6 @@ namespace MonoTests.System.Web.UI.WebControls { p.Form.Controls.Add (lce); c.Items.Add (new ListItem ("text2", "value1")); } -#else - [Test] - public void Render () - { - TestRadioButtonList c = new TestRadioButtonList (); - - c.Items.Add (new ListItem ("text2", "value1")); - - string s = c.Render (); - - Assert.IsTrue (s.ToLower ().IndexOf (" type=\"radio\"") != -1, "type"); - Assert.IsTrue (s.ToLower ().IndexOf ("value1") != -1, "value"); - Assert.IsTrue (s.ToLower ().IndexOf ("text2") != -1, "text"); - } -#endif // Exceptions [Test] @@ -271,20 +245,11 @@ namespace MonoTests.System.Web.UI.WebControls { nvc ["XXX"] = "3"; IPostBackDataHandler handler = (IPostBackDataHandler) rbl; -#if NET_2_0 Assert.IsFalse (handler.LoadPostData ("XXX", nvc), "#01"); -#else - Assert.IsTrue (handler.LoadPostData ("XXX", nvc), "#01"); -#endif rbl.SelectedIndexChanged += new EventHandler (OnSelected); event_called = false; handler.RaisePostDataChangedEvent (); -#if NET_2_0 Assert.IsTrue (event_called, "#02"); -#else - // Not called. Value is the same as the selected previously - Assert.IsFalse (event_called, "#02"); -#endif Assert.AreEqual ("3", rbl.SelectedValue, "#03"); } @@ -324,7 +289,6 @@ namespace MonoTests.System.Web.UI.WebControls { } -#if NET_2_0 [Test] [ExpectedException(typeof(HttpException))] public void VerifyMultiSelectTest() @@ -525,7 +489,6 @@ namespace MonoTests.System.Web.UI.WebControls { { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs index de2b07348ee..7c8cf2a7c2f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RadioButtonTest.cs @@ -51,12 +51,10 @@ namespace MonoTests.System.Web.UI.WebControls { base.Render (writer); return writer.InnerWriter.ToString (); } -#if NET_2_0 public new void RaisePostDataChangedEvent () { base.RaisePostDataChangedEvent (); } -#endif } [TestFixture] @@ -175,9 +173,7 @@ namespace MonoTests.System.Web.UI.WebControls { TestRadioButton b2 = new TestRadioButton (); b2.GroupName = "mono"; Page p = new Page (); -#if NET_2_0 p.EnableEventValidation = false; -#endif p.ID = "MyPage"; p.Controls.Add (b1); p.Controls.Add (b2); @@ -192,16 +188,13 @@ namespace MonoTests.System.Web.UI.WebControls { TestRadioButton b1 = new TestRadioButton (); b1.ID = "monoId"; Page p = new Page (); -#if NET_2_0 p.EnableEventValidation = false; -#endif p.ID = "MyPage"; p.Controls.Add (b1); string t1 = b1.Render (); Assert.IsTrue (t1.IndexOf ("name=\"monoId\"") != -1, "#01"); } -#if NET_2_0 [Test] public void RaisePostDataChangedEvent () { @@ -359,6 +352,5 @@ namespace MonoTests.System.Web.UI.WebControls { { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RectangleHotSpotTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RectangleHotSpotTest.cs index f6c8bbb5d9d..1ccf55be28c 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RectangleHotSpotTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RectangleHotSpotTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -92,4 +91,3 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.2.0.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.2.0.cs index 13d7cc35c61..89ac879c342 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.2.0.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.2.0.cs @@ -1,4 +1,4 @@ -#if NET_2_0 && !NET_4_0 +#if !NET_4_0 // THIS IS AUTOGENERATED DO NOT EDIT // diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.cs index 8fe5b963aff..e69de29bb2d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeatInfoTest.auto.cs @@ -1,14347 +0,0 @@ -#if !NET_2_0 -// THIS IS AUTOGENERATED DO NOT EDIT -// -// Authors: -// Ben Maurer (bmaurer@novell.com) -// -// Copyright (C) 2005 Novell, Inc (http://www.novell.com) -// -// Permission is hereby granted, free of charge, to any person obtaining -// a copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to -// permit persons to whom the Software is furnished to do so, subject to -// the following conditions: -// -// The above copyright notice and this permission notice shall be -// included in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -// - -using System; -using System.Collections; -using System.ComponentModel; -using System.Drawing; -using System.IO; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; - -using NUnit.Framework; -using MonoTests.stand_alone.WebHarness; -namespace MonoTests.System.Web.UI.WebControls { -[TestFixture] -public class RepeatInfo_Autogen { - public class RepeatInfoUser : IRepeatInfoUser { - - private bool footer; - private bool header; - private bool separators; - private int count; - private int counter; - - - public RepeatInfoUser (bool header, bool footer, bool separators, int count) - { - this.footer = footer; - this.header = header; - this.separators = separators; - this.count = count; - } - - static HtmlTextWriter GetWriter () - { - StringWriter sw = new StringWriter (); - sw.NewLine = "\n"; - return new HtmlTextWriter (sw); - } - - public static string DoTest (int cols, int cnt, RepeatDirection d, RepeatLayout l, bool OuterTableImplied, bool hdr, bool ftr, bool sep) - { - HtmlTextWriter htw = GetWriter (); - RepeatInfo ri = new RepeatInfo (); - ri.RepeatColumns = cols; - ri.RepeatDirection = d; - ri.RepeatLayout = l; - ri.OuterTableImplied = OuterTableImplied; - Style s = new Style (); - if (cols != 3) - s.CssClass = "mainstyle"; - - ri.RenderRepeater (htw, new RepeatInfoUser (hdr, ftr, sep, cnt), s, new DataList ()); - return htw.InnerWriter.ToString (); - } - - - public bool HasFooter { - get { return footer; } - } - - public bool HasHeader { - get { return header; } - } - - public bool HasSeparators { - get { return separators; } - } - - public int RepeatedItemCount { - get { return count; } - } - - public Style GetItemStyle (ListItemType itemType, int repeatIndex) - { - Style s = new Style (); - s.CssClass = String.Format ("{0}{1}", itemType, repeatIndex); - return s; - } - - public void RenderItem (ListItemType itemType, int repeatIndex, RepeatInfo repeatInfo, HtmlTextWriter writer) - { - writer.Write ("({0},{1},{2})", counter++, itemType, repeatIndex); - } - } - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#0"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#1"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(4,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#2"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td> - </tr><tr> - <td colspan=""10"" class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#3"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#4"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#5"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#6"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(14,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#7"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(18,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#8"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(14,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#9"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#10"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)"; - Assert.AreEqual (exp, v, "#11"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)(4,Footer,-1)"; - Assert.AreEqual (exp, v, "#12"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)(10,Footer,-1)"; - Assert.AreEqual (exp, v, "#13"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#14"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)(10,Footer,-1)"; - Assert.AreEqual (exp, v, "#15"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)(8,Footer,-1)"; - Assert.AreEqual (exp, v, "#16"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)(14,Footer,-1)"; - Assert.AreEqual (exp, v, "#17"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)(18,Footer,-1)"; - Assert.AreEqual (exp, v, "#18"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)(14,Footer,-1)"; - Assert.AreEqual (exp, v, "#19"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#20"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#21"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#22"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#23"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#24"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)<br>(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)<br>(9,Item,4)<br>(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#25"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#26"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br>(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br>(14,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#27"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br>(18,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#28"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br>(14,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#29"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#30"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)"; - Assert.AreEqual (exp, v, "#31"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)(4,Footer,-1)"; - Assert.AreEqual (exp, v, "#32"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)(10,Footer,-1)"; - Assert.AreEqual (exp, v, "#33"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#34"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)(10,Footer,-1)"; - Assert.AreEqual (exp, v, "#35"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)(8,Footer,-1)"; - Assert.AreEqual (exp, v, "#36"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)(14,Footer,-1)"; - Assert.AreEqual (exp, v, "#37"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)(18,Footer,-1)"; - Assert.AreEqual (exp, v, "#38"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)(14,Footer,-1)"; - Assert.AreEqual (exp, v, "#39"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#40"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#41"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(4,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#42"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td> - </tr><tr> - <td colspan=""10"" class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#43"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#44"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#45"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#46"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(14,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#47"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(18,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#48"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(14,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#49"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#50"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#51"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td> - </tr><tr> - <td class=""Footer-1"">(4,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#52"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#53"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#54"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#55"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item2"">(3,Item,2)</td><td class=""Separator2"">(4,Separator,2)</td> - </tr><tr> - <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#56"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item4"">(3,Item,4)</td><td class=""Separator4"">(4,Separator,4)</td> - </tr><tr> - <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item5"">(7,Item,5)</td><td class=""Separator5"">(8,Separator,5)</td> - </tr><tr> - <td class=""Item2"">(9,Item,2)</td><td class=""Separator2"">(10,Separator,2)</td><td class=""Item6"">(11,Item,6)</td> - </tr><tr> - <td class=""Item3"">(12,Item,3)</td><td class=""Separator3"">(13,Separator,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(14,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#57"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item6"">(5,Item,6)</td><td class=""Separator6"">(6,Separator,6)</td> - </tr><tr> - <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item7"">(11,Item,7)</td><td class=""Separator7"">(12,Separator,7)</td> - </tr><tr> - <td class=""Item2"">(13,Item,2)</td><td class=""Separator2"">(14,Separator,2)</td><td class=""Item5"">(15,Item,5)</td><td class=""Separator5"">(16,Separator,5)</td><td class=""Item8"">(17,Item,8)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(18,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#58"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item5"">(5,Item,5)</td><td class=""Separator5"">(6,Separator,5)</td> - </tr><tr> - <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item6"">(11,Item,6)</td> - </tr><tr> - <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(14,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#59"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#60"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#61"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#62"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#63"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#64"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)<br>(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)<br>(9,Item,4)<br>(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#65"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#66"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br>(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br>(14,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#67"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br>(18,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#68"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br>(14,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#69"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#70"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#71"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Separator,0)<br>(3,Item,1)<br>(4,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#72"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_hdr_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Separator,0)<br>(3,Item,1)<br>(4,Separator,1)<br>(5,Item,2)<br>(6,Separator,2)<br>(7,Item,3)<br>(8,Separator,3)<br>(9,Item,4)<br>(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#73"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_hdr_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#74"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_hdr_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Separator,0)<br>(3,Item,1)<br>(4,Separator,1)<br>(5,Item,2)<br>(6,Separator,2)<br>(7,Item,3)<br>(8,Separator,3)<br>(9,Item,4)<br>(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#75"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_hdr_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)<br>(5,Item,1)(6,Separator,1)(7,Item,3)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#76"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_hdr_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)<br>(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)<br>(9,Item,2)(10,Separator,2)(11,Item,6)<br>(12,Item,3)(13,Separator,3)<br>(14,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#77"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_hdr_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)<br>(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)<br>(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)<br>(18,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#78"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_hdr_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)<br>(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)<br>(12,Item,2)(13,Separator,2)<br>(14,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#79"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#80"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#81"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(3,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#82"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td> - </tr><tr> - <td colspan=""10"" class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#83"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#84"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#85"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#86"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#87"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#88"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#89"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#90"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#91"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)(3,Footer,-1)"; - Assert.AreEqual (exp, v, "#92"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)(9,Footer,-1)"; - Assert.AreEqual (exp, v, "#93"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#94"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)(9,Footer,-1)"; - Assert.AreEqual (exp, v, "#95"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)(7,Footer,-1)"; - Assert.AreEqual (exp, v, "#96"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)(13,Footer,-1)"; - Assert.AreEqual (exp, v, "#97"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)(17,Footer,-1)"; - Assert.AreEqual (exp, v, "#98"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)(13,Footer,-1)"; - Assert.AreEqual (exp, v, "#99"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#100"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#101"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#102"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#103"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#104"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br>(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)<br>(8,Item,4)<br>(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#105"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#106"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br>(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br>(13,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#107"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br>(17,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#108"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br>(13,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#109"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#110"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#111"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)(3,Footer,-1)"; - Assert.AreEqual (exp, v, "#112"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)(9,Footer,-1)"; - Assert.AreEqual (exp, v, "#113"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#114"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)(9,Footer,-1)"; - Assert.AreEqual (exp, v, "#115"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)(7,Footer,-1)"; - Assert.AreEqual (exp, v, "#116"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)(13,Footer,-1)"; - Assert.AreEqual (exp, v, "#117"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)(17,Footer,-1)"; - Assert.AreEqual (exp, v, "#118"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)(13,Footer,-1)"; - Assert.AreEqual (exp, v, "#119"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#120"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#121"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(3,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#122"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td> - </tr><tr> - <td colspan=""10"" class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#123"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#124"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#125"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#126"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#127"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#128"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#129"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#130"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#131"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Footer-1"">(3,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#132"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#133"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#134"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#135"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item2"">(2,Item,2)</td><td class=""Separator2"">(3,Separator,2)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#136"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item4"">(2,Item,4)</td><td class=""Separator4"">(3,Separator,4)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item5"">(6,Item,5)</td><td class=""Separator5"">(7,Separator,5)</td> - </tr><tr> - <td class=""Item2"">(8,Item,2)</td><td class=""Separator2"">(9,Separator,2)</td><td class=""Item6"">(10,Item,6)</td> - </tr><tr> - <td class=""Item3"">(11,Item,3)</td><td class=""Separator3"">(12,Separator,3)</td> - </tr><tr> - <td colspan=""4"" class=""Footer-1"">(13,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#137"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item6"">(4,Item,6)</td><td class=""Separator6"">(5,Separator,6)</td> - </tr><tr> - <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item7"">(10,Item,7)</td><td class=""Separator7"">(11,Separator,7)</td> - </tr><tr> - <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td class=""Item5"">(14,Item,5)</td><td class=""Separator5"">(15,Separator,5)</td><td class=""Item8"">(16,Item,8)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(17,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#138"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item5"">(4,Item,5)</td><td class=""Separator5"">(5,Separator,5)</td> - </tr><tr> - <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item6"">(10,Item,6)</td> - </tr><tr> - <td class=""Item2"">(11,Item,2)</td><td class=""Separator2"">(12,Separator,2)</td> - </tr><tr> - <td colspan=""6"" class=""Footer-1"">(13,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#139"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#140"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#141"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#142"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#143"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#144"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br>(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)<br>(8,Item,4)<br>(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#145"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#146"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br>(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br>(13,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#147"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br>(17,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#148"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br>(13,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#149"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_ftr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#150"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_ftr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#151"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_ftr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Separator,0)<br>(2,Item,1)<br>(3,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#152"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_ftr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Separator,0)<br>(2,Item,1)<br>(3,Separator,1)<br>(4,Item,2)<br>(5,Separator,2)<br>(6,Item,3)<br>(7,Separator,3)<br>(8,Item,4)<br>(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#153"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_ftr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#154"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_ftr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Separator,0)<br>(2,Item,1)<br>(3,Separator,1)<br>(4,Item,2)<br>(5,Separator,2)<br>(6,Item,3)<br>(7,Separator,3)<br>(8,Item,4)<br>(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#155"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_ftr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)<br>(4,Item,1)(5,Separator,1)(6,Item,3)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#156"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_ftr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)<br>(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)<br>(8,Item,2)(9,Separator,2)(10,Item,6)<br>(11,Item,3)(12,Separator,3)<br>(13,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#157"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_ftr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)<br>(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)<br>(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)<br>(17,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#158"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_ftr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)<br>(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)<br>(11,Item,2)(12,Separator,2)<br>(13,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#159"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#160"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#161"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#162"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#163"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#164"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#165"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#166"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#167"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#168"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#169"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#170"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)"; - Assert.AreEqual (exp, v, "#171"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)"; - Assert.AreEqual (exp, v, "#172"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)"; - Assert.AreEqual (exp, v, "#173"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#174"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)"; - Assert.AreEqual (exp, v, "#175"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)"; - Assert.AreEqual (exp, v, "#176"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)"; - Assert.AreEqual (exp, v, "#177"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)"; - Assert.AreEqual (exp, v, "#178"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)"; - Assert.AreEqual (exp, v, "#179"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#180"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#181"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#182"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#183"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#184"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)<br>(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)<br>(9,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#185"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#186"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br>(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#187"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#188"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#189"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#190"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)"; - Assert.AreEqual (exp, v, "#191"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)"; - Assert.AreEqual (exp, v, "#192"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)"; - Assert.AreEqual (exp, v, "#193"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#194"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)<br>(2,Separator,0)(3,Item,1)<br>(4,Separator,1)(5,Item,2)<br>(6,Separator,2)(7,Item,3)<br>(8,Separator,3)(9,Item,4)"; - Assert.AreEqual (exp, v, "#195"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)(5,Item,1)(6,Separator,1)(7,Item,3)"; - Assert.AreEqual (exp, v, "#196"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)(9,Item,2)(10,Separator,2)(11,Item,6)(12,Item,3)(13,Separator,3)"; - Assert.AreEqual (exp, v, "#197"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)"; - Assert.AreEqual (exp, v, "#198"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, true); - string exp = @"(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)(12,Item,2)(13,Separator,2)"; - Assert.AreEqual (exp, v, "#199"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#200"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#201"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#202"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""10"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#203"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#204"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#205"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#206"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td><td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#207"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td><td class=""Separator6"">(14,Separator,6)</td><td class=""Item7"">(15,Item,7)</td><td class=""Separator7"">(16,Separator,7)</td><td class=""Item8"">(17,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#208"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item1"">(3,Item,1)</td><td class=""Separator1"">(4,Separator,1)</td><td class=""Item2"">(5,Item,2)</td><td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td><td class=""Separator3"">(8,Separator,3)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item5"">(11,Item,5)</td><td class=""Separator5"">(12,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(13,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#209"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#210"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#211"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#212"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#213"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#214"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(2,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(4,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(6,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(8,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(9,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#215"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item2"">(3,Item,2)</td><td class=""Separator2"">(4,Separator,2)</td> - </tr><tr> - <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item3"">(7,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#216"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""4"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item4"">(3,Item,4)</td><td class=""Separator4"">(4,Separator,4)</td> - </tr><tr> - <td class=""Item1"">(5,Item,1)</td><td class=""Separator1"">(6,Separator,1)</td><td class=""Item5"">(7,Item,5)</td><td class=""Separator5"">(8,Separator,5)</td> - </tr><tr> - <td class=""Item2"">(9,Item,2)</td><td class=""Separator2"">(10,Separator,2)</td><td class=""Item6"">(11,Item,6)</td> - </tr><tr> - <td class=""Item3"">(12,Item,3)</td><td class=""Separator3"">(13,Separator,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#217"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item6"">(5,Item,6)</td><td class=""Separator6"">(6,Separator,6)</td> - </tr><tr> - <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item7"">(11,Item,7)</td><td class=""Separator7"">(12,Separator,7)</td> - </tr><tr> - <td class=""Item2"">(13,Item,2)</td><td class=""Separator2"">(14,Separator,2)</td><td class=""Item5"">(15,Item,5)</td><td class=""Separator5"">(16,Separator,5)</td><td class=""Item8"">(17,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#218"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, true); - string exp = @"<table border=""0""> - <tr> - <td colspan=""6"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Separator0"">(2,Separator,0)</td><td class=""Item3"">(3,Item,3)</td><td class=""Separator3"">(4,Separator,3)</td><td class=""Item5"">(5,Item,5)</td><td class=""Separator5"">(6,Separator,5)</td> - </tr><tr> - <td class=""Item1"">(7,Item,1)</td><td class=""Separator1"">(8,Separator,1)</td><td class=""Item4"">(9,Item,4)</td><td class=""Separator4"">(10,Separator,4)</td><td class=""Item6"">(11,Item,6)</td> - </tr><tr> - <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#219"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#220"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#221"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#222"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)(9,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#223"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#224"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)<br>(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)<br>(9,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#225"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#226"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)<br>(5,Item,2)(6,Separator,2)(7,Item,3)(8,Separator,3)<br>(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#227"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)(14,Separator,6)(15,Item,7)(16,Separator,7)(17,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#228"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,1)(4,Separator,1)(5,Item,2)(6,Separator,2)<br>(7,Item,3)(8,Separator,3)(9,Item,4)(10,Separator,4)(11,Item,5)(12,Separator,5)<br>(13,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#229"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_hdr_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#230"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_hdr_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#231"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_hdr_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Separator,0)<br>(3,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#232"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_hdr_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Separator,0)<br>(3,Item,1)<br>(4,Separator,1)<br>(5,Item,2)<br>(6,Separator,2)<br>(7,Item,3)<br>(8,Separator,3)<br>(9,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#233"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_hdr_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#234"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_hdr_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Separator,0)<br>(3,Item,1)<br>(4,Separator,1)<br>(5,Item,2)<br>(6,Separator,2)<br>(7,Item,3)<br>(8,Separator,3)<br>(9,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#235"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_hdr_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,2)(4,Separator,2)<br>(5,Item,1)(6,Separator,1)(7,Item,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#236"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_hdr_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,4)(4,Separator,4)<br>(5,Item,1)(6,Separator,1)(7,Item,5)(8,Separator,5)<br>(9,Item,2)(10,Separator,2)(11,Item,6)<br>(12,Item,3)(13,Separator,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#237"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_hdr_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,6)(6,Separator,6)<br>(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,7)(12,Separator,7)<br>(13,Item,2)(14,Separator,2)(15,Item,5)(16,Separator,5)(17,Item,8)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#238"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_hdr_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, true); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Separator,0)(3,Item,3)(4,Separator,3)(5,Item,5)(6,Separator,5)<br>(7,Item,1)(8,Separator,1)(9,Item,4)(10,Separator,4)(11,Item,6)<br>(12,Item,2)(13,Separator,2)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#239"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#240"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#241"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#242"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#243"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#244"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#245"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#246"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#247"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#248"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#249"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @""; - Assert.AreEqual (exp, v, "#250"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)"; - Assert.AreEqual (exp, v, "#251"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)"; - Assert.AreEqual (exp, v, "#252"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)"; - Assert.AreEqual (exp, v, "#253"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @""; - Assert.AreEqual (exp, v, "#254"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)"; - Assert.AreEqual (exp, v, "#255"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)"; - Assert.AreEqual (exp, v, "#256"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)"; - Assert.AreEqual (exp, v, "#257"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)"; - Assert.AreEqual (exp, v, "#258"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)"; - Assert.AreEqual (exp, v, "#259"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#260"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#261"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#262"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#263"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#264"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br>(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)<br>(8,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#265"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#266"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br>(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#267"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#268"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#269"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @""; - Assert.AreEqual (exp, v, "#270"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)"; - Assert.AreEqual (exp, v, "#271"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)"; - Assert.AreEqual (exp, v, "#272"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)"; - Assert.AreEqual (exp, v, "#273"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @""; - Assert.AreEqual (exp, v, "#274"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)<br>(1,Separator,0)(2,Item,1)<br>(3,Separator,1)(4,Item,2)<br>(5,Separator,2)(6,Item,3)<br>(7,Separator,3)(8,Item,4)"; - Assert.AreEqual (exp, v, "#275"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)(4,Item,1)(5,Separator,1)(6,Item,3)"; - Assert.AreEqual (exp, v, "#276"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)(8,Item,2)(9,Separator,2)(10,Item,6)(11,Item,3)(12,Separator,3)"; - Assert.AreEqual (exp, v, "#277"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)"; - Assert.AreEqual (exp, v, "#278"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, true); - string exp = @"(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)(11,Item,2)(12,Separator,2)"; - Assert.AreEqual (exp, v, "#279"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#280"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#281"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#282"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#283"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#284"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#285"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#286"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td><td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#287"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td><td class=""Separator6"">(13,Separator,6)</td><td class=""Item7"">(14,Item,7)</td><td class=""Separator7"">(15,Separator,7)</td><td class=""Item8"">(16,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#288"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Separator1"">(3,Separator,1)</td><td class=""Item2"">(4,Item,2)</td><td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td><td class=""Separator3"">(7,Separator,3)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item5"">(10,Item,5)</td><td class=""Separator5"">(11,Separator,5)</td> - </tr><tr> - <td class=""Item6"">(12,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#289"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#290"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#291"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#292"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#293"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#294"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Separator0"">(1,Separator,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Separator1"">(3,Separator,1)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td> - </tr><tr> - <td class=""Separator2"">(5,Separator,2)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td class=""Separator3"">(7,Separator,3)</td> - </tr><tr> - <td class=""Item4"">(8,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#295"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item2"">(2,Item,2)</td><td class=""Separator2"">(3,Separator,2)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item3"">(6,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#296"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item4"">(2,Item,4)</td><td class=""Separator4"">(3,Separator,4)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Separator1"">(5,Separator,1)</td><td class=""Item5"">(6,Item,5)</td><td class=""Separator5"">(7,Separator,5)</td> - </tr><tr> - <td class=""Item2"">(8,Item,2)</td><td class=""Separator2"">(9,Separator,2)</td><td class=""Item6"">(10,Item,6)</td> - </tr><tr> - <td class=""Item3"">(11,Item,3)</td><td class=""Separator3"">(12,Separator,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#297"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item6"">(4,Item,6)</td><td class=""Separator6"">(5,Separator,6)</td> - </tr><tr> - <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item7"">(10,Item,7)</td><td class=""Separator7"">(11,Separator,7)</td> - </tr><tr> - <td class=""Item2"">(12,Item,2)</td><td class=""Separator2"">(13,Separator,2)</td><td class=""Item5"">(14,Item,5)</td><td class=""Separator5"">(15,Separator,5)</td><td class=""Item8"">(16,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#298"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, true); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Separator0"">(1,Separator,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Separator3"">(3,Separator,3)</td><td class=""Item5"">(4,Item,5)</td><td class=""Separator5"">(5,Separator,5)</td> - </tr><tr> - <td class=""Item1"">(6,Item,1)</td><td class=""Separator1"">(7,Separator,1)</td><td class=""Item4"">(8,Item,4)</td><td class=""Separator4"">(9,Separator,4)</td><td class=""Item6"">(10,Item,6)</td> - </tr><tr> - <td class=""Item2"">(11,Item,2)</td><td class=""Separator2"">(12,Separator,2)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#299"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#300"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#301"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#302"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)(8,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#303"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#304"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)<br>(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)<br>(8,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#305"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#306"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)<br>(4,Item,2)(5,Separator,2)(6,Item,3)(7,Separator,3)<br>(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#307"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)(13,Separator,6)(14,Item,7)(15,Separator,7)(16,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#308"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,1)(3,Separator,1)(4,Item,2)(5,Separator,2)<br>(6,Item,3)(7,Separator,3)(8,Item,4)(9,Separator,4)(10,Item,5)(11,Separator,5)<br>(12,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#309"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_sep () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#310"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_sep () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#311"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_sep () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Separator,0)<br>(2,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#312"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_sep () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Separator,0)<br>(2,Item,1)<br>(3,Separator,1)<br>(4,Item,2)<br>(5,Separator,2)<br>(6,Item,3)<br>(7,Separator,3)<br>(8,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#313"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_sep () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#314"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_sep () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Separator,0)<br>(2,Item,1)<br>(3,Separator,1)<br>(4,Item,2)<br>(5,Separator,2)<br>(6,Item,3)<br>(7,Separator,3)<br>(8,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#315"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_sep () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,2)(3,Separator,2)<br>(4,Item,1)(5,Separator,1)(6,Item,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#316"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_sep () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Separator,0)(2,Item,4)(3,Separator,4)<br>(4,Item,1)(5,Separator,1)(6,Item,5)(7,Separator,5)<br>(8,Item,2)(9,Separator,2)(10,Item,6)<br>(11,Item,3)(12,Separator,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#317"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_sep () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,6)(5,Separator,6)<br>(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,7)(11,Separator,7)<br>(12,Item,2)(13,Separator,2)(14,Item,5)(15,Separator,5)(16,Item,8)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#318"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_sep () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : True - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, true); - string exp = @"<span>(0,Item,0)(1,Separator,0)(2,Item,3)(3,Separator,3)(4,Item,5)(5,Separator,5)<br>(6,Item,1)(7,Separator,1)(8,Item,4)(9,Separator,4)(10,Item,6)<br>(11,Item,2)(12,Separator,2)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#319"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#320"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#321"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(3,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#322"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td> - </tr><tr> - <td colspan=""5"" class=""Footer-1"">(6,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#323"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#324"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(6,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#325"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#326"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#327"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#328"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, true, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#329"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#330"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)"; - Assert.AreEqual (exp, v, "#331"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)"; - Assert.AreEqual (exp, v, "#332"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)"; - Assert.AreEqual (exp, v, "#333"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#334"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)"; - Assert.AreEqual (exp, v, "#335"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)(5,Footer,-1)"; - Assert.AreEqual (exp, v, "#336"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)(8,Footer,-1)"; - Assert.AreEqual (exp, v, "#337"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)(10,Footer,-1)"; - Assert.AreEqual (exp, v, "#338"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)(8,Footer,-1)"; - Assert.AreEqual (exp, v, "#339"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#340"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#341"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#342"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#343"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#344"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)<br>(6,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#345"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br>(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#346"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br>(5,Item,4)(6,Item,5)<br>(7,Item,6)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#347"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)(8,Item,7)(9,Item,8)<br>(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#348"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, true, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#349"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#350"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Footer,-1)"; - Assert.AreEqual (exp, v, "#351"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)"; - Assert.AreEqual (exp, v, "#352"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)"; - Assert.AreEqual (exp, v, "#353"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#354"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)"; - Assert.AreEqual (exp, v, "#355"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)(5,Footer,-1)"; - Assert.AreEqual (exp, v, "#356"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)(8,Footer,-1)"; - Assert.AreEqual (exp, v, "#357"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)(10,Footer,-1)"; - Assert.AreEqual (exp, v, "#358"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, true, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)(8,Footer,-1)"; - Assert.AreEqual (exp, v, "#359"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td colspan=""0"" class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#360"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#361"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(3,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#362"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td> - </tr><tr> - <td colspan=""5"" class=""Footer-1"">(6,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#363"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#364"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(6,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#365"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#366"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#367"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#368"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, true, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#369"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#370"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#371"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Footer-1"">(3,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#372"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(6,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#373"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#374"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(6,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#375"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#376"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item4"">(2,Item,4)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item5"">(4,Item,5)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#377"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item6"">(3,Item,6)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item7"">(6,Item,7)</td> - </tr><tr> - <td class=""Item2"">(7,Item,2)</td><td class=""Item5"">(8,Item,5)</td><td class=""Item8"">(9,Item,8)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(10,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#378"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, true, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item5"">(3,Item,5)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td class=""Item2"">(7,Item,2)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(8,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#379"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#380"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#381"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#382"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)(6,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#383"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#384"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)<br>(6,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#385"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br>(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#386"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br>(5,Item,4)(6,Item,5)<br>(7,Item,6)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#387"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)(8,Item,7)(9,Item,8)<br>(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#388"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#389"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_hdr_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#390"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_hdr_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#391"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_hdr_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#392"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_hdr_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)<br>(6,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#393"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_hdr_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#394"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_hdr_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)<br>(6,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#395"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_hdr_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,2)<br>(3,Item,1)(4,Item,3)<br>(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#396"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_hdr_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,4)<br>(3,Item,1)(4,Item,5)<br>(5,Item,2)(6,Item,6)<br>(7,Item,3)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#397"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_hdr_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,3)(3,Item,6)<br>(4,Item,1)(5,Item,4)(6,Item,7)<br>(7,Item,2)(8,Item,5)(9,Item,8)<br>(10,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#398"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_hdr_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, true, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,3)(3,Item,5)<br>(4,Item,1)(5,Item,4)(6,Item,6)<br>(7,Item,2)<br>(8,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#399"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#400"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#401"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#402"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td> - </tr><tr> - <td colspan=""5"" class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#403"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#404"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#405"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#406"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#407"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#408"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, true, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#409"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#410"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#411"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Footer,-1)"; - Assert.AreEqual (exp, v, "#412"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)"; - Assert.AreEqual (exp, v, "#413"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#414"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)"; - Assert.AreEqual (exp, v, "#415"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)(4,Footer,-1)"; - Assert.AreEqual (exp, v, "#416"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)(7,Footer,-1)"; - Assert.AreEqual (exp, v, "#417"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)(9,Footer,-1)"; - Assert.AreEqual (exp, v, "#418"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)(7,Footer,-1)"; - Assert.AreEqual (exp, v, "#419"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#420"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#421"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#422"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#423"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#424"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)<br>(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#425"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br>(4,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#426"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br>(4,Item,4)(5,Item,5)<br>(6,Item,6)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#427"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)(7,Item,7)(8,Item,8)<br>(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#428"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, true, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#429"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#430"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Footer,-1)"; - Assert.AreEqual (exp, v, "#431"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Footer,-1)"; - Assert.AreEqual (exp, v, "#432"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)"; - Assert.AreEqual (exp, v, "#433"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Footer,-1)"; - Assert.AreEqual (exp, v, "#434"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)"; - Assert.AreEqual (exp, v, "#435"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)(4,Footer,-1)"; - Assert.AreEqual (exp, v, "#436"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)(7,Footer,-1)"; - Assert.AreEqual (exp, v, "#437"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)(9,Footer,-1)"; - Assert.AreEqual (exp, v, "#438"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, true, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)(7,Footer,-1)"; - Assert.AreEqual (exp, v, "#439"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#440"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#441"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#442"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td> - </tr><tr> - <td colspan=""5"" class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#443"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#444"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#445"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#446"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#447"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#448"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, true, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#449"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#450"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Footer-1"">(1,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#451"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Footer-1"">(2,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#452"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#453"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Footer-1"">(0,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#454"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr><tr> - <td class=""Footer-1"">(5,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#455"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item2"">(1,Item,2)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(4,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#456"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item4"">(1,Item,4)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Item5"">(3,Item,5)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Item6"">(5,Item,6)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td> - </tr><tr> - <td colspan=""2"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#457"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item6"">(2,Item,6)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item7"">(5,Item,7)</td> - </tr><tr> - <td class=""Item2"">(6,Item,2)</td><td class=""Item5"">(7,Item,5)</td><td class=""Item8"">(8,Item,8)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(9,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#458"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, true, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item5"">(2,Item,5)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item6"">(5,Item,6)</td> - </tr><tr> - <td class=""Item2"">(6,Item,2)</td> - </tr><tr> - <td colspan=""3"" class=""Footer-1"">(7,Footer,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#459"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#460"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#461"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#462"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#463"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#464"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)<br>(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#465"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br>(4,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#466"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br>(4,Item,4)(5,Item,5)<br>(6,Item,6)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#467"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)(7,Item,7)(8,Item,8)<br>(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#468"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#469"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_ftr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#470"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_ftr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#471"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_ftr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#472"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_ftr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)<br>(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#473"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_ftr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#474"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_ftr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)<br>(5,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#475"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_ftr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,2)<br>(2,Item,1)(3,Item,3)<br>(4,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#476"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_ftr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,4)<br>(2,Item,1)(3,Item,5)<br>(4,Item,2)(5,Item,6)<br>(6,Item,3)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#477"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_ftr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,6)<br>(3,Item,1)(4,Item,4)(5,Item,7)<br>(6,Item,2)(7,Item,5)(8,Item,8)<br>(9,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#478"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_ftr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : True - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, true, false); - string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,5)<br>(3,Item,1)(4,Item,4)(5,Item,6)<br>(6,Item,2)<br>(7,Footer,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#479"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#480"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#481"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#482"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#483"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#484"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#485"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#486"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#487"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#488"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, true, false, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#489"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#490"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)"; - Assert.AreEqual (exp, v, "#491"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)"; - Assert.AreEqual (exp, v, "#492"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)"; - Assert.AreEqual (exp, v, "#493"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#494"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)"; - Assert.AreEqual (exp, v, "#495"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)"; - Assert.AreEqual (exp, v, "#496"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)"; - Assert.AreEqual (exp, v, "#497"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)"; - Assert.AreEqual (exp, v, "#498"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)"; - Assert.AreEqual (exp, v, "#499"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#500"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#501"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#502"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#503"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#504"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#505"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#506"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br>(5,Item,4)(6,Item,5)<br>(7,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#507"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)(8,Item,7)(9,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#508"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, true, false, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#509"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#510"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)"; - Assert.AreEqual (exp, v, "#511"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)"; - Assert.AreEqual (exp, v, "#512"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)"; - Assert.AreEqual (exp, v, "#513"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)"; - Assert.AreEqual (exp, v, "#514"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)"; - Assert.AreEqual (exp, v, "#515"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,2)(3,Item,1)(4,Item,3)"; - Assert.AreEqual (exp, v, "#516"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,4)(3,Item,1)(4,Item,5)(5,Item,2)(6,Item,6)(7,Item,3)"; - Assert.AreEqual (exp, v, "#517"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,6)(4,Item,1)(5,Item,4)(6,Item,7)(7,Item,2)(8,Item,5)(9,Item,8)"; - Assert.AreEqual (exp, v, "#518"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, true, false, false); - string exp = @"(0,Header,-1)(1,Item,0)(2,Item,3)(3,Item,5)(4,Item,1)(5,Item,4)(6,Item,6)(7,Item,2)"; - Assert.AreEqual (exp, v, "#519"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""0"" class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#520"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#521"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#522"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""5"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#523"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#524"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#525"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#526"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td><td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#527"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td><td class=""Item7"">(8,Item,7)</td><td class=""Item8"">(9,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#528"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, true, false, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item1"">(2,Item,1)</td><td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item5"">(6,Item,5)</td> - </tr><tr> - <td class=""Item6"">(7,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#529"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#530"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#531"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#532"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#533"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#534"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td> - </tr><tr> - <td class=""Item2"">(3,Item,2)</td> - </tr><tr> - <td class=""Item3"">(4,Item,3)</td> - </tr><tr> - <td class=""Item4"">(5,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#535"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item3"">(4,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#536"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td colspan=""2"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item4"">(2,Item,4)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item5"">(4,Item,5)</td> - </tr><tr> - <td class=""Item2"">(5,Item,2)</td><td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td class=""Item3"">(7,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#537"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item6"">(3,Item,6)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item7"">(6,Item,7)</td> - </tr><tr> - <td class=""Item2"">(7,Item,2)</td><td class=""Item5"">(8,Item,5)</td><td class=""Item8"">(9,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#538"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, true, false, false); - string exp = @"<table border=""0""> - <tr> - <td colspan=""3"" class=""Header-1"">(0,Header,-1)</td> - </tr><tr> - <td class=""Item0"">(1,Item,0)</td><td class=""Item3"">(2,Item,3)</td><td class=""Item5"">(3,Item,5)</td> - </tr><tr> - <td class=""Item1"">(4,Item,1)</td><td class=""Item4"">(5,Item,4)</td><td class=""Item6"">(6,Item,6)</td> - </tr><tr> - <td class=""Item2"">(7,Item,2)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#539"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#540"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#541"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#542"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)(1,Item,0)(2,Item,1)(3,Item,2)(4,Item,3)(5,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#543"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#544"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#545"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#546"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,1)<br>(3,Item,2)(4,Item,3)<br>(5,Item,4)(6,Item,5)<br>(7,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#547"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)(8,Item,7)(9,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#548"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,1)(3,Item,2)<br>(4,Item,3)(5,Item,4)(6,Item,5)<br>(7,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#549"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_hdr () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#550"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_hdr () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#551"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_hdr () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#552"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_hdr () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#553"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_hdr () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#554"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_hdr () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)<br>(2,Item,1)<br>(3,Item,2)<br>(4,Item,3)<br>(5,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#555"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_hdr () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,2)<br>(3,Item,1)(4,Item,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#556"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_hdr () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span class=""mainstyle"">(0,Header,-1)<br>(1,Item,0)(2,Item,4)<br>(3,Item,1)(4,Item,5)<br>(5,Item,2)(6,Item,6)<br>(7,Item,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#557"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_hdr () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,3)(3,Item,6)<br>(4,Item,1)(5,Item,4)(6,Item,7)<br>(7,Item,2)(8,Item,5)(9,Item,8)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#558"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_hdr () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : True - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, true, false, false); - string exp = @"<span>(0,Header,-1)<br>(1,Item,0)(2,Item,3)(3,Item,5)<br>(4,Item,1)(5,Item,4)(6,Item,6)<br>(7,Item,2)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#559"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl_otrtblimp () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#560"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl_otrtblimp () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#561"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl_otrtblimp () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#562"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl_otrtblimp () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#563"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl_otrtblimp () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#564"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl_otrtblimp () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#565"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl_otrtblimp () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#566"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl_otrtblimp () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#567"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl_otrtblimp () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#568"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl_otrtblimp () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, true, false, false, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#569"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl_otrtblimp () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @""; - Assert.AreEqual (exp, v, "#570"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl_otrtblimp () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)"; - Assert.AreEqual (exp, v, "#571"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl_otrtblimp () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,1)"; - Assert.AreEqual (exp, v, "#572"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl_otrtblimp () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)"; - Assert.AreEqual (exp, v, "#573"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl_otrtblimp () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @""; - Assert.AreEqual (exp, v, "#574"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl_otrtblimp () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)"; - Assert.AreEqual (exp, v, "#575"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl_otrtblimp () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)"; - Assert.AreEqual (exp, v, "#576"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl_otrtblimp () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)"; - Assert.AreEqual (exp, v, "#577"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl_otrtblimp () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)"; - Assert.AreEqual (exp, v, "#578"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl_otrtblimp () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)"; - Assert.AreEqual (exp, v, "#579"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow_otrtblimp () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#580"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow_otrtblimp () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#581"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow_otrtblimp () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#582"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow_otrtblimp () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#583"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow_otrtblimp () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#584"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow_otrtblimp () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#585"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow_otrtblimp () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#586"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow_otrtblimp () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br>(4,Item,4)(5,Item,5)<br>(6,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#587"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow_otrtblimp () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)(7,Item,7)(8,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#588"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow_otrtblimp () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, true, false, false, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#589"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow_otrtblimp () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @""; - Assert.AreEqual (exp, v, "#590"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow_otrtblimp () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)"; - Assert.AreEqual (exp, v, "#591"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow_otrtblimp () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,1)"; - Assert.AreEqual (exp, v, "#592"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow_otrtblimp () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)"; - Assert.AreEqual (exp, v, "#593"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow_otrtblimp () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @""; - Assert.AreEqual (exp, v, "#594"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow_otrtblimp () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)"; - Assert.AreEqual (exp, v, "#595"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow_otrtblimp () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,2)(2,Item,1)(3,Item,3)"; - Assert.AreEqual (exp, v, "#596"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow_otrtblimp () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,4)(2,Item,1)(3,Item,5)(4,Item,2)(5,Item,6)(6,Item,3)"; - Assert.AreEqual (exp, v, "#597"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow_otrtblimp () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,6)(3,Item,1)(4,Item,4)(5,Item,7)(6,Item,2)(7,Item,5)(8,Item,8)"; - Assert.AreEqual (exp, v, "#598"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow_otrtblimp () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : True - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, true, false, false, false); - string exp = @"(0,Item,0)(1,Item,3)(2,Item,5)(3,Item,1)(4,Item,4)(5,Item,6)(6,Item,2)"; - Assert.AreEqual (exp, v, "#599"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_tbl () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#600"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_tbl () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#601"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_tbl () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#602"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_tbl () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#603"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_tbl () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#604"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_tbl () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#605"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_tbl () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#606"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_tbl () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td><td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#607"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_tbl () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td><td class=""Item7"">(7,Item,7)</td><td class=""Item8"">(8,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#608"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_tbl () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Table, false, false, false, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item1"">(1,Item,1)</td><td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item5"">(5,Item,5)</td> - </tr><tr> - <td class=""Item6"">(6,Item,6)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#609"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_tbl () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#610"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_tbl () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#611"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_tbl () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#612"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_tbl () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#613"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_tbl () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#614"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_tbl () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td> - </tr><tr> - <td class=""Item1"">(1,Item,1)</td> - </tr><tr> - <td class=""Item2"">(2,Item,2)</td> - </tr><tr> - <td class=""Item3"">(3,Item,3)</td> - </tr><tr> - <td class=""Item4"">(4,Item,4)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#615"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_tbl () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item2"">(1,Item,2)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Item3"">(3,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#616"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_tbl () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table class=""mainstyle"" border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item4"">(1,Item,4)</td> - </tr><tr> - <td class=""Item1"">(2,Item,1)</td><td class=""Item5"">(3,Item,5)</td> - </tr><tr> - <td class=""Item2"">(4,Item,2)</td><td class=""Item6"">(5,Item,6)</td> - </tr><tr> - <td class=""Item3"">(6,Item,3)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#617"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_tbl () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item6"">(2,Item,6)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item7"">(5,Item,7)</td> - </tr><tr> - <td class=""Item2"">(6,Item,2)</td><td class=""Item5"">(7,Item,5)</td><td class=""Item8"">(8,Item,8)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#618"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_tbl () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Table - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Table, false, false, false, false); - string exp = @"<table border=""0""> - <tr> - <td class=""Item0"">(0,Item,0)</td><td class=""Item3"">(1,Item,3)</td><td class=""Item5"">(2,Item,5)</td> - </tr><tr> - <td class=""Item1"">(3,Item,1)</td><td class=""Item4"">(4,Item,4)</td><td class=""Item6"">(5,Item,6)</td> - </tr><tr> - <td class=""Item2"">(6,Item,2)</td> - </tr> -</table>"; - HtmlDiff.AssertAreEqual (exp, v, "#619"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_horiz_flow () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#620"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_horiz_flow () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#621"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_horiz_flow () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#622"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_horiz_flow () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)(2,Item,2)(3,Item,3)(4,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#623"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_horiz_flow () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#624"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_horiz_flow () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#625"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_horiz_flow () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#626"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_horiz_flow () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,1)<br>(2,Item,2)(3,Item,3)<br>(4,Item,4)(5,Item,5)<br>(6,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#627"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_horiz_flow () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)(7,Item,7)(8,Item,8)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#628"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_horiz_flow () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Horizontal - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Horizontal, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span>(0,Item,0)(1,Item,1)(2,Item,2)<br>(3,Item,3)(4,Item,4)(5,Item,5)<br>(6,Item,6)<br></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#629"); - } - - - [Test] - public void RepeatInfo_0cols_0itms_vert_flow () - { - // cols : 0 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#630"); - } - - - [Test] - public void RepeatInfo_0cols_1itms_vert_flow () - { - // cols : 0 - // cnt : 1 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 1, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#631"); - } - - - [Test] - public void RepeatInfo_0cols_2itms_vert_flow () - { - // cols : 0 - // cnt : 2 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 2, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#632"); - } - - - [Test] - public void RepeatInfo_0cols_5itms_vert_flow () - { - // cols : 0 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (0, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#633"); - } - - - [Test] - public void RepeatInfo_1cols_0itms_vert_flow () - { - // cols : 1 - // cnt : 0 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 0, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle""></span>"; - HtmlDiff.AssertAreEqual (exp, v, "#634"); - } - - - [Test] - public void RepeatInfo_1cols_5itms_vert_flow () - { - // cols : 1 - // cnt : 5 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (1, 5, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)<br>(1,Item,1)<br>(2,Item,2)<br>(3,Item,3)<br>(4,Item,4)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#635"); - } - - - [Test] - public void RepeatInfo_2cols_4itms_vert_flow () - { - // cols : 2 - // cnt : 4 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 4, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,2)<br>(2,Item,1)(3,Item,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#636"); - } - - - [Test] - public void RepeatInfo_2cols_7itms_vert_flow () - { - // cols : 2 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (2, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span class=""mainstyle"">(0,Item,0)(1,Item,4)<br>(2,Item,1)(3,Item,5)<br>(4,Item,2)(5,Item,6)<br>(6,Item,3)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#637"); - } - - - [Test] - public void RepeatInfo_3cols_9itms_vert_flow () - { - // cols : 3 - // cnt : 9 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 9, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,6)<br>(3,Item,1)(4,Item,4)(5,Item,7)<br>(6,Item,2)(7,Item,5)(8,Item,8)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#638"); - } - - - [Test] - public void RepeatInfo_3cols_7itms_vert_flow () - { - // cols : 3 - // cnt : 7 - // RepeatDirection : Vertical - // RepeatLayout : Flow - // OuterTableImplied : False - // Header : False - // Footer : False - // Separator : False - - - string v = RepeatInfoUser.DoTest (3, 7, RepeatDirection.Vertical, RepeatLayout.Flow, false, false, false, false); - string exp = @"<span>(0,Item,0)(1,Item,3)(2,Item,5)<br>(3,Item,1)(4,Item,4)(5,Item,6)<br>(6,Item,2)</span>"; - HtmlDiff.AssertAreEqual (exp, v, "#639"); - } - - -} -} -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterCas.cs index ebd4b33c24c..6b9d8b3c3d6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterCas.cs @@ -43,7 +43,6 @@ namespace MonoCasTests.System.Web.UI.WebControls { [Category ("CAS")] public class RepeaterCas : AspNetHostingMinimal { -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Deny_Unrestricted () @@ -51,7 +50,6 @@ namespace MonoCasTests.System.Web.UI.WebControls { RepeaterTest unit = new RepeaterTest (); unit.Repeater_DefaultsSelectArguments (); } -#endif // LinkDemand public override Type Type { diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterTest.cs index dd9aaa9989c..7723d36db5b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RepeaterTest.cs @@ -59,7 +59,6 @@ namespace MonoTests.System.Web.UI.WebControls LoadViewState (o); } -#if NET_2_0 public DataSourceSelectArguments GetSelectArguments() { return SelectArguments; @@ -118,10 +117,8 @@ namespace MonoTests.System.Web.UI.WebControls { eventChecker = false; } -#endif } -#if NET_2_0 [Test] public void Repeater_DefaultsSelectArguments () { @@ -269,7 +266,6 @@ namespace MonoTests.System.Web.UI.WebControls LoadViewState (o); } -#if NET_2_0 public DataSourceSelectArguments GetSelectArguments () { return SelectArguments; @@ -280,7 +276,6 @@ namespace MonoTests.System.Web.UI.WebControls DataSourceSelectArguments arg = new DataSourceSelectArguments ("SortExp"); return arg; } -#endif } #endregion @@ -297,6 +292,5 @@ namespace MonoTests.System.Web.UI.WebControls { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCas.cs index 15f78bafd13..8727976be40 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -68,4 +67,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionCas.cs index 02bce3cf5d5..257aa4da1ca 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -67,4 +66,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionTest.cs index 22854825d3e..e324e4fd00a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupCollectionTest.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.IO; @@ -219,4 +218,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupTest.cs index 30b29535fa2..d2e8cd40842 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/RoleGroupTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -147,4 +146,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs index f79222deb05..dffce79bc29 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SessionParameterTest.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.IO; @@ -171,4 +170,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapDataSourceTest.cs index 2b223582974..0ffdae96260 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapDataSourceTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapDataSourceTest.cs @@ -27,7 +27,6 @@ // -#if NET_2_0 using NUnit.Framework; using System; @@ -298,4 +297,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapPathTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapPathTest.cs index 324a09e829f..b4e524aea1a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapPathTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SiteMapPathTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using NUnit.Framework; using System; @@ -625,4 +624,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs index b7da7e3bfb0..38f79ba2d1f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -990,4 +989,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs index fa2642cff88..9d8d7ae6ca5 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/SqlDataSourceViewTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -1087,4 +1086,3 @@ namespace MonoTests.System.Web.UI.WebControls } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleCas.cs index 464bc031a82..deeb459177a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleCas.cs @@ -60,9 +60,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.Empty (); unit.FontInfo_Empty (); unit.Render (); -#if NET_2_0 unit.Style_CssClass (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleTest.cs index 86eccc4541a..00573c721e9 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/StyleTest.cs @@ -66,7 +66,6 @@ namespace MonoTests.System.Web.UI.WebControls public bool IsTracking { get { return base.IsTrackingViewState; } } -#if NET_2_0 public void SetCssClass(string name) { Type style = typeof (Style); if (style != null) { @@ -86,7 +85,6 @@ namespace MonoTests.System.Web.UI.WebControls base.FillStyleAttributes (attributes, urlResolver); attributes.Add ("FillStyleAttributes", "FillStyleAttributes"); } -#endif public string[] KeyValuePairs() { IEnumerator e; @@ -399,7 +397,6 @@ namespace MonoTests.System.Web.UI.WebControls s.BorderStyle = (BorderStyle)(BorderStyle.Outset + 1); } -#if NET_2_0 [Test] public void Style_RegisteredCssClass () { @@ -550,7 +547,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (null, css ["border-style"], "GetStyleAttributes#22"); Assert.AreEqual ("0px", css ["border-width"], "GetStyleAttributes#23"); } -#endif [Test] public void StyleFonts () { @@ -766,7 +762,6 @@ namespace MonoTests.System.Web.UI.WebControls s.AddAttributesToRender(writer); // Figure out an order-independent way to verify rendered results } -#if NET_2_0 class PokerStyle : Style { public IUrlResolutionService UrlResolver; @@ -796,6 +791,5 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (c, ((PokerStyle) c.ControlStyle).UrlResolver); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellCas.cs index f633c7a8f31..0565bb46543 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellCas.cs @@ -59,9 +59,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.HasControls_Text (); unit.Text_Add_Controls (); unit.NoDefaultID (); -#if NET_2_0 unit.AssociatedHeaderCellID (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellTest.cs index e104f722b90..280440052e1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableCellTest.cs @@ -81,9 +81,7 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (String.Empty, td.Text, "Text"); Assert.AreEqual (VerticalAlign.NotSet, td.VerticalAlign, "VerticalAlign"); Assert.IsTrue (td.Wrap, "Wrap"); -#if NET_2_0 Assert.AreEqual (0, td.AssociatedHeaderCellID.Length, "AssociatedHeaderCellID"); -#endif Assert.AreEqual ("td", td.Tag, "TagName"); Assert.AreEqual (0, td.Attributes.Count, "Attributes.Count-2"); Assert.AreEqual (0, td.StateBag.Count, "ViewState.Count-2"); @@ -105,17 +103,12 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (VerticalAlign.NotSet, td.VerticalAlign, "VerticalAlign"); td.Wrap = true; Assert.IsTrue (td.Wrap, "Wrap"); -#if NET_2_0 td.AssociatedHeaderCellID = new string[0]; Assert.AreEqual (0, td.AssociatedHeaderCellID.Length, "AssociatedHeaderCellID"); Assert.AreEqual (6, td.StateBag.Count, "ViewState.Count-1"); -#else - Assert.AreEqual (5, td.StateBag.Count, "ViewState.Count-1"); -#endif Assert.AreEqual (0, td.Attributes.Count, "Attributes.Count"); // note: nothing is removed (no need for CleanProperties test) } -#if NET_2_0 [Test] public void AssociatedHeaderCellID () { @@ -130,7 +123,6 @@ namespace MonoTests.System.Web.UI.WebControls { td.AssociatedHeaderCellID = null; Assert.AreEqual (0, td.AssociatedHeaderCellID.Length, "2"); } -#endif [Test] // LAMESPEC: undocumented exception but similar to integer properties of Table [ExpectedException (typeof (ArgumentOutOfRangeException))] @@ -199,16 +191,12 @@ namespace MonoTests.System.Web.UI.WebControls { td.Wrap = false; s = td.Render (); -#if NET_2_0 Assert.AreEqual ("<td style=\"white-space:nowrap;\"></td>", s, "Wrap"); // it seems that rendering with AssociatedHeaderCellID property set // isn't (at least easyly) possible even if we build a whole table // with a page... it keeps throwing NullReferenceException. Even in a // web page using that property makes it easy to throw exceptions :( -#else - Assert.AreEqual ("<td nowrap=\"nowrap\"></td>", s, "Wrap"); -#endif td.Wrap = true; } @@ -242,11 +230,7 @@ namespace MonoTests.System.Web.UI.WebControls { // this replace the current Text property td.Add (new LiteralControl ("Go Mono")); Assert.IsFalse (td.HasControls (), "!HasControls-2"); -#if NET_2_0 Assert.AreEqual ("MonoGo Mono", td.Text, "Text-2"); -#else - Assert.AreEqual ("Go Mono", td.Text, "Text-2"); -#endif } [Test] @@ -287,11 +271,7 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual ("Mono", td.Text, "Text"); td.Add (new LiteralControl ("Mono2")); Assert.IsFalse (td.HasControls (), "HasControls-2"); -#if NET_2_0 Assert.AreEqual ("MonoMono2", td.Text, "Text"); -#else - Assert.AreEqual ("Mono2", td.Text, "Text"); -#endif Assert.AreEqual (0, td.Controls.Count, "NControls"); } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowCas.cs index 10b8857c770..d89a2e6089d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -57,4 +56,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowTest.cs index fff6cbbc3e4..4b30d847012 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableFooterRowTest.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.Drawing; @@ -83,4 +82,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderCellTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderCellTest.cs index 9cde0582fa0..2ab12cda485 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderCellTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderCellTest.cs @@ -64,11 +64,9 @@ namespace MonoTests.System.Web.UI.WebControls { TestTableHeaderCell th = new TestTableHeaderCell (); Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count"); Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count"); -#if NET_2_0 Assert.AreEqual (String.Empty, th.AbbreviatedText, "AbbreviatedText"); Assert.AreEqual (0, th.CategoryText.Length, "CategoryText"); Assert.AreEqual (TableHeaderScope.NotSet, th.Scope, "Scope"); -#endif Assert.AreEqual ("th", th.Tag, "TagName"); Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count-2"); Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count-2"); @@ -78,7 +76,6 @@ namespace MonoTests.System.Web.UI.WebControls { public void NullProperties () { TestTableHeaderCell th = new TestTableHeaderCell (); -#if NET_2_0 th.AbbreviatedText = null; Assert.AreEqual (String.Empty, th.AbbreviatedText, "AbbreviatedText"); @@ -89,9 +86,6 @@ namespace MonoTests.System.Web.UI.WebControls { th.Scope = TableHeaderScope.NotSet; Assert.AreEqual (TableHeaderScope.NotSet, th.Scope, "Scope"); Assert.AreEqual (2, th.StateBag.Count, "ViewState.Count-2"); -#else - Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count-1"); -#endif Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count"); } @@ -99,7 +93,6 @@ namespace MonoTests.System.Web.UI.WebControls { public void CleanProperties () { TestTableHeaderCell th = new TestTableHeaderCell (); -#if NET_2_0 th.AbbreviatedText = "header"; Assert.AreEqual ("header", th.AbbreviatedText, "AbbreviatedText"); th.AbbreviatedText = null; @@ -117,9 +110,6 @@ namespace MonoTests.System.Web.UI.WebControls { th.Scope = TableHeaderScope.NotSet; Assert.AreEqual (TableHeaderScope.NotSet, th.Scope, "-Scope"); Assert.AreEqual (2, th.StateBag.Count, "ViewState.Count-2"); -#else - Assert.AreEqual (0, th.StateBag.Count, "ViewState.Count-1"); -#endif Assert.AreEqual (0, th.Attributes.Count, "Attributes.Count"); } @@ -134,7 +124,6 @@ namespace MonoTests.System.Web.UI.WebControls { TestTableHeaderCell th = new TestTableHeaderCell (); string s = th.Render (); Assert.AreEqual (AdjustLineEndings ("<th></th>"), s, "empty/default"); -#if NET_2_0 th.AbbreviatedText = "header"; s = th.Render (); Assert.AreEqual (AdjustLineEndings ("<th abbr=\"header\"></th>"), s, "AbbreviatedText"); @@ -162,7 +151,6 @@ namespace MonoTests.System.Web.UI.WebControls { th.Scope = TableHeaderScope.NotSet; s = th.Render (); Assert.AreEqual (AdjustLineEndings ("<th></th>"), s, "NotSet"); -#endif th.Text = "test"; s = th.Render (); Assert.AreEqual (AdjustLineEndings ("<th>test</th>"), s, "Text"); diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowCas.cs index c7b2707bd65..78432fa2628 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -57,4 +56,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowTest.cs index 54fabc13b2a..e71b8e4f382 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableHeaderRowTest.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.Drawing; @@ -83,4 +82,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs index bad00c96544..9c4a7eaa0ac 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableRowTest.cs @@ -54,9 +54,7 @@ namespace MonoTests.System.Web.UI.WebControls { Style ControlStyle { get; } HorizontalAlign HorizontalAlign { get; set; } VerticalAlign VerticalAlign { get; set; } -#if NET_2_0 TableRowSection TableSection { get; set; } -#endif } public class TestTableRow : TableRow, ITableRowTest { @@ -114,9 +112,7 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (0, tr.Cells.Count, "Cells.Count"); Assert.AreEqual (HorizontalAlign.NotSet, tr.HorizontalAlign, "HorizontalAlign"); Assert.AreEqual (VerticalAlign.NotSet, tr.VerticalAlign, "VerticalAlign"); -#if NET_2_0 Assert.AreEqual (TableRowSection.TableBody, tr.TableSection, "TableSection"); -#endif Assert.AreEqual ("tr", tr.Tag, "TagName"); Assert.AreEqual (0, tr.Attributes.Count, "Attributes.Count-2"); Assert.AreEqual (0, tr.StateBag.Count, "ViewState.Count-2"); @@ -130,13 +126,9 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (HorizontalAlign.NotSet, tr.HorizontalAlign, "HorizontalAlign"); tr.VerticalAlign = VerticalAlign.NotSet; Assert.AreEqual (VerticalAlign.NotSet, tr.VerticalAlign, "VerticalAlign"); -#if NET_2_0 tr.TableSection = TableRowSection.TableBody; Assert.AreEqual (TableRowSection.TableBody, tr.TableSection, "TableSection"); Assert.AreEqual (3, tr.StateBag.Count, "ViewState.Count-1"); -#else - Assert.AreEqual (2, tr.StateBag.Count, "ViewState.Count-1"); -#endif Assert.AreEqual (0, tr.Attributes.Count, "Attributes.Count"); } @@ -155,7 +147,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual (HorizontalAlign.NotSet, tr.HorizontalAlign, "HorizontalAlign"); tr.VerticalAlign = VerticalAlign.NotSet; Assert.AreEqual (VerticalAlign.NotSet, tr.VerticalAlign, "VerticalAlign"); -#if NET_2_0 tr.TableSection = TableRowSection.TableFooter; Assert.AreEqual (TableRowSection.TableFooter, tr.TableSection, "TableFooter"); tr.TableSection = TableRowSection.TableHeader; @@ -163,9 +154,6 @@ namespace MonoTests.System.Web.UI.WebControls { tr.TableSection = TableRowSection.TableBody; Assert.AreEqual (TableRowSection.TableBody, tr.TableSection, "TableBody"); Assert.AreEqual (3, tr.StateBag.Count, "ViewState.Count-1"); -#else - Assert.AreEqual (2, tr.StateBag.Count, "ViewState.Count-1"); -#endif Assert.AreEqual (0, tr.Attributes.Count, "Attributes.Count"); } @@ -186,7 +174,6 @@ namespace MonoTests.System.Web.UI.WebControls { TableRow tr = GetNewTableRow (); tr.VerticalAlign = (VerticalAlign)Int32.MinValue; } -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentOutOfRangeException))] public void TableSection_Invalid () @@ -194,7 +181,6 @@ namespace MonoTests.System.Web.UI.WebControls { TableRow tr = GetNewTableRow (); tr.TableSection = (TableRowSection)Int32.MinValue; } -#endif [Test] public void Render () { @@ -227,7 +213,6 @@ namespace MonoTests.System.Web.UI.WebControls { s = tr.Render (); Assert.IsTrue ((s.ToLower ().IndexOf (" valign=\"bottom\"") > 0), "VerticalAlign.Bottom"); tr.VerticalAlign = VerticalAlign.NotSet; -#if NET_2_0 // TableSection has no influence over the "row" rendering tr.TableSection = TableRowSection.TableFooter; s = tr.Render (); @@ -238,7 +223,6 @@ namespace MonoTests.System.Web.UI.WebControls { tr.TableSection = TableRowSection.TableBody; s = tr.Render (); Assert.AreEqual ("<tr>\n\n</tr>", s, "TableRowSection.TableBody"); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleCas.cs index 427578ff47d..f1fc60ef8e1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -69,4 +68,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleTest.cs index 199d427acb1..80e5635c82a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableSectionStyleTest.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.IO; @@ -191,4 +190,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleCas.cs index a0f3d1c1af9..a14cf682731 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleCas.cs @@ -63,14 +63,12 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.MergeWith_Empty (); unit.MergeWith (); unit.GridLines_VS (); -#if NET_2_0 unit.FillStyleAttributes_Null_Resolver (); unit.FillStyleAttributes_Css_Null (); unit.FillStyleAttributes_Empty (); unit.FillStyleAttributes_NotCss (); unit.FillStyleAttributes_Css_WithoutResolution (); unit.FillStyleAttributes_Css_WithResolution (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleTest.cs index 60e741c9a5d..ba5d6475bb4 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableStyleTest.cs @@ -86,7 +86,6 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#if NET_2_0 public class TestResolutionService : IUrlResolutionService { public string ResolveClientUrl (string relativeUrl) @@ -94,7 +93,6 @@ namespace MonoTests.System.Web.UI.WebControls { return "http://www.mono-project.com"; } } -#endif [TestFixture] public class TableStyleTest { @@ -361,7 +359,6 @@ namespace MonoTests.System.Web.UI.WebControls { ts.LoadVS (o); Assert.AreEqual (GridLines.Both, ts.GridLines, "GL"); } -#if NET_2_0 private CssStyleCollection GetCssCollection () { return new AttributeCollection (new StateBag ()).CssStyle; @@ -431,7 +428,6 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual ("background-image:url(http://www.mono-project.com);", css.Value, "css.Value"); Assert.AreEqual ("http://www.go-mono.com", ts.BackImageUrl, "BackImageUrl"); } -#endif [Test] [Category ("NotWorking")] public void BackImageUrl () @@ -445,11 +441,7 @@ namespace MonoTests.System.Web.UI.WebControls { htw.RenderBeginTag ("tagName"); string res = htw.InnerWriter.ToString (); string expected = "<tagName style=\"background-image:url("; -#if NET_2_0 expected += "test%201.jpg"; -#else - expected += "test 1.jpg"; -#endif expected += ");\">\n"; Assert.AreEqual (expected, res); } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableTest.cs index d0e888f6eaf..46adf22e5ae 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TableTest.cs @@ -62,13 +62,11 @@ namespace MonoTests.System.Web.UI.WebControls { { return base.CreateControlStyle (); } -#if NET_2_0 protected override void RaisePostBackEvent (string argument) { WebTest.CurrentTest.UserData = "RaisePostBackEvent"; base.RaisePostBackEvent (argument); } -#endif } @@ -104,13 +102,10 @@ namespace MonoTests.System.Web.UI.WebControls { Assert.AreEqual ("table", t.Tag, "TagName"); Assert.AreEqual (0, t.Attributes.Count, "Attributes.Count-2"); Assert.AreEqual (0, t.StateBag.Count, "ViewState.Count-2"); -#if NET_2_0 Assert.AreEqual (String.Empty, t.Caption, "Caption"); Assert.AreEqual (TableCaptionAlign.NotSet, t.CaptionAlign, "CaptionAlign"); -#endif } -#if NET_2_0 [Test] public void Caption () { @@ -139,7 +134,6 @@ namespace MonoTests.System.Web.UI.WebControls { #endif HtmlDiff.AssertAreEqual (orig, html, "CaptionAlign"); } -#endif [Test] public void NullProperties () { @@ -416,7 +410,6 @@ namespace MonoTests.System.Web.UI.WebControls { t.BackImageUrl = String.Empty; } -#if NET_2_0 [Test] [Category ("NunitWeb")] public void RenderInAspxPage () @@ -438,7 +431,6 @@ namespace MonoTests.System.Web.UI.WebControls { p.Form.Controls.Add (t); p.Controls.Add (t); } -#endif [Test] public void CreateControlStyle () @@ -696,7 +688,6 @@ namespace MonoTests.System.Web.UI.WebControls { #endif } -#if NET_2_0 [Test] [Category("NunitWeb")] // Note: No event fired , only flow been checked. public void RaisePostBackEvent () @@ -725,6 +716,5 @@ namespace MonoTests.System.Web.UI.WebControls { { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TemplateFieldTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TemplateFieldTest.cs index fc291b85121..9e6a842d398 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TemplateFieldTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TemplateFieldTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using System; @@ -319,4 +318,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TestControlIDConverter.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TestControlIDConverter.cs index f674e12f225..8427d88edc0 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TestControlIDConverter.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TestControlIDConverter.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -81,5 +80,4 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxCas.cs index 7c69e56a4fd..049427fb90b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxCas.cs @@ -47,11 +47,9 @@ namespace MonoCasTests.System.Web.UI.WebControls { { TextBoxTest unit = new TextBoxTest (); unit.MultilineRenderEscape (); -#if NET_2_0 unit.ValidationProperties (); unit.ViewState (); unit.ValidationRender (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxTest.cs index 2287470b7d1..a50d339cfaf 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TextBoxTest.cs @@ -88,19 +88,15 @@ namespace MonoTests.System.Web.UI.WebControls { public void Defaults () { Poker p = new Poker (); -#if NET_2_0 Assert.AreEqual (string.Empty, p.ValidationGroup, "ValidationGroup"); Assert.AreEqual (false, p.CausesValidation, "CausesValidation"); -#endif } [Test] public void Defaults_NotWorking () { Poker p = new Poker (); -#if NET_2_0 Assert.AreEqual (AutoCompleteType.None, p.AutoCompleteType, "AutoCompleteType"); -#endif } [Test] @@ -119,7 +115,6 @@ namespace MonoTests.System.Web.UI.WebControls { } -#if NET_2_0 [Test] public void ValidationProperties () { @@ -397,7 +392,6 @@ namespace MonoTests.System.Web.UI.WebControls { { WebTest.Unload (); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ThemeTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ThemeTest.cs index c91f9ea7beb..728ab29583a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ThemeTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ThemeTest.cs @@ -30,7 +30,6 @@ // PageWithStyleSheet.aspx; PageWithStyleSheet.aspx.cs;RunTimeSetTheme.aspx; // RunTimeSetTheme.aspx.cs; PageWithTheme.aspx; PageWithTheme.aspx.cs; Theme1.skin -#if NET_2_0 using System; using System.Drawing; @@ -284,4 +283,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingCollectionTest.cs index 25e6c78a38d..44aa2be89a9 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -156,4 +155,3 @@ namespace MonoTests.System.Web.UI.WebControls { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingTest.cs index f91bd3c4eac..09662b54789 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeBindingTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -136,4 +135,3 @@ namespace MonoTests.System.Web.UI.WebControls { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeCollectionTest.cs index b2c56db9b51..cd521684558 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -391,4 +390,3 @@ namespace MonoTests.System.Web.UI.WebControls { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleCollectionTest.cs index 046b7e46ca0..4cad70de3ff 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -181,4 +180,3 @@ namespace MonoTests.System.Web.UI.WebControls { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleTest.cs index 35dd3e00856..cd860253d7b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeStyleTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -187,4 +186,3 @@ namespace MonoTests.System.Web.UI.WebControls { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeTest.cs index 4e3bec0e7a0..2cf00c0f6f0 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeNodeTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -296,5 +295,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } - -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewCas.cs index afa146d6b05..e7c43883862 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -59,4 +58,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewTest.cs index e259813dc90..c67c20264c7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/TreeViewTest.cs @@ -30,7 +30,6 @@ // // -#if NET_2_0 using System; using System.IO; using System.Globalization; @@ -2380,4 +2379,3 @@ namespace MonoTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitCas.cs index 063f7888005..34de9186eb9 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitCas.cs @@ -40,11 +40,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { [TestFixture] [Category ("CAS")] -#if NET_2_0 public class UnitCas : AspNetHostingNone { -#else - public class UnitCas: AspNetHostingMinimal { -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Deny_Unrestricted () @@ -54,9 +50,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.ParseCultures (); unit.UnitEquality (); unit.UnitImplicit (); -#if NET_2_0 unit.Unit_IFormatProviderToString (); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs index e1f8efec9a7..04ff3f8dda7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/UnitTest.cs @@ -336,7 +336,6 @@ namespace MonoTests.System.Web.UI.WebControls Unit a = new Unit ("34. 4pt"); } -#if NET_2_0 class MyFormatProvider : IFormatProvider { public object GetFormat (Type format_type) @@ -447,7 +446,6 @@ namespace MonoTests.System.Web.UI.WebControls a1 = new Unit (1.5); Assert.AreEqual ("1px", a1.ToString (mfp), "A26"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidatedControlConverterTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidatedControlConverterTest.cs index 3de95ea2e4f..329bccaa62a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidatedControlConverterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidatedControlConverterTest.cs @@ -129,22 +129,7 @@ namespace MonoTests.System.Web.UI.WebControls conv = new ValidatedControlConverter(); values = conv.GetStandardValues(context); -#if NET_2_0 Assert.IsNull (values, "B1"); -#else - Assert.AreEqual(3, values.Count, "B1"); - - result = new string[values.Count]; - i = 0; - foreach (string s in values) { - result[i++] = s; - } - - Assert.AreEqual(new string[] { "blahid", "ddlid", "fooid"}, result, "B2"); // Alphabetical? - Assert.AreEqual(false, conv.GetStandardValuesExclusive(null), "B3"); - Assert.AreEqual(true, conv.GetStandardValuesSupported(null), "B4"); - Assert.AreEqual(null, conv.GetStandardValues(null), "B5"); -#endif } } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryCas.cs index 7564dce5c88..61cfd2ab9c3 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryCas.cs @@ -49,9 +49,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { { ValidationSummaryTest unit = new ValidationSummaryTest (); unit.ValidationSummary_Defaults (); -#if NET_2_0 unit.ValidationSummary_ValidationGroup (); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryTest.cs index 3a3b5f1925e..7c5e7530fa2 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ValidationSummaryTest.cs @@ -180,7 +180,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual (true, v.ShowSummary, "D5"); } -#if NET_2_0 [Test] public void ValidationSummary_ValidationGroup () { ValidationSummaryTestClass v = new ValidationSummaryTestClass (); @@ -199,7 +198,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual ("group", v2.ValidationGroup, "VG3"); } -#endif [Test] public void ValidationSummaryRenderTest () { @@ -255,18 +253,10 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual("<div style=\"color:Red;\">\n\tI am the header text<ul><li>aw shucks</li><li>WhamBamThankYouMam</li></ul>\n</div>", v.Render(), "R3"); v.DisplayMode = ValidationSummaryDisplayMode.List; -#if NET_2_0 Assert.AreEqual("<div style=\"color:Red;\">\n\tI am the header text<br />aw shucks<br />WhamBamThankYouMam<br />\n</div>", v.Render(), "R4"); -#else - Assert.AreEqual("<div style=\"color:Red;\">\n\tI am the header text<br>aw shucks<br>WhamBamThankYouMam<br>\n</div>", v.Render(), "R4"); -#endif v.DisplayMode = ValidationSummaryDisplayMode.SingleParagraph; -#if NET_2_0 Assert.AreEqual("<div style=\"color:Red;\">\n\tI am the header text aw shucks WhamBamThankYouMam <br />\n</div>", v.Render(), "R5"); -#else - Assert.AreEqual("<div style=\"color:Red;\">\n\tI am the header text aw shucks WhamBamThankYouMam <br>\n</div>", v.Render(), "R5"); -#endif v.ShowSummary = false; v.DisplayMode = ValidationSummaryDisplayMode.BulletList; @@ -276,11 +266,7 @@ namespace MonoTests.System.Web.UI.WebControls v.EnableClientScript = true; v.ShowMessageBox = true; v.DisplayMode = ValidationSummaryDisplayMode.SingleParagraph; -#if NET_2_0 Assert.AreEqual("<div style=\"color:Red;\">\n\tI am the header text aw shucks WhamBamThankYouMam <br />\n</div>", v.Render(), "R7"); -#else - Assert.AreEqual("<div style=\"color:Red;\">\n\tI am the header text aw shucks WhamBamThankYouMam <br>\n</div>", v.Render(), "R7"); -#endif StopValidationTest(); } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ViewTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ViewTest.cs index 7833338b496..df7f84bc443 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/ViewTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/ViewTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -263,5 +262,4 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs index 1c837896baf..7d80dd3cc70 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WebControlTest.cs @@ -39,10 +39,8 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using MonoTests.stand_alone.WebHarness; -#if NET_2_0 using System.Web.UI.Adapters; using System.Web.UI.WebControls.Adapters; -#endif namespace MonoTests.System.Web.UI.WebControls { @@ -612,11 +610,7 @@ namespace MonoTests.System.Web.UI.WebControls wc.BorderWidth = Unit.Pixel (1); wc.RenderBeginTag (writer); string s = writer.InnerWriter.ToString (); -#if NET_2_0 Assert.AreEqual ("<span style=\"display:inline-block;border-width:1px;border-style:solid;\">", s, "BorderWidth"); -#else - Assert.AreEqual ("<span style=\"border-width:1px;border-style:solid;\">", s, "BorderWidth"); -#endif } [Test] @@ -685,7 +679,6 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual ("hi", c.Attributes ["hoLA"], "#01"); } -#if NET_2_0 class MyControlAdapter : ControlAdapter { protected internal override void Render (HtmlTextWriter w) @@ -769,6 +762,5 @@ namespace MonoTests.System.Web.UI.WebControls child.Enabled = false; Assert.IsFalse (child.GetIsEnabled, "IsEnabled #3"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs index c1dfec54813..ceb2dad584d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepBaseTest.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.Web; @@ -389,4 +388,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepCollectionTest.cs index 620c1d6612e..8aff1295c7f 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepCollectionTest.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.Web; @@ -238,4 +237,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepTest.cs index 58f0938e96a..1a06b43f27e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardStepTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using System; using NUnit.Framework; @@ -44,4 +43,3 @@ namespace MonoTests.System.Web.UI.WebControls // are inherited from base and tested on base classes. } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardTest.cs index ffbe083b6a7..45b3d356a67 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/WizardTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -#if NET_2_0 using System; @@ -2172,4 +2171,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlCas.cs index 816c3509d0c..d64a14ca0cd 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlCas.cs @@ -85,11 +85,7 @@ namespace MonoCasTests.System.Web.UI.WebControls { unit.Xml_SourcePrecedence (); } catch (TypeInitializationException) { -#if NET_2_0 throw; -#else - Assert.Ignore ("exception when initializing HttpRuntime"); -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceCas.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceCas.cs index effa768b213..df8af2eb53a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -62,4 +61,3 @@ namespace MonoCasTests.System.Web.UI.WebControls { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs index 3a9400f64b3..d5dfbac4580 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlDataSourceTest.cs @@ -30,7 +30,6 @@ // NOTE: INCLUDE 2 CATEGORIES [Category ("NunitWeb")];[Category ("NotWorking")] -#if NET_2_0 using System; @@ -484,4 +483,3 @@ namespace MonoTests.System.Web.UI.WebControls } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlTest.cs b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlTest.cs index ec015f32d3a..17390f615df 100644 --- a/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI.WebControls/XmlTest.cs @@ -149,11 +149,9 @@ namespace MonoTests.System.Web.UI.WebControls Assert.AreEqual ("", xml.TransformSource, "V8"); Assert.AreEqual (null, xml.Transform, "V9"); -#if NET_2_0 Assert.AreEqual (false, xml.EnableTheming, "EnableTheming"); Assert.AreEqual (String.Empty, xml.SkinID, "SkinID"); Assert.AreEqual (null, xml.XPathNavigator, "XPathNavigator"); -#endif } // Tests that invalid documents can be set before rendering. @@ -162,17 +160,9 @@ namespace MonoTests.System.Web.UI.WebControls { Xml xml = new Xml (); xml.DocumentContent = "Hey"; -#if NET_2_0 Assert.AreEqual ("Hey", xml.DocumentContent); -#else - Assert.AreEqual ("", xml.DocumentContent); -#endif xml.DocumentContent = "<hey></hey>"; -#if NET_2_0 Assert.AreEqual ("<hey></hey>", xml.DocumentContent); -#else - Assert.AreEqual ("", xml.DocumentContent); -#endif xml.TransformSource = "test.xsl"; Assert.AreEqual (null, xml.Transform, "ID"); @@ -222,7 +212,6 @@ namespace MonoTests.System.Web.UI.WebControls sw.ToString (), "SP1"); } -#if NET_2_0 [Test] public void Xml_SourcePrecedence_2 () { @@ -246,7 +235,6 @@ namespace MonoTests.System.Web.UI.WebControls sw.ToString (), "Xml_SourcePrecedence_2"); } -#endif [Test] public void Xml_DefaultTrasnform () { @@ -279,7 +267,6 @@ namespace MonoTests.System.Web.UI.WebControls xml.DoAdd (new LiteralControl ("<test></test>")); } -#if NET_2_0 class CustomXPathNavigator : XPathNavigator { public override string BaseURI @@ -438,7 +425,6 @@ namespace MonoTests.System.Web.UI.WebControls Xml xml = new Xml (); xml.SkinID = "Fake"; } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs index 9ab358615f1..b157b751ef5 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/AttributeCollectionTest.cs @@ -251,7 +251,6 @@ namespace MonoTests.System.Web.UI { Assert.AreEqual (0, ac.CssStyle.Count, "AttributeCollection.Count"); } -#if NET_2_0 [Test] public void Count4 () { @@ -266,7 +265,6 @@ namespace MonoTests.System.Web.UI { Assert.AreEqual (0, ac.Count, "AttributeCollection.Count"); Assert.AreEqual (0, ac.CssStyle.Count, "AttributeCollection.Count"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI/ChtmlTextWriterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/ChtmlTextWriterTest.cs index 3d6802efed5..97b4824cbd4 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ChtmlTextWriterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ChtmlTextWriterTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -190,4 +189,3 @@ namespace MonoTests.System.Web.UI { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/ClientScriptManagerTest.cs b/mcs/class/System.Web/Test/System.Web.UI/ClientScriptManagerTest.cs index 8204278b0e9..3e301705a42 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ClientScriptManagerTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ClientScriptManagerTest.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.Web; @@ -559,7 +558,6 @@ namespace MonoTests.System.Web.UI } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/ControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI/ControlCas.cs index e7c01273358..457fa69612e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ControlCas.cs @@ -72,7 +72,6 @@ namespace MonoCasTests.System.Web.UI { Assert.IsNull (c.Site, "Site"); Assert.AreEqual ("mono", c.UniqueID, "UniqueID"); Assert.IsTrue (c.Visible, "Visible"); -#if NET_2_0 c.AppRelativeTemplateSourceDirectory = String.Empty; Assert.AreEqual (String.Empty, c.AppRelativeTemplateSourceDirectory, "AppRelativeTemplateSourceDirectory"); c.EnableTheming = true; @@ -82,7 +81,6 @@ namespace MonoCasTests.System.Web.UI { c.TemplateControl = null; Assert.IsNull (c.TemplateControl, "TemplateControl"); Assert.AreEqual (String.Empty, c.TemplateSourceDirectory, "TemplateSourceDirectory"); -#endif } private void SetRenderMethodDelegate (HtmlTextWriter writer, Control control) @@ -102,14 +100,11 @@ namespace MonoCasTests.System.Web.UI { c.RenderControl (writer); Assert.IsNotNull (c.ResolveUrl (String.Empty), "ResolveUrl"); c.SetRenderMethodDelegate (new RenderMethod (SetRenderMethodDelegate)); -#if NET_2_0 c.ApplyStyleSheetSkin (page); Assert.IsNotNull (c.ResolveClientUrl (String.Empty), "ResolveClientUrl"); -#endif c.Dispose (); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] [ExpectedException (typeof (InvalidOperationException))] @@ -120,7 +115,6 @@ namespace MonoCasTests.System.Web.UI { c.Focus (); // normal, no forms on page } -#endif private void Handler (object sender, EventArgs e) { diff --git a/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs index f08db8bc34d..5b1f33ff1ee 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ControlTest.cs @@ -42,9 +42,7 @@ using MonoTests.SystemWeb.Framework; using MonoTests.stand_alone.WebHarness; using MonoTests.Common; -#if NET_2_0 using System.Web.UI.Adapters; -#endif #if NET_4_0 using System.Web.Routing; @@ -232,7 +230,6 @@ namespace MonoTests.System.Web.UI string uid1_3 = c1.UniqueID; Assert.IsFalse (uid1_3 == uid1_2, "id was not reset"); -#if NET_2_0 EnsureIDControl c3 = new EnsureIDControl (); nc.Controls.Add (c3); string uid3_1 = c3.UniqueID; @@ -243,7 +240,6 @@ namespace MonoTests.System.Web.UI string uid3_2 = c3.UniqueID; Assert.IsNull (c3.ID); Assert.IsFalse (uid3_1 == uid3_2, "id was not reset"); -#endif } [Test] @@ -258,11 +254,7 @@ namespace MonoTests.System.Web.UI nc3.Controls.Add (nc2); nc2.Controls.Add (nc); nc.Controls.Add (control); -#if NET_2_0 string expected = "ctl00_ctl00_ctl00"; -#else - string expected = "_ctl0__ctl0__ctl0"; -#endif Assert.AreEqual (expected, control.ClientID, "ClientID"); } @@ -292,7 +284,6 @@ namespace MonoTests.System.Web.UI Assert.AreEqual (-1, html.IndexOf ("<span>label</span><span>label</span>"), "#A1"); } -#if NET_2_0 [Test] [Category("NunitWeb")] public void AppRelativeTemplateSourceDirectory () @@ -916,7 +907,6 @@ namespace MonoTests.System.Web.UI Assert.AreEqual (false, ctrl.EnableTheming, "EnableTheming#2"); } -#endif [Test] public void BindingContainer () { @@ -943,7 +933,6 @@ namespace MonoTests.System.Web.UI Assert.IsTrue (Object.ReferenceEquals (child2.NamingContainer, nc), "NamingContainer #2"); Assert.IsTrue (Object.ReferenceEquals (child2.BindingContainer, nc), "BindingContainer #2"); -#if NET_2_0 // DetailsViewPagerRow marked to be not BindingContainer DetailsViewPagerRow row = new DetailsViewPagerRow (0, DataControlRowType.Pager, DataControlRowState.Normal); TableCell cell = new TableCell (); @@ -954,16 +943,13 @@ namespace MonoTests.System.Web.UI Assert.IsTrue (Object.ReferenceEquals (child3.NamingContainer, row), "NamingContainer #3"); Assert.IsTrue (Object.ReferenceEquals (child3.BindingContainer, control), "BindingContainer #3"); -#endif } -#if NET_2_0 [Test] public void Control_Adapter () { MyNC ctr = new MyNC (); Assert.AreEqual (null, ctr.Adapter (), "Adapter"); } -#endif [Test] public void ChildControlsCreated () { ChildControlsCreatedControl ctr = new ChildControlsCreatedControl (); @@ -975,7 +961,6 @@ namespace MonoTests.System.Web.UI Assert.AreEqual (1, ctr.Controls.Count, "ChildControlsCreated#2"); } -#if NET_2_0 [Test (Description="Bug #594238")] public void OverridenControlsPropertyAndPostBack_Bug594238 () { @@ -1013,7 +998,6 @@ namespace MonoTests.System.Web.UI WebTest.CopyResource (GetType (), "OverridenControlsPropertyAndPostBack_Bug594238.aspx", "OverridenControlsPropertyAndPostBack_Bug594238.aspx"); } -#endif #if NET_4_0 [Test] public void GetRouteUrl_Object () @@ -1134,7 +1118,6 @@ namespace MonoTests.System.Web.UI } #endif #region helpcalsses -#if NET_2_0 class ControlWithState : Control { string _state; @@ -1187,10 +1170,8 @@ namespace MonoTests.System.Web.UI } } -#endif class MyNC : Control, INamingContainer { - #if NET_2_0 public ControlAdapter Adapter () { return base.Adapter; @@ -1215,7 +1196,6 @@ namespace MonoTests.System.Web.UI { return base.HasEvents (); } - #endif } class DerivedControl : Control @@ -1232,7 +1212,6 @@ namespace MonoTests.System.Web.UI get { return coll; } } -#if NET_2_0 public bool DoIsViewStateEnabled { get { return IsViewStateEnabled; } @@ -1257,7 +1236,6 @@ namespace MonoTests.System.Web.UI { return base.ResolveAdapter (); } -#endif } class NamingContainer : Control, INamingContainer @@ -1293,7 +1271,6 @@ namespace MonoTests.System.Web.UI #endregion } -#if NET_2_0 public class Customadaptercontrol : Control { public new ControlAdapter Adapter { @@ -1315,7 +1292,6 @@ namespace MonoTests.System.Web.UI EnsureID (); } } -#endif public class ChildControlsCreatedControl : Control { diff --git a/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionCas.cs b/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionCas.cs index aa0fb001a00..f761f11ea69 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionCas.cs @@ -63,14 +63,12 @@ namespace MonoCasTests.System.Web.UI { css.Add ("monkey", "mono"); css.Remove ("monkey"); css.Clear (); -#if NET_2_0 css[HtmlTextWriterStyle.Top] = "1"; Assert.AreEqual ("1", css[HtmlTextWriterStyle.Top], "this[HtmlTextWriterStyle]"); Assert.IsNotNull (css.Value, "Value"); css.Value = String.Empty; css.Add (HtmlTextWriterStyle.Left, "1"); css.Remove (HtmlTextWriterStyle.Left); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionTest.cs index 9eedaa8ebbd..3e2f1a622af 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/CssStyleCollectionTest.cs @@ -46,7 +46,6 @@ namespace MonoTests.System.Web.UI public class CssStyleCollectionTest { -#if NET_2_0 [Test] public void CssStyleCollection_BackgroundImage () { WebControl c = new WebControl (HtmlTextWriterTag.A); @@ -60,7 +59,6 @@ namespace MonoTests.System.Web.UI Assert.AreEqual ("background-image:url(" + url_encoded + ");", css.Value, "CssStyleCollection_BackgroundImage#3"); Assert.AreEqual ("background-image:url(" + url_encoded + ");", c.Attributes["style"], "CssStyleCollection_BackgroundImage#4"); } -#endif [Test] public void CssStyleCollection_BackgroundImage2 () { @@ -72,9 +70,7 @@ namespace MonoTests.System.Web.UI css.Add ("background-image", url); Assert.AreEqual (url, css ["background-image"], "CssStyleCollection_BackgroundImage#1"); -#if NET_2_0 Assert.AreEqual ("background-image:url(" + url_encoded + ");", css.Value, "CssStyleCollection_BackgroundImage#3"); -#endif Assert.AreEqual ("background-image:url(" + url_encoded + ");", c.Attributes ["style"], "CssStyleCollection_BackgroundImage#4"); } @@ -88,9 +84,7 @@ namespace MonoTests.System.Web.UI css.Add ("background-image", "url(" + url_encoded + ")"); Assert.AreEqual ("url(" + url_encoded + ")", css ["background-image"], "CssStyleCollection_BackgroundImage#1"); -#if NET_2_0 Assert.AreEqual ("background-image:url(" + url_encoded + ");", css.Value, "CssStyleCollection_BackgroundImage#3"); -#endif Assert.AreEqual ("background-image:url(" + url_encoded + ");", c.Attributes ["style"], "CssStyleCollection_BackgroundImage#4"); } @@ -104,9 +98,7 @@ namespace MonoTests.System.Web.UI c.Attributes ["style"] = "background-image:url(" + url_encoded + ");"; Assert.AreEqual ("url(" + url_encoded + ")", css ["background-image"], "CssStyleCollection_BackgroundImage#1"); -#if NET_2_0 Assert.AreEqual ("background-image:url(" + url_encoded + ");", css.Value, "CssStyleCollection_BackgroundImage#3"); -#endif Assert.AreEqual ("background-image:url(" + url_encoded + ");", c.Attributes ["style"], "CssStyleCollection_BackgroundImage#4"); } @@ -119,9 +111,7 @@ namespace MonoTests.System.Web.UI c.Attributes ["style"] = "padding: 0px; margin: 0px"; Assert.AreEqual (2, c.Style.Count, "Style Count"); -#if NET_2_0 Assert.AreEqual (3, c.ControlStyle.GetStyleAttributes (c).Count, "ControlStyle Count"); -#endif CssStyleCollection col = c.Style; NameValueCollection styles = new NameValueCollection (); @@ -176,21 +166,10 @@ namespace MonoTests.System.Web.UI public void CssStyleCollection_case_sensitive () { WebControl c = new WebControl (HtmlTextWriterTag.A); c.Style.Add ("color", "red"); -#if NET_2_0 Assert.AreEqual ("red", c.Style ["Color"], ""); -#else - Assert.AreEqual (null, c.Style ["Color"], ""); - Assert.AreEqual ("red", c.Style ["color"], ""); -#endif c.Style.Add ("Color", "Blue"); -#if NET_2_0 Assert.AreEqual ("Blue", c.Style ["color"], ""); Assert.AreEqual (1, c.Style.Count, "Style Count"); -#else - Assert.AreEqual ("red", c.Style ["color"], ""); - Assert.AreEqual ("Blue", c.Style ["Color"], ""); - Assert.AreEqual (2, c.Style.Count, "Style Count"); -#endif } } } diff --git a/mcs/class/System.Web/Test/System.Web.UI/DataBinderCas.cs b/mcs/class/System.Web/Test/System.Web.UI/DataBinderCas.cs index 0bb9cf391a3..93bd32864a7 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DataBinderCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DataBinderCas.cs @@ -81,7 +81,6 @@ namespace MonoCasTests.System.Web.UI { DataBinder.GetPropertyValue (null, "Data", "{0}"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void GetDataItem_Deny_Unrestricted () @@ -91,7 +90,6 @@ namespace MonoCasTests.System.Web.UI { Assert.IsNull (DataBinder.GetDataItem (null, out found), "GetDataItem(object,out bool)"); Assert.IsFalse (found, "found"); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionCas.cs b/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionCas.cs index 90ec6d91394..91d3be01d62 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionCas.cs @@ -71,18 +71,14 @@ namespace MonoCasTests.System.Web.UI { dbc.Add (db); dbc.Remove ("property"); dbc.Remove ("property", true); -#if NET_2_0 dbc.Changed += new EventHandler (Handler); Assert.IsFalse (dbc.Contains ("property"), "Contains"); dbc.Changed -= new EventHandler (Handler); -#endif } -#if NET_2_0 private void Handler (object sender, EventArgs e) { } -#endif // LinkDemand public override Type Type { diff --git a/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionTest.cs b/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionTest.cs index 870ea64cd8d..b00f09edfc6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DataBindingCollectionTest.cs @@ -34,7 +34,6 @@ using System.Security.Permissions; using System.Web; using System.Web.UI; -#if NET_2_0 namespace MonoCasTests.System.Web.UI { @@ -65,4 +64,3 @@ namespace MonoCasTests.System.Web.UI { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/DataBoundLiteralControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI/DataBoundLiteralControlCas.cs index 68be63d544c..1c2996c4afa 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DataBoundLiteralControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DataBoundLiteralControlCas.cs @@ -52,7 +52,6 @@ namespace MonoCasTests.System.Web.UI { Assert.AreEqual ("monkeymono", dblc.Text, "Text"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] [ExpectedException (typeof (NotSupportedException))] @@ -63,7 +62,6 @@ namespace MonoCasTests.System.Web.UI { // setter throw tc.Text = "singe"; } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/DataSourceCacheDurationConverterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/DataSourceCacheDurationConverterTest.cs index f40ec79c959..37ea277df8b 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DataSourceCacheDurationConverterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DataSourceCacheDurationConverterTest.cs @@ -23,7 +23,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; using System.Collections.Generic; @@ -125,4 +124,3 @@ namespace MonoTests.System.Web.UI } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI/DataSourceSelectArgumentsTest.cs b/mcs/class/System.Web/Test/System.Web.UI/DataSourceSelectArgumentsTest.cs index 9575382370a..c5833458741 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DataSourceSelectArgumentsTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DataSourceSelectArgumentsTest.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 NUnit.Framework; @@ -199,4 +198,3 @@ namespace MonoCasTests.System.Web.UI } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/DesignTimeParseDataCas.cs b/mcs/class/System.Web/Test/System.Web.UI/DesignTimeParseDataCas.cs index 60c4c6e6741..2e48faabcfe 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DesignTimeParseDataCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DesignTimeParseDataCas.cs @@ -58,7 +58,6 @@ namespace MonoCasTests.System.Web.UI { Assert.AreEqual (String.Empty, dtpd.DocumentUrl, "DocumentUrl"); Assert.AreEqual ("parseText", dtpd.ParseText, "ParseText"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Ctor3_Deny_Unrestricted () @@ -69,7 +68,6 @@ namespace MonoCasTests.System.Web.UI { Assert.IsTrue (dtpd.ShouldApplyTheme, "ShouldApplyTheme"); Assert.IsNull (dtpd.UserControlRegisterEntries, "UserControlRegisterEntries"); } -#endif // LinkDemand public override object CreateControl (SecurityAction action, AspNetHostingPermissionLevel level) diff --git a/mcs/class/System.Web/Test/System.Web.UI/DesignTimeTemplateParserCas.cs b/mcs/class/System.Web/Test/System.Web.UI/DesignTimeTemplateParserCas.cs index ed3b3dc6064..ea010bee440 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/DesignTimeTemplateParserCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/DesignTimeTemplateParserCas.cs @@ -101,7 +101,6 @@ namespace MonoCasTests.System.Web.UI { { DesignTimeTemplateParser.ParseTemplate (dtpd); } -#if NET_2_0 [Test] [SecurityPermission (SecurityAction.Deny, ControlThread = true)] [ExpectedException (typeof (SecurityException))] @@ -145,7 +144,6 @@ namespace MonoCasTests.System.Web.UI { { DesignTimeTemplateParser.ParseTheme (null, "theme", "path"); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/Html32TextWriterCas.cs b/mcs/class/System.Web/Test/System.Web.UI/Html32TextWriterCas.cs index dd493c74245..d68e6b6216d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/Html32TextWriterCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/Html32TextWriterCas.cs @@ -51,14 +51,12 @@ namespace MonoCasTests.System.Web.UI { private void Deny_Unrestricted (Html32TextWriter htw) { -#if NET_2_0 htw.ShouldPerformDivTableSubstitution = true; Assert.IsTrue (htw.ShouldPerformDivTableSubstitution, "ShouldPerformDivTableSubstitution"); htw.SupportsBold = true; Assert.IsTrue (htw.SupportsBold, "SupportsBold"); htw.SupportsItalic = true; Assert.IsTrue (htw.SupportsItalic, "SupportsItalic"); -#endif htw.RenderBeginTag (HtmlTextWriterTag.Table); htw.RenderBeginTag ("<tr>"); htw.RenderEndTag (); diff --git a/mcs/class/System.Web/Test/System.Web.UI/HtmlTextWriterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/HtmlTextWriterTest.cs index 42a248306e4..f74eb4f0765 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/HtmlTextWriterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/HtmlTextWriterTest.cs @@ -381,12 +381,7 @@ namespace MonoTests.System.Web.UI { w.RenderBeginTag ("div"); w.RenderEndTag (); -#if NET_2_0 Assert.AreEqual ("<div style=\"background-image:url(http://www.go-mono.com/);\">\n\n</div>", sw.ToString ()); -#else - // the url(...) is missing in fx 1.x - Assert.AreEqual ("<div style=\"background-image:http://www.go-mono.com/;\">\n\n</div>", sw.ToString ()); -#endif } [Test] @@ -399,13 +394,9 @@ namespace MonoTests.System.Web.UI { w1.AddStyleAttribute ("mystyle", "my value&space"); w1.RenderBeginTag ("div"); w1.RenderEndTag (); -#if NET_2_0 Assert.AreEqual ("my value&space", w1.StyleValue_At_AddStyleAttribute, "StyleValue_At_AddStyleAttribute"); Assert.AreEqual ("my value&space", w1.StyleValue_At_OnStyleAttributeRender, "StyleValue_At_OnStyleAttributeRender"); Assert.AreEqual ("<div style=\"mystyle:my value&space;\">\n\n</div>", sw.ToString ()); -#else - Assert.AreEqual ("<div style=\"mystyle:my value&space;\">\n\n</div>", sw.ToString ()); -#endif } [Test] @@ -450,7 +441,6 @@ namespace MonoTests.System.Web.UI { Assert.AreEqual ("mystyle:my value&space;", sw.ToString ()); } -#if NET_2_0 [Test] public void WriteStyleAttribute_BackgroundImage1 () { @@ -513,7 +503,6 @@ namespace MonoTests.System.Web.UI { Assert.AreEqual ("<div style=\"BackGround-Image:url(http://www.mainsoft.com/space%20here?a=b&c=d);\">\n\n</div>", sw.ToString ()); } -#endif [Test] public void AddStyleAttribute2 () @@ -554,14 +543,12 @@ namespace MonoTests.System.Web.UI { Assert.AreEqual ("<div>\n\n</div>", sw.ToString ()); } -#if NET_2_0 [Test] public void WriteBreakTest () { w.WriteBreak (); Assert.AreEqual ("<br />", sw.ToString (), "WriteBreakTest01"); } -#endif class MyHttpTextWriter : HtmlTextWriter { int i = 0; diff --git a/mcs/class/System.Web/Test/System.Web.UI/LosFormatterCas.cs b/mcs/class/System.Web/Test/System.Web.UI/LosFormatterCas.cs index 1f75386dddc..f3ba16dc27e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/LosFormatterCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/LosFormatterCas.cs @@ -67,14 +67,12 @@ namespace MonoCasTests.System.Web.UI { LosFormatter lf = new LosFormatter (true, String.Empty); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void CtorBoolByteArray_Deny_Unrestricted () { LosFormatter lf = new LosFormatter (true, (byte[])null); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/LosFormatterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/LosFormatterTest.cs index 9ae597d59f6..03e03728e18 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/LosFormatterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/LosFormatterTest.cs @@ -217,11 +217,7 @@ namespace MonoTests.System.Web.UI StringWriter sw = new StringWriter (); lf.Serialize (sw, s); string s1 = sw.ToString (); -#if NET_2_0 Assert.AreEqual ("/wEFC0hlbGxvIHdvcmxk", s1, "#1"); -#else - Assert.AreEqual ("SGVsbG8gd29ybGQ=", s1, "#1"); -#endif string s2 = lf.Deserialize (s1) as string; Assert.IsNotNull (s2, "#2"); Assert.AreEqual (s, s2, "#3"); @@ -253,11 +249,7 @@ namespace MonoTests.System.Web.UI MemoryStream ms = new MemoryStream (); lf.Serialize (ms, s); string s1 = Encoding.UTF8.GetString (ms.GetBuffer (), 0, (int) ms.Length); -#if NET_2_0 Assert.AreEqual ("/wEFC0hlbGxvIHdvcmxk", s1, "#1"); -#else - Assert.AreEqual ("SGVsbG8gd29ybGQ=", s1, "#1"); -#endif string s2 = lf.Deserialize (s1) as string; Assert.IsNotNull (s2, "#2"); Assert.AreEqual (s, s2, "#3"); @@ -287,20 +279,12 @@ namespace MonoTests.System.Web.UI MemoryStream ms = new MemoryStream (); lf.Serialize (ms, null); string s1 = Encoding.UTF8.GetString (ms.GetBuffer (), 0, (int) ms.Length); -#if NET_2_0 Assert.AreEqual ("/wFk", s1, "#1"); -#else - Assert.AreEqual (string.Empty, s1, "#1"); -#endif StringWriter sw = new StringWriter (); lf.Serialize (sw, null); string s2 = sw.ToString (); -#if NET_2_0 Assert.AreEqual ("/wFk", s1, "#2"); -#else - Assert.AreEqual (string.Empty, s1, "#2"); -#endif } class NonSeekableStream : MemoryStream diff --git a/mcs/class/System.Web/Test/System.Web.UI/MinimizableAttributeTypeConverterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/MinimizableAttributeTypeConverterTest.cs index d72effde4f3..8dff094c30d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/MinimizableAttributeTypeConverterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/MinimizableAttributeTypeConverterTest.cs @@ -39,7 +39,6 @@ using NUnit.Framework; using MonoTests.Common; -#if NET_2_0 namespace MonoTests.System.Web.UI { [TestFixture] @@ -139,4 +138,3 @@ namespace MonoTests.System.Web.UI { } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs index 5b3faea8731..b6c57ee9549 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ObjectStateFormatterTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; using System.Reflection; @@ -132,4 +131,3 @@ namespace MonoTests.System.Web.UI #endif } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/OutputCacheParametersTest.cs b/mcs/class/System.Web/Test/System.Web.UI/OutputCacheParametersTest.cs index e9a6671ca2f..d99ba7daf65 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/OutputCacheParametersTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/OutputCacheParametersTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -56,4 +55,3 @@ namespace MonoTests.System.Web.UI } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/PageCas.cs b/mcs/class/System.Web/Test/System.Web.UI/PageCas.cs index ebcef92c92d..46ca9b74842 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/PageCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/PageCas.cs @@ -77,7 +77,6 @@ namespace MonoCasTests.System.Web.UI { Assert.AreEqual ("mono", p.ViewStateUserKey, "ViewStateUserKey"); p.Visible = true; Assert.IsTrue (p.Visible, "Visible"); -#if NET_2_0 Assert.IsNotNull (p.ClientScript, "ClientScript"); // p.CodePage = 0; // Assert.AreEqual (0, p.CodePage, "CodePage"); @@ -98,7 +97,6 @@ namespace MonoCasTests.System.Web.UI { // Assert.AreEqual (Encoding.UTF8.WebName, p.ResponseEncoding, "ResponseEncoding"); p.UICulture = "en-us"; Assert.IsNotNull (p.UICulture, "UICulture"); -#endif } [Test] @@ -164,7 +162,6 @@ namespace MonoCasTests.System.Web.UI { { Assert.IsNotNull (new Page ().User, "User"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] [ExpectedException (typeof (HttpException))] @@ -242,7 +239,6 @@ namespace MonoCasTests.System.Web.UI { { Assert.AreEqual (TraceMode.Default, page.TraceModeValue, "TraceModeValue"); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Methods_Deny_Unrestricted () @@ -265,7 +261,6 @@ namespace MonoCasTests.System.Web.UI { p.RegisterStartupScript ("key", "script"); p.Validate (); p.VerifyRenderingInServerForm (control); -#if NET_2_0 p.Controls.Add (control); Assert.IsNotNull (p.FindControl ("mono"), "FindControl"); p.RegisterRequiresControlState (control); @@ -273,7 +268,6 @@ namespace MonoCasTests.System.Web.UI { p.UnregisterRequiresControlState (control); Assert.IsNotNull (p.GetValidators (String.Empty), "GetValidators"); p.Validate (String.Empty); -#endif } [Test] @@ -293,11 +287,7 @@ namespace MonoCasTests.System.Web.UI { [Test] [FileIOPermission (SecurityAction.Deny, Unrestricted = true)] -#if NET_2_0 [ExpectedException (typeof (SecurityException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void ProcessRequest_Deny_Unrestricted () { new Page ().ProcessRequest (new HttpContext (null)); @@ -305,19 +295,12 @@ namespace MonoCasTests.System.Web.UI { [Test] [FileIOPermission (SecurityAction.PermitOnly, Unrestricted = true)] -#if NET_2_0 [ExpectedException (typeof (HttpException))] -#else - // indirect for HttpApplicationState | HttpStaticObjectsCollection - [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)] - [ExpectedException (typeof (NullReferenceException))] -#endif public void ProcessRequest_PermitOnly_FileIOPermission () { new Page ().ProcessRequest (new HttpContext (null)); } -#if NET_2_0 private void Handler (object sender, EventArgs e) { } @@ -341,7 +324,6 @@ namespace MonoCasTests.System.Web.UI { p.PreRenderComplete -= new EventHandler (Handler); p.SaveStateComplete -= new EventHandler (Handler); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/PageParserFilterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/PageParserFilterTest.cs index bf1b8ed3bab..98c548d2e92 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/PageParserFilterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/PageParserFilterTest.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; using System.Text; @@ -97,4 +96,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/PageParserTest.cs b/mcs/class/System.Web/Test/System.Web.UI/PageParserTest.cs index 50825f57a16..5b2d1e4bac4 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/PageParserTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/PageParserTest.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 NUnit.Framework; using System; using System.Web; @@ -51,4 +50,3 @@ namespace MonoTests.System.Web.UI } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs b/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs index 59a23595bcd..8150647b45d 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/PageTest.cs @@ -36,9 +36,7 @@ using System.Threading; using System.Security.Principal; using System.Web; using System.Web.UI; -#if NET_2_0 using System.Web.UI.Adapters; -#endif using MonoTests.SystemWeb.Framework; using MonoTests.stand_alone.WebHarness; using System.Web.UI.WebControls; @@ -63,7 +61,6 @@ namespace MonoTests.System.Web.UI { } } - #if NET_2_0 public new bool AsyncMode { get { return base.AsyncMode; } set { base.AsyncMode = value; } @@ -88,7 +85,6 @@ namespace MonoTests.System.Web.UI { return base.IdSeparator; } } - #endif } class TestPage2 : Page { @@ -140,9 +136,7 @@ namespace MonoTests.System.Web.UI { } [Test] -#if NET_2_0 [Category ("NotDotNet")] // page.User throw NRE in 2.0 RC -#endif public void User_OverridenContext () { TestPage page = new TestPage (); @@ -196,7 +190,6 @@ namespace MonoTests.System.Web.UI { Assert.IsNull (page.Application, "Application"); } -#if NET_2_0 [Test] [Category ("NunitWeb")] public void PageHeaderOnPreInit () @@ -335,9 +328,7 @@ namespace MonoTests.System.Web.UI { p.Header.Title = "Test"; Assert.AreEqual ("Test", p.Title, "CheckHeader#4"); } -#endif -#if NET_2_0 [Test] [Category ("NunitWeb")] public void Page_ValidationGroup () @@ -461,9 +452,7 @@ namespace MonoTests.System.Web.UI { Assert.AreEqual("DeterminePostBackModeTestValue", h.Value, "DeterminePostBackMode #1"); } -#endif -#if NET_2_0 // This test are testing validation fixture using RequiredFieldValidator for example [Test] @@ -1353,7 +1342,6 @@ namespace MonoTests.System.Web.UI { string html = t.Run (); Assert.AreEqual (HttpStatusCode.Found, t.Response.StatusCode); } -#endif [TestFixtureTearDown] public void TearDown () @@ -1362,7 +1350,6 @@ namespace MonoTests.System.Web.UI { } } -#if NET_2_0 class TestHtmlInputHidden : global::System.Web.UI.HtmlControls.HtmlInputHidden { protected override bool LoadPostData (string postDataKey, NameValueCollection postCollection) @@ -1485,5 +1472,4 @@ namespace MonoTests.System.Web.UI { return control_adapter; } } -#endif } diff --git a/mcs/class/System.Web/Test/System.Web.UI/ParseChildrenAttributeCas.cs b/mcs/class/System.Web/Test/System.Web.UI/ParseChildrenAttributeCas.cs index f4797d139a4..fb1c14aa2c8 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ParseChildrenAttributeCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ParseChildrenAttributeCas.cs @@ -53,9 +53,7 @@ namespace MonoCasTests.System.Web.UI { Assert.IsTrue (pca.IsDefaultAttribute (), "IsDefaultAttribute"); // this throws a NullReferenceException on MS 2.0 beta2 // Assert.IsTrue (pca.GetHashCode () != 0, "GetHashCode"); // likely -#if NET_2_0 Assert.AreEqual (typeof (Control), pca.ChildControlType, "ChildControlType"); -#endif } [Test] @@ -68,9 +66,7 @@ namespace MonoCasTests.System.Web.UI { Assert.IsTrue (pca.Equals (pca), "Equals"); Assert.IsFalse (pca.IsDefaultAttribute (), "IsDefaultAttribute"); Assert.IsTrue (pca.GetHashCode () != 0, "GetHashCode"); // likely -#if NET_2_0 Assert.AreEqual (typeof (Control), pca.ChildControlType, "ChildControlType"); -#endif } [Test] @@ -83,12 +79,9 @@ namespace MonoCasTests.System.Web.UI { Assert.IsTrue (pca.Equals (pca), "Equals"); Assert.IsFalse (pca.IsDefaultAttribute (), "IsDefaultAttribute"); Assert.IsTrue (pca.GetHashCode () != 0, "GetHashCode"); // likely -#if NET_2_0 Assert.AreEqual (typeof (Control), pca.ChildControlType, "ChildControlType"); -#endif } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void CtorType_Deny_Unrestricted () @@ -101,17 +94,14 @@ namespace MonoCasTests.System.Web.UI { Assert.IsTrue (pca.GetHashCode () != 0, "GetHashCode"); // likely Assert.AreEqual (typeof (string), pca.ChildControlType, "ChildControlType"); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Static_Deny_Unrestricted () { Assert.IsNotNull (ParseChildrenAttribute.Default, "Default"); -#if NET_2_0 Assert.IsNotNull (ParseChildrenAttribute.ParseAsChildren, "ParseAsChildren"); Assert.IsNotNull (ParseChildrenAttribute.ParseAsProperties, "ParseAsProperties"); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/PartialCachingAttributeCas.cs b/mcs/class/System.Web/Test/System.Web.UI/PartialCachingAttributeCas.cs index 214e44056d8..b1f2a756122 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/PartialCachingAttributeCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/PartialCachingAttributeCas.cs @@ -51,9 +51,7 @@ namespace MonoCasTests.System.Web.UI { Assert.IsNull (pca.VaryByControls, "VaryByControls"); Assert.IsNull (pca.VaryByCustom, "VaryByCustom"); Assert.IsNull (pca.VaryByParams, "VaryByParams"); -#if NET_2_0 Assert.IsNull (pca.SqlDependency, "SqlDependency"); -#endif Assert.IsFalse (pca.Shared, "Shared"); } @@ -66,9 +64,7 @@ namespace MonoCasTests.System.Web.UI { Assert.AreEqual ("2", pca.VaryByControls, "VaryByControls"); Assert.AreEqual ("3", pca.VaryByCustom, "VaryByCustom"); Assert.AreEqual ("1", pca.VaryByParams, "VaryByParams"); -#if NET_2_0 Assert.IsNull (pca.SqlDependency, "SqlDependency"); -#endif Assert.IsFalse (pca.Shared, "Shared"); } @@ -81,13 +77,10 @@ namespace MonoCasTests.System.Web.UI { Assert.AreEqual ("b", pca.VaryByControls, "VaryByControls"); Assert.AreEqual ("c", pca.VaryByCustom, "VaryByCustom"); Assert.AreEqual ("a", pca.VaryByParams, "VaryByParams"); -#if NET_2_0 Assert.IsNull (pca.SqlDependency, "SqlDependency"); -#endif Assert.IsTrue (pca.Shared, "Shared"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Ctor6_Deny_Unrestricted () @@ -100,7 +93,6 @@ namespace MonoCasTests.System.Web.UI { Assert.AreEqual ("sql", pca.SqlDependency, "SqlDependency"); Assert.IsFalse (pca.Shared, "Shared"); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/PersistChildrenAttributeCas.cs b/mcs/class/System.Web/Test/System.Web.UI/PersistChildrenAttributeCas.cs index 9b3bce030a3..94e4411bba4 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/PersistChildrenAttributeCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/PersistChildrenAttributeCas.cs @@ -48,14 +48,11 @@ namespace MonoCasTests.System.Web.UI { { PersistChildrenAttribute pca = new PersistChildrenAttribute (true); Assert.IsTrue (pca.Persist, "Persist"); -#if NET_2_0 Assert.IsFalse (pca.UsesCustomPersistence, "UsesCustomPersistence"); -#endif Assert.IsTrue (pca.Equals (pca), "Equals"); Assert.IsTrue (pca.IsDefaultAttribute (), "IsDefaultAttribute"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Ctor2_Deny_Unrestricted () @@ -66,7 +63,6 @@ namespace MonoCasTests.System.Web.UI { Assert.IsTrue (pca.Equals (pca), "Equals"); Assert.IsFalse (pca.IsDefaultAttribute (), "IsDefaultAttribute"); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] diff --git a/mcs/class/System.Web/Test/System.Web.UI/PostBackOptionsTest.cs b/mcs/class/System.Web/Test/System.Web.UI/PostBackOptionsTest.cs index 11ed7984032..e5c81248828 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/PostBackOptionsTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/PostBackOptionsTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -103,4 +102,3 @@ namespace MonoTests.System.Web.UI } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web.UI/RootBuilderCas.cs b/mcs/class/System.Web/Test/System.Web.UI/RootBuilderCas.cs index 2d988369c52..bd3eed60bd6 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/RootBuilderCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/RootBuilderCas.cs @@ -56,12 +56,9 @@ namespace MonoCasTests.System.Web.UI { catch (NullReferenceException) { // ms 2.0 - more likely parameters don't change this result } -#if NET_2_0 Assert.IsNotNull (rb.BuiltObjects, "BuiltObjects"); -#endif } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Ctor0_Deny_Unrestricted () @@ -69,7 +66,6 @@ namespace MonoCasTests.System.Web.UI { RootBuilder rb = new RootBuilder (); Assert.IsNotNull (rb.BuiltObjects, "BuiltObjects"); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/StateBagCas.cs b/mcs/class/System.Web/Test/System.Web.UI/StateBagCas.cs index 371fbfdc0cf..c51f63e0def 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/StateBagCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/StateBagCas.cs @@ -57,9 +57,7 @@ namespace MonoCasTests.System.Web.UI { Assert.IsNotNull (bag["key"], "this[string]"); Assert.IsNotNull (bag.Keys, "Keys"); Assert.IsNotNull (bag.Values, "Values"); -#if NET_2_0 bag.SetDirty (true); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI/TemplateBuilderCas.cs b/mcs/class/System.Web/Test/System.Web.UI/TemplateBuilderCas.cs index cd0c362bace..c6cea208dfb 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/TemplateBuilderCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/TemplateBuilderCas.cs @@ -51,9 +51,7 @@ namespace MonoCasTests.System.Web.UI { tb.Init (new PageParser (), new ControlBuilder (), null, null, null, null); Assert.IsFalse (tb.NeedsTagInnerText (), "NeedsTagInnerText"); tb.SetTagInnerText ("mono"); -#if NET_2_0 Assert.IsNotNull (tb.BuildObject (), "BuildObject"); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/TemplateContainerAttributeCas.cs b/mcs/class/System.Web/Test/System.Web.UI/TemplateContainerAttributeCas.cs index 7b9979663a6..3fa7fb4ac04 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/TemplateContainerAttributeCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/TemplateContainerAttributeCas.cs @@ -48,12 +48,9 @@ namespace MonoCasTests.System.Web.UI { { TemplateContainerAttribute tca = new TemplateContainerAttribute (null); Assert.IsNull (tca.ContainerType, "ContainerType"); -#if NET_2_0 Assert.AreEqual (BindingDirection.OneWay, tca.BindingDirection, "BindingDirection"); -#endif } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Ctor2_Deny_Unrestricted () @@ -62,7 +59,6 @@ namespace MonoCasTests.System.Web.UI { Assert.AreEqual (typeof (string), tca.ContainerType, "ContainerType"); Assert.AreEqual (BindingDirection.TwoWay, tca.BindingDirection, "BindingDirection"); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/TemplateControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI/TemplateControlCas.cs index 9c5b1221ca5..09cdffe71c1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/TemplateControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/TemplateControlCas.cs @@ -57,11 +57,7 @@ namespace MonoCasTests.System.Web.UI { [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (HttpException))] -#endif public void LoadControl_Deny_Unrestricted () { NonAbstractTemplateControl tc = new NonAbstractTemplateControl (); @@ -70,11 +66,7 @@ namespace MonoCasTests.System.Web.UI { [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (HttpException))] -#endif public void LoadTemplate_Deny_Unrestricted () { NonAbstractTemplateControl tc = new NonAbstractTemplateControl (); @@ -91,11 +83,7 @@ namespace MonoCasTests.System.Web.UI { tc.ParseControl (null); } catch (NullReferenceException) { -#if NET_2_0 throw; -#else - Assert.Ignore ("NRE"); -#endif } } @@ -108,11 +96,7 @@ namespace MonoCasTests.System.Web.UI { TemplateControl.ReadStringResource (null); } catch (TypeInitializationException) { -#if NET_2_0 Assert.Ignore ("exception during initialization"); -#else - throw; -#endif } } @@ -133,7 +117,6 @@ namespace MonoCasTests.System.Web.UI { tc.CommitTransaction -= new EventHandler (Handler); tc.Error -= new EventHandler (Handler); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] [ExpectedException (typeof (TypeInitializationException))] @@ -153,6 +136,5 @@ namespace MonoCasTests.System.Web.UI { // mono } } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs b/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs index 0c7f0fa1962..90551e8b106 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/TemplateControlTest.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.Collections.Generic; @@ -342,4 +341,3 @@ namespace MonoTests.System.Web.UI.WebControls } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/TemplateInstanceAttributeTest.cs b/mcs/class/System.Web/Test/System.Web.UI/TemplateInstanceAttributeTest.cs index 53073536720..bdbdab0bfb1 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/TemplateInstanceAttributeTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/TemplateInstanceAttributeTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -55,4 +54,3 @@ namespace MonoTests.System.Web.UI } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/TestUrlPropertyAttribute.cs b/mcs/class/System.Web/Test/System.Web.UI/TestUrlPropertyAttribute.cs index cb9ea040365..ef4f8724861 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/TestUrlPropertyAttribute.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/TestUrlPropertyAttribute.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -78,5 +77,4 @@ namespace MonoTests.System.Web.UI } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.UI/ToolboxDataAttributeCas.cs b/mcs/class/System.Web/Test/System.Web.UI/ToolboxDataAttributeCas.cs index d4a2fe60caa..14168ae47f3 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/ToolboxDataAttributeCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/ToolboxDataAttributeCas.cs @@ -50,13 +50,9 @@ namespace MonoCasTests.System.Web.UI { Assert.IsNull (tda.Data, "Data"); Assert.IsTrue (tda.Equals (tda), "Equals"); Assert.IsFalse (tda.GetHashCode () == ToolboxDataAttribute.Default.GetHashCode (), "GetHashCode"); -#if NET_2_0 // unexpected result as tda hash code is different from default // seems that null and String.Empty are both considered defaults... Assert.IsTrue (tda.IsDefaultAttribute (), "IsDefaultAttribute"); -#else - Assert.IsFalse (tda.IsDefaultAttribute (), "IsDefaultAttribute"); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/UserControlCas.cs b/mcs/class/System.Web/Test/System.Web.UI/UserControlCas.cs index 3e6fafb6c6c..a158152131e 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/UserControlCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/UserControlCas.cs @@ -96,14 +96,12 @@ namespace MonoCasTests.System.Web.UI { catch (NullReferenceException) { // ms 2.0 rc } -#if NET_2_0 try { Assert.IsNotNull (uc.CachePolicy, "CachePolicy"); } catch (NotImplementedException) { // mono } -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web.UI/UserControlControlBuilderCas.cs b/mcs/class/System.Web/Test/System.Web.UI/UserControlControlBuilderCas.cs index 072111371e3..f5ed36eab9a 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/UserControlControlBuilderCas.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/UserControlControlBuilderCas.cs @@ -55,7 +55,6 @@ namespace MonoCasTests.System.Web.UI { uccb.SetTagInnerText ("mono"); } -#if NET_2_0 [Test] [AspNetHostingPermission (SecurityAction.Deny, Level = AspNetHostingPermissionLevel.Minimal)] [ExpectedException (typeof (SecurityException))] @@ -71,7 +70,6 @@ namespace MonoCasTests.System.Web.UI { { new UserControlControlBuilder ().BuildObject (); } -#endif // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web.UI/XhtmlTextWriterTest.cs b/mcs/class/System.Web/Test/System.Web.UI/XhtmlTextWriterTest.cs index 663fe64727c..0caaf8fa5a4 100644 --- a/mcs/class/System.Web/Test/System.Web.UI/XhtmlTextWriterTest.cs +++ b/mcs/class/System.Web/Test/System.Web.UI/XhtmlTextWriterTest.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.IO; @@ -184,4 +183,3 @@ namespace MonoTests.System.Web.UI { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web.Util/UrlUtilsTest.cs b/mcs/class/System.Web/Test/System.Web.Util/UrlUtilsTest.cs index ccf8c214a77..c2b75e71fa5 100644 --- a/mcs/class/System.Web/Test/System.Web.Util/UrlUtilsTest.cs +++ b/mcs/class/System.Web/Test/System.Web.Util/UrlUtilsTest.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.Text; using System.Web; @@ -67,4 +66,3 @@ namespace MonoTests.System.Web.Util } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs b/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs index 6d02c725aa8..e92c9732505 100644 --- a/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.cs +++ b/mcs/class/System.Web/Test/System.Web/AppBrowsersTest.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.Web; using System.Web.UI; @@ -228,4 +227,3 @@ namespace MonoTests.System.Web } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/HttpApplicationCas.cs b/mcs/class/System.Web/Test/System.Web/HttpApplicationCas.cs index 662d045dda3..994ed1ea8bf 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpApplicationCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpApplicationCas.cs @@ -106,7 +106,6 @@ namespace MonoCasTests.System.Web { app.ReleaseRequestState -= new EventHandler (Handler); app.ResolveRequestCache -= new EventHandler (Handler); app.UpdateRequestCache -= new EventHandler (Handler); -#if NET_2_0 app.PostAuthenticateRequest += new EventHandler (Handler); app.PostAuthorizeRequest += new EventHandler (Handler); app.PostResolveRequestCache += new EventHandler (Handler); @@ -148,7 +147,6 @@ namespace MonoCasTests.System.Web { app.PostAcquireRequestState -= new EventHandler (Handler); app.PostReleaseRequestState -= new EventHandler (Handler); app.PostUpdateRequestCache -= new EventHandler (Handler); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesCas.cs b/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesCas.cs index f08abbb0e80..4e3867508b1 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesCas.cs @@ -98,9 +98,7 @@ namespace MonoCasTests.System.Web { { HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities (); Assert.IsNotNull (cap.Browser, "Browser"); -#if NET_2_0 Assert.IsNull (cap.Browsers, "Browsers"); -#endif Assert.IsNotNull (cap.Platform, "Platform"); Assert.IsNotNull (cap.Type, "Type"); Assert.IsNotNull (cap.Version, "Version"); @@ -143,13 +141,7 @@ namespace MonoCasTests.System.Web { public void GetClrVersions_Deny_Unrestricted () { HttpBrowserCapabilities cap = new StringHttpBrowserCapabilities (); -#if NET_2_0 Assert.IsNull (cap.GetClrVersions (), "GetClrVersions"); -#else - Version[] versions = cap.GetClrVersions (); - Assert.AreEqual (1, versions.Length, "GetClrVersions"); - Assert.AreEqual ("0.0", versions [0].ToString (), "Version[0]"); -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesTest.cs b/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesTest.cs index 14cf227df48..fd98d4385c8 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpBrowserCapabilitiesTest.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.Web; using System.Web.UI; @@ -247,4 +246,3 @@ namespace MonoTests.System.Web } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web/HttpCachePolicyCas.cs b/mcs/class/System.Web/Test/System.Web/HttpCachePolicyCas.cs index f85395311f1..a0a70e9755d 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpCachePolicyCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpCachePolicyCas.cs @@ -114,14 +114,12 @@ namespace MonoCasTests.System.Web { cache.SetVaryByCustom ("custom"); cache.SetAllowResponseInBrowserHistory (true); -#if NET_2_0 try { cache.SetOmitVaryStar (false); } catch (NotImplementedException) { // mono } -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web/HttpCacheVaryByContentEncodingsTest.cs b/mcs/class/System.Web/Test/System.Web/HttpCacheVaryByContentEncodingsTest.cs index befcb434ea3..2ab7f4dbe56 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpCacheVaryByContentEncodingsTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpCacheVaryByContentEncodingsTest.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.Web; using NUnit.Framework; @@ -67,4 +66,3 @@ namespace MonoTests.System.Web } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web/HttpClientCertificateTest.cs b/mcs/class/System.Web/Test/System.Web/HttpClientCertificateTest.cs index 56e5d3ec87f..e675c954e80 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpClientCertificateTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpClientCertificateTest.cs @@ -241,11 +241,7 @@ namespace MonoTests.System.Web { } [Test] -#if NET_2_0 [ExpectedException (typeof (NullReferenceException))] -#else - [ExpectedException (typeof (ArgumentNullException))] -#endif public void HttpRequestPublicCtor () { HttpRequest hr = new HttpRequest ("file", "http://www.mono-project.com/", ""); diff --git a/mcs/class/System.Web/Test/System.Web/HttpCompileExceptionCas.cs b/mcs/class/System.Web/Test/System.Web/HttpCompileExceptionCas.cs index 1ab04a6e878..e802218c3d0 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpCompileExceptionCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpCompileExceptionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 // Note: class exists in 1.x but has no public ctor @@ -142,4 +141,3 @@ namespace MonoCasTests.System.Web { } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/System.Web/HttpContextCas.cs b/mcs/class/System.Web/Test/System.Web/HttpContextCas.cs index 3e26c27e9a4..b63b0017d0b 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpContextCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpContextCas.cs @@ -95,12 +95,10 @@ namespace MonoCasTests.System.Web { Assert.IsNotNull (context.Trace, "Trace"); // note: only User setter is protected Assert.IsNull (context.User, "User"); -#if NET_2_0 Assert.IsNotNull (context.Application, "Application"); Assert.IsNotNull (context.CurrentHandler, "CurrentHandler"); Assert.IsNull (context.PreviousHandler, "PreviousHandler"); // Assert.IsNull (context.Profile, "Profile"); -#endif // static properties Assert.IsNull (HttpContext.Current, "Current"); } @@ -189,7 +187,6 @@ namespace MonoCasTests.System.Web { catch (ArgumentNullException) { // mono } -#if NET_2_0 context.GetSection (String.Empty); try { @@ -201,7 +198,6 @@ namespace MonoCasTests.System.Web { catch (NotImplementedException) { // mono } -#endif } [Test] @@ -209,7 +205,6 @@ namespace MonoCasTests.System.Web { public void StaticMethods_Deny_Unrestricted () { HttpContext.GetAppConfig (String.Empty); -#if NET_2_0 HttpContext.GetGlobalResourceObject (String.Empty, String.Empty); HttpContext.GetGlobalResourceObject (String.Empty, String.Empty, CultureInfo.InvariantCulture); try { @@ -228,7 +223,6 @@ namespace MonoCasTests.System.Web { } catch (NullReferenceException) { } -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web/HttpCookieCas.cs b/mcs/class/System.Web/Test/System.Web/HttpCookieCas.cs index 567b1a71941..75383782a2c 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpCookieCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpCookieCas.cs @@ -62,10 +62,8 @@ namespace MonoCasTests.System.Web { Assert.IsTrue (biscuit.Value.IndexOf ("mono=monkey") >= 0, "Value"); biscuit.Value = "monkey=mono&singe=monkey"; -#if NET_2_0 Assert.IsFalse (biscuit.HttpOnly, "HttpOnly"); biscuit.HttpOnly = true; -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web/HttpCookieTest.cs b/mcs/class/System.Web/Test/System.Web/HttpCookieTest.cs index b629c02c752..f6eafc6d767 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpCookieTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpCookieTest.cs @@ -425,7 +425,6 @@ namespace MonoTests.System.Web { + "%2b%253d%2bc%255e2&three=a%2b%2526%2bb", cookie2.Values.ToString (), "#J10"); } -#if NET_2_0 [Test] public void HttpOnly () { @@ -436,6 +435,5 @@ namespace MonoTests.System.Web { biscuit.HttpOnly = false; Assert.IsFalse (biscuit.HttpOnly, "false"); } -#endif } } diff --git a/mcs/class/System.Web/Test/System.Web/HttpExceptionCas.cs b/mcs/class/System.Web/Test/System.Web/HttpExceptionCas.cs index 1ad4eb90f20..c09b6744e65 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpExceptionCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpExceptionCas.cs @@ -90,7 +90,6 @@ namespace MonoCasTests.System.Web { e.GetHtmlErrorMessage (); // null for ms, non-null for mono Assert.AreEqual (500, e.GetHttpCode (), "HttpCode"); } -#if NET_2_0 [Test] [SecurityPermission (SecurityAction.Deny, SerializationFormatter = true)] [ExpectedException (typeof (SecurityException))] @@ -106,7 +105,6 @@ namespace MonoCasTests.System.Web { { he.GetObjectData (null, new StreamingContext ()); } -#endif // LinkDemand public override Type Type { diff --git a/mcs/class/System.Web/Test/System.Web/HttpParseExceptionCas.cs b/mcs/class/System.Web/Test/System.Web/HttpParseExceptionCas.cs index 71f26e55ba1..c0ddcedd609 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpParseExceptionCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpParseExceptionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 // Note: class exists in 1.x but has no public ctor @@ -123,4 +122,3 @@ namespace MonoCasTests.System.Web { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/HttpRequestCas.cs b/mcs/class/System.Web/Test/System.Web/HttpRequestCas.cs index b871ecbf592..580a8f55ea3 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpRequestCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpRequestCas.cs @@ -125,12 +125,9 @@ namespace MonoCasTests.System.Web { Assert.IsNull (request.UserHostAddress, "UserHostAddress"); Assert.IsNull (request.UserHostName, "UserHostName"); Assert.IsNull (request.UserLanguages, "UserLanguages"); -#if NET_2_0 Assert.IsFalse (request.IsLocal, "IsLocal"); -#endif } -#if NET_2_0 [Test] [AspNetHostingPermission (SecurityAction.Deny, Level = AspNetHostingPermissionLevel.Low)] [ExpectedException (typeof (SecurityException))] @@ -146,9 +143,6 @@ namespace MonoCasTests.System.Web { { Assert.IsNotNull (request.ClientCertificate, "ClientCertificate"); } -#else - // ClientCertificate fails before hitting the SecurityException -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] diff --git a/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs b/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs index 7252b4b27a6..9ee9ebe1a1e 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpRequestTest.cs @@ -560,11 +560,7 @@ namespace MonoTests.System.Web { { HttpContext c = Cook (1); -#if NET_2_0 Assert.IsNull (c.Request.ApplicationPath, "A1"); -#else - Assert.AreEqual ("AppPath", c.Request.ApplicationPath, "A1"); -#endif Assert.AreEqual ("text/plain", c.Request.ContentType, "A2"); c = Cook (0); @@ -713,7 +709,6 @@ namespace MonoTests.System.Web { Assert.AreEqual (c.Request.QueryString.ToString (), "Plain&Arg=1", "QTS#2"); } -#if NET_2_0 [Test] public void QueryString_NullTest () { @@ -721,7 +716,6 @@ namespace MonoTests.System.Web { Assert.AreEqual (req.QueryString.ToString (), "", "QSNT#1"); } -#endif [Test] public void Leading_qm_in_QueryString () diff --git a/mcs/class/System.Web/Test/System.Web/HttpRequestValidationExceptionCas.cs b/mcs/class/System.Web/Test/System.Web/HttpRequestValidationExceptionCas.cs index bd0f4a2876f..060afb71e33 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpRequestValidationExceptionCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpRequestValidationExceptionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 // Note: class exists in 1.1 but has no public ctor @@ -75,4 +74,3 @@ namespace MonoCasTests.System.Web { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/HttpResponseCas.cs b/mcs/class/System.Web/Test/System.Web/HttpResponseCas.cs index 11b8613dc40..d6bd7c67b7d 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpResponseCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpResponseCas.cs @@ -137,12 +137,10 @@ namespace MonoCasTests.System.Web { response.SuppressContent = false; Assert.IsFalse (response.SuppressContent, "SuppressContent"); -#if NET_2_0 response.HeaderEncoding = Encoding.UTF8; Assert.AreEqual (Encoding.UTF8, response.HeaderEncoding, "HeaderEncoding"); Assert.IsFalse (response.IsRequestBeingRedirected, "IsRequestBeingRedirected"); -#endif } [Test] @@ -193,11 +191,9 @@ namespace MonoCasTests.System.Web { response.AddCacheItemDependency (String.Empty); response.AddFileDependencies (new ArrayList ()); response.AddFileDependency (fname); -#if NET_2_0 response.AddCacheDependency (new CacheDependency[0]); response.AddCacheItemDependencies (new string [0]); response.AddFileDependencies (new string [0]); -#endif try { response.AppendCookie (new HttpCookie ("mono")); @@ -258,9 +254,7 @@ namespace MonoCasTests.System.Web { response.Write (Char.MinValue); response.Write (new char[0], 0, 0); response.Write (this); -#if NET_2_0 response.WriteSubstitution (new HttpResponseSubstitutionCallback (Callback)); -#endif response.Flush (); diff --git a/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs b/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs index bb4c3c779a6..4dd13d12b4f 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpResponseTest.cs @@ -257,9 +257,7 @@ namespace MonoTests.System.Web { [SetUp] public void SetUp () { -#if NET_2_0 AppDomain.CurrentDomain.SetData (".appPath", AppDomain.CurrentDomain.BaseDirectory); -#endif } [Test] @@ -452,11 +450,9 @@ namespace MonoTests.System.Web { a.Add ("somefile.txt"); c.Response.AddFileDependencies (a); -#if NET_2_0 string[] sa = new string [1] {"somefile.txt"}; c = Cook (1, out f); c.Response.AddFileDependencies (sa); -#endif c = Cook (1, out f); c.Response.AddFileDependency ("somefile.txt"); @@ -626,14 +622,10 @@ namespace MonoTests.System.Web { Assert.AreEqual (HttpWorkerRequest.HeaderContentType, known.Index, "#B6"); Assert.AreEqual ("text/html", known.Value, "#B7"); -#if NET_2_0 Assert.AreEqual (1, f.UnknownResponseHeaders.Count, "#C1"); UnknownResponseHeader unknown = (UnknownResponseHeader) f.UnknownResponseHeaders ["X-AspNet-Version"]; Assert.AreEqual ("X-AspNet-Version", unknown.Name, "#C2"); Assert.AreEqual (Environment.Version.ToString (3), unknown.Value, "#C3"); -#else - Assert.AreEqual (0, f.UnknownResponseHeaders.Count, "#C1"); -#endif } [Test] @@ -900,17 +892,12 @@ namespace MonoTests.System.Web { try { out_stream.Write ((byte []) null, 0, 0); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("buffer", ex.ParamName, "#5"); } -#else - } catch (NullReferenceException) { - } -#endif } [Test] @@ -968,7 +955,6 @@ namespace MonoTests.System.Web { byte [] buffer = new byte [] { 0x0a, 0x1f, 0x2d }; // offset == buffer length -#if NET_2_0 try { out_stream.Write (buffer, buffer.Length, 0); Assert.Fail ("#A1"); @@ -978,12 +964,8 @@ namespace MonoTests.System.Web { Assert.IsNotNull (ex.Message, "#A4"); Assert.AreEqual ("offset", ex.ParamName, "#A5"); } -#else - out_stream.Write (buffer, buffer.Length, 0); -#endif // offset > buffer length -#if NET_2_0 try { out_stream.Write (buffer, buffer.Length + 1, 0); Assert.Fail ("#B1"); @@ -993,9 +975,6 @@ namespace MonoTests.System.Web { Assert.IsNotNull (ex.Message, "#B4"); Assert.AreEqual ("offset", ex.ParamName, "#B5"); } -#else - out_stream.Write (buffer, buffer.Length + 1, 0); -#endif response.Flush (); Assert.AreEqual (0, worker.data_len); diff --git a/mcs/class/System.Web/Test/System.Web/HttpRuntimeCas.cs b/mcs/class/System.Web/Test/System.Web/HttpRuntimeCas.cs index 81d32bebd04..82de04cfa8c 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpRuntimeCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpRuntimeCas.cs @@ -48,29 +48,12 @@ namespace MonoCasTests.System.Web { new HttpRuntime (); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor_Deny_Unrestricted () { new HttpRuntime (); } -#else - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void Constructor_Deny_UnmanagedCode () - { - new HttpRuntime (); - } - - [Test] - [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)] - public void Constructor_PermitOnly_UnmanagedCode () - { - new HttpRuntime (); - } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] diff --git a/mcs/class/System.Web/Test/System.Web/HttpServerUtilityCas.cs b/mcs/class/System.Web/Test/System.Web/HttpServerUtilityCas.cs index a55f7e56f92..dba26baf256 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpServerUtilityCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpServerUtilityCas.cs @@ -121,7 +121,6 @@ namespace MonoCasTests.System.Web { catch (NullReferenceException) { // ms } -#if NET_2_0 try { hsu.Transfer ((IHttpHandler)null, true); } @@ -134,7 +133,6 @@ namespace MonoCasTests.System.Web { catch (NullReferenceException) { // ms } -#endif try { Assert.IsNotNull (hsu.UrlDecode (url), "UrlDecode(string)"); } @@ -232,7 +230,6 @@ namespace MonoCasTests.System.Web { hsu.Execute (String.Empty, sw); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] [ExpectedException (typeof (NullReferenceException))] @@ -248,7 +245,6 @@ namespace MonoCasTests.System.Web { { hsu.Execute (String.Empty, sw, false); } -#endif [Test] [AspNetHostingPermission (SecurityAction.Deny, Level = AspNetHostingPermissionLevel.Medium)] diff --git a/mcs/class/System.Web/Test/System.Web/HttpStaticObjectsCollectionCas.cs b/mcs/class/System.Web/Test/System.Web/HttpStaticObjectsCollectionCas.cs index 6a9ebe77973..53a6a2dc160 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpStaticObjectsCollectionCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpStaticObjectsCollectionCas.cs @@ -50,7 +50,6 @@ namespace MonoCasTests.System.Web { hsoc = new HttpStaticObjectsCollection (); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor_Deny_Unrestricted () @@ -71,22 +70,6 @@ namespace MonoCasTests.System.Web { BinaryReader reader = new BinaryReader (ms); Assert.IsNotNull (HttpStaticObjectsCollection.Deserialize (reader)); } -#else - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void Constructor_Deny_UnmanagedCode () - { - new HttpStaticObjectsCollection (); - } - - [Test] - [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)] - public void Constructor_PermitOnly_UnmanagedCode () - { - new HttpStaticObjectsCollection (); - } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] @@ -99,9 +82,7 @@ namespace MonoCasTests.System.Web { Assert.IsTrue (hsoc.IsReadOnly, "IsReadOnly"); Assert.IsFalse (hsoc.IsSynchronized, "IsSynchronized"); Assert.IsNotNull (hsoc.SyncRoot, "SyncRoot"); -#if NET_2_0 Assert.IsTrue (hsoc.NeverAccessed, "NeverAccessed"); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web/HttpUnhandledExceptionCas.cs b/mcs/class/System.Web/Test/System.Web/HttpUnhandledExceptionCas.cs index 9d42c69ba0a..21b14ea8e2b 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpUnhandledExceptionCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpUnhandledExceptionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 // Note: class exists in 1.x but has no public ctor @@ -74,4 +73,3 @@ namespace MonoCasTests.System.Web { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/HttpUtilityCas.cs b/mcs/class/System.Web/Test/System.Web/HttpUtilityCas.cs index b6b51616e40..232543cface 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpUtilityCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpUtilityCas.cs @@ -97,7 +97,6 @@ namespace MonoCasTests.System.Web { Assert.AreEqual (0, HttpUtility.UrlEncodeUnicodeToBytes (String.Empty).Length, "UrlEncodeUnicodeToBytes(string)"); Assert.AreEqual (String.Empty, HttpUtility.UrlPathEncode (String.Empty), "UrlPathEncode(string)"); -#if NET_2_0 try { Assert.IsNotNull (HttpUtility.ParseQueryString (String.Empty), "ParseQueryString(string)"); } @@ -110,7 +109,6 @@ namespace MonoCasTests.System.Web { catch (NotImplementedException) { // mono } -#endif } // LinkDemand diff --git a/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs b/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs index 5ead2173893..3882f2e779e 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpUtilityTest.cs @@ -631,11 +631,7 @@ namespace MonoTests.System.Web { static void UrlPathEncodeChar (char c, Stream result) { -#if NET_2_0 if (c < 33 || c > 126) { -#else - if (c > 127) { -#endif byte [] bIn = Encoding.UTF8.GetBytes (c.ToString ()); for (int i = 0; i < bIn.Length; i++) { result.WriteByte ((byte) '%'); diff --git a/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestCas.cs b/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestCas.cs index 2442428ab94..b7b27b12634 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestCas.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestCas.cs @@ -138,10 +138,8 @@ namespace MonoCasTests.System.Web { CasHttpWorkerRequest hwr = new CasHttpWorkerRequest (); Assert.IsNull (hwr.MachineConfigPath, "MachineConfigPath"); Assert.IsNull (hwr.MachineInstallDirectory, "MachineInstallDirectory"); -#if NET_2_0 Assert.IsNotNull (hwr.RequestTraceIdentifier, "RequestTraceIdentifier"); Assert.IsNull (hwr.RootWebConfigPath, "RootWebConfigPath"); -#endif } private void Callback (HttpWorkerRequest wr, object extraData) @@ -204,12 +202,10 @@ namespace MonoCasTests.System.Web { Assert.AreEqual (0, hwr.GetConnectionID (), "GetConnectionID"); Assert.AreEqual (0, hwr.GetUrlContextID (), "GetUrlContextID"); Assert.AreEqual (IntPtr.Zero, hwr.GetVirtualPathToken (), "GetVirtualPathToken"); -#if NET_2_0 Assert.AreEqual (0, hwr.GetPreloadedEntityBody (new byte[0], 0), "GetPreloadedEntityBody(byte[],int)"); Assert.AreEqual (0, hwr.GetPreloadedEntityBodyLength (), "GetPreloadedEntityBodyLength"); Assert.AreEqual (0, hwr.GetTotalEntityBodyLength (), "GetTotalEntityBodyLength"); Assert.AreEqual (0, hwr.ReadEntityBody (new byte[1], 0, 1), "ReadEntityBody(byte[],int,int)"); -#endif } [Test] diff --git a/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs b/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs index ee9dda1ece1..a4ad87d1f82 100644 --- a/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs +++ b/mcs/class/System.Web/Test/System.Web/HttpWorkerRequestTest.cs @@ -307,14 +307,12 @@ namespace MonoTests.System.Web { Assert.AreEqual (false, f.IsSecure (), "F34"); Assert.AreEqual (0, f.ReadEntityBody (null, Int32.MaxValue), "ReadEntityBody(byte[],int)"); -#if NET_2_0 Assert.AreEqual (Guid.Empty.ToString (), f.RequestTraceIdentifier.ToString (), "RequestTraceIdentifier"); Assert.IsNull (f.RootWebConfigPath, "RootWebConfigPath"); Assert.AreEqual (0, f.GetPreloadedEntityBody (null, Int32.MinValue), "GetPreloadedEntityBody(byte[],int)"); Assert.AreEqual (0, f.GetPreloadedEntityBodyLength (), "GetPreloadedEntityBodyLength"); Assert.AreEqual (0, f.GetTotalEntityBodyLength (), "GetTotalEntityBodyLength"); Assert.AreEqual (0, f.ReadEntityBody (null, 0, 0), "ReadEntityBody(byte[],int,int)"); -#endif } [Test] public void Test_GetKnownHeaderName () diff --git a/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs b/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs index ba0d8fe3800..58016f66a67 100644 --- a/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.cs +++ b/mcs/class/System.Web/Test/System.Web/SiteMapNodeTest.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.Collections.Generic; @@ -107,4 +106,3 @@ namespace MonoTests.System.Web } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/SiteMapProviderTest.cs b/mcs/class/System.Web/Test/System.Web/SiteMapProviderTest.cs index b1e7e1a3585..486b677a6c1 100644 --- a/mcs/class/System.Web/Test/System.Web/SiteMapProviderTest.cs +++ b/mcs/class/System.Web/Test/System.Web/SiteMapProviderTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Text; @@ -239,4 +238,3 @@ namespace MonoTests.System.Web { } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/StaticSiteMapProviderTest.cs b/mcs/class/System.Web/Test/System.Web/StaticSiteMapProviderTest.cs index 0d72d689873..b38ceb4c683 100644 --- a/mcs/class/System.Web/Test/System.Web/StaticSiteMapProviderTest.cs +++ b/mcs/class/System.Web/Test/System.Web/StaticSiteMapProviderTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Text; @@ -213,4 +212,3 @@ namespace MonoTests.System.Web { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/TraceContextCas.cs b/mcs/class/System.Web/Test/System.Web/TraceContextCas.cs index dc2d13f915f..415d9fe7a98 100644 --- a/mcs/class/System.Web/Test/System.Web/TraceContextCas.cs +++ b/mcs/class/System.Web/Test/System.Web/TraceContextCas.cs @@ -59,16 +59,12 @@ namespace MonoCasTests.System.Web { Assert.AreEqual (TraceMode.SortByTime, tc.TraceMode, "TraceMode"); tc.TraceMode = TraceMode.Default; -#if NET_2_0 tc.TraceFinished += new TraceContextEventHandler (Handler); tc.TraceFinished -= new TraceContextEventHandler (Handler); -#endif } -#if NET_2_0 private void Handler (object sender, TraceContextEventArgs e) { } -#endif [Test] [AspNetHostingPermission (SecurityAction.Deny, Level = AspNetHostingPermissionLevel.High)] [ExpectedException (typeof (SecurityException))] diff --git a/mcs/class/System.Web/Test/System.Web/TraceContextRecordTest.cs b/mcs/class/System.Web/Test/System.Web/TraceContextRecordTest.cs index 489cbaec5f2..700b6cf763c 100644 --- a/mcs/class/System.Web/Test/System.Web/TraceContextRecordTest.cs +++ b/mcs/class/System.Web/Test/System.Web/TraceContextRecordTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Text; using System.Web; @@ -70,4 +69,3 @@ namespace MonoTests.System.Web } } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs b/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs index 71e7580aa8b..a8b85f798f8 100644 --- a/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.cs +++ b/mcs/class/System.Web/Test/System.Web/VirtualPathUtilityTest.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.Web; @@ -914,7 +913,6 @@ namespace MonoTests.System.Web { } } -#endif diff --git a/mcs/class/System.Web/Test/System.Web/XmlSiteMapProviderTest.cs b/mcs/class/System.Web/Test/System.Web/XmlSiteMapProviderTest.cs index 0eae9bc5a9a..23487dacb07 100644 --- a/mcs/class/System.Web/Test/System.Web/XmlSiteMapProviderTest.cs +++ b/mcs/class/System.Web/Test/System.Web/XmlSiteMapProviderTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections.Generic; @@ -487,4 +486,3 @@ namespace MonoTests.System.Web } } } -#endif
\ No newline at end of file diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_SessionState/HttpSessionState/HttpSessionState_CodePage.aspx.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_SessionState/HttpSessionState/HttpSessionState_CodePage.aspx.cs index a4bd11b6866..7e88cf28d79 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_SessionState/HttpSessionState/HttpSessionState_CodePage.aspx.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_SessionState/HttpSessionState/HttpSessionState_CodePage.aspx.cs @@ -78,7 +78,6 @@ namespace GHTTests.System_Web_dll.System_Web_SessionState this.GHTSubTestAddResult(this.Session.CodePage.ToString()); this.GHTSubTestExpectedExceptionNotCaught("ArgumentException"); } -#if NET_2_0 catch (NotSupportedException exception7) { // ProjectData.SetProjectError(exception7); @@ -86,7 +85,6 @@ namespace GHTTests.System_Web_dll.System_Web_SessionState this.GHTSubTestExpectedExceptionCaught(exception2); // ProjectData.ClearProjectError(); } -#endif catch (ArgumentException exception7) { // ProjectData.SetProjectError(exception7); diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI/Control/Control_ViewState.aspx.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI/Control/Control_ViewState.aspx.cs index cf946d5e6bb..1d5b1f094b1 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI/Control/Control_ViewState.aspx.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI/Control/Control_ViewState.aspx.cs @@ -185,20 +185,10 @@ namespace GHTTests.System_Web_dll.System_Web_UI this.GHTSubTestAddResult(label1.Font.Bold.ToString()); } } -#if NET_2_0 catch (IndexOutOfRangeException exception52) { this.GHTSubTestAddResult("Test passed"); } -#else - catch (Exception exception52) - { - // ProjectData.SetProjectError(exception52); - Exception exception4 = exception52; - this.GHTSubTestAddResult("Unxpected " + exception4.GetType().Name + " exception was caught-" + exception4.Message); - // ProjectData.ClearProjectError(); - } -#endif this.GHTSubTestEnd(); this.GHTSubTestBegin("Control.Visible"); try diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/BaseDataList/BaseDataList_DataMember.aspx.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/BaseDataList/BaseDataList_DataMember.aspx.cs index 679d174188d..73faafecf17 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/BaseDataList/BaseDataList_DataMember.aspx.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/BaseDataList/BaseDataList_DataMember.aspx.cs @@ -89,28 +89,6 @@ namespace GHTTests.System_Web_dll.System_Web_UI_WebControls this.GHTSubTestUnexpectedExceptionCaught(exception4); } this.GHTSubTestEnd(); -#if !NET_2_0 - try - { - this.GHTSubTestBegin("BaseDataList_" + CtlType.Name + "_DataMember1"); - list1 = (BaseDataList) this.GHTElementClone(CtlType); - base.GHTActiveSubTest.Controls.Add(list1); - CtlBuilder(list1); - list1.DataSource = GHTDataListBase.GHTGetSampleDataSourceDS(); - list1.DataMember = "Unknown"; - list1.DataBind(); - this.GHTSubTestExpectedExceptionNotCaught("HttpException"); - } - catch (HttpException exception5) - { - this.GHTSubTestExpectedExceptionCaught(exception5); - } - catch (Exception exception6) - { - this.GHTSubTestUnexpectedExceptionCaught(exception6); - } - this.GHTSubTestEnd(); -#endif } } diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/Repeater/Repeater_DataMember.aspx.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/Repeater/Repeater_DataMember.aspx.cs index c2a7957af7f..978cb167642 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/Repeater/Repeater_DataMember.aspx.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/System_Web_UI_WebControls/Repeater/Repeater_DataMember.aspx.cs @@ -185,25 +185,6 @@ namespace GHTTests.System_Web_dll.System_Web_UI_WebControls { GHTSubTestUnexpectedExceptionCaught(ex); } -#if !NET_2_0 - GHTActiveSubTest = GHTSubTest9; - try - { - Repeater9.DataSource = GHTTests.GHDataSources.DSDataSet(); - Repeater9.DataMember = "NonExist"; - Repeater9.DataBind(); - GHTSubTestAddResult(Repeater9.DataMember); - GHTSubTestExpectedExceptionNotCaught("HttpException"); - } - catch (HttpException ex) - { - GHTSubTestExpectedExceptionCaught(ex); - } - catch (Exception ex) - { - GHTSubTestUnexpectedExceptionCaught(ex); - } -#endif GHTTestEnd(); } } diff --git a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/utils/GHTListControlBase.cs b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/utils/GHTListControlBase.cs index fc381cec876..4bc0d1514a6 100644 --- a/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/utils/GHTListControlBase.cs +++ b/mcs/class/System.Web/Test/mainsoft/MainsoftWebApp/utils/GHTListControlBase.cs @@ -167,25 +167,6 @@ namespace GHTTests #endregion #region "Non existing table in a dataset" -#if !NET_2_0 - GHTListContorlSubTestBegin(ctrlType, "Non existing table in a dataset"); - - try - { - m_lcToTest.DataSource = m_dsData; - m_lcToTest.DataMember = "not a table name"; - m_lcToTest.DataBind(); - GHTSubTestExpectedExceptionNotCaught("HttpException"); - } - catch (HttpException ex) - { - GHTSubTestExpectedExceptionCaught(ex); - } - catch (Exception ex) - { - GHTSubTestUnexpectedExceptionCaught(ex); - } -#endif #endregion #region "DataSource is not a dataset - set" GHTListContorlSubTestBegin(ctrlType, "DataSource is not a dataset"); @@ -251,12 +232,10 @@ namespace GHTTests m_lcToTest.DataBind(); GHTSubTestExpectedExceptionNotCaught("ArgumentException"); } -#if NET_2_0 catch (InvalidOperationException ex) { GHTSubTestExpectedExceptionCaught(ex); } -#endif catch (ArgumentException ex) { GHTSubTestExpectedExceptionCaught(ex); diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/CustomSection.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/CustomSection.cs index 0c6fb997994..5a29ec37dd2 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/CustomSection.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/CustomSection.cs @@ -1,6 +1,4 @@ -#if NET_2_0 - -using System; +using System; using System.Configuration; namespace MonoTests.SystemWeb.Framework @@ -57,5 +55,3 @@ namespace MonoTests.SystemWeb.Framework } } } - -#endif diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FakeMembershipProvider.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FakeMembershipProvider.cs index 3d1cbab4dfa..70ed7fbac83 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FakeMembershipProvider.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/FakeMembershipProvider.cs @@ -1,4 +1,3 @@ -#if NET_2_0 using System; using System.Web.Security; @@ -232,4 +231,3 @@ namespace MonoTests.SystemWeb.Framework } } -#endif diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Global.asax.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Global.asax.cs index 113eb039f45..ce2e521d6d1 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Global.asax.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Global.asax.cs @@ -4,7 +4,6 @@ namespace MainsoftWebApp { public partial class Global : System.Web.HttpApplication { -#if NET_2_0 protected void Application_Error (object sender, EventArgs e) { // Code that runs when an unhandled error occurs @@ -17,6 +16,5 @@ namespace MainsoftWebApp // Ensure the headers are sent MonoTests.SystemWeb.Framework.WebTest.CurrentTest.SendHeaders (); } -#endif } } diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageDelegates.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageDelegates.cs index 40a56f1d6b7..3d05f0856d1 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageDelegates.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageDelegates.cs @@ -21,7 +21,6 @@ namespace MonoTests.SystemWeb.Framework [Serializable] public struct PageDelegates { -#if NET_2_0 /// <summary> /// <see cref="Page.LoadComplete"/> event callback. /// </summary> @@ -46,7 +45,6 @@ namespace MonoTests.SystemWeb.Framework /// <see cref="Page.SaveStateComplete"/> event callback. /// </summary> public PageDelegate SaveStateComplete; -#endif /// <summary> /// <see cref="TemplateControl.CommitTransaction"/> event callback. /// </summary> diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs index 6bbaa24ed0f..b5a0f614894 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/PageInvoker.cs @@ -39,7 +39,6 @@ namespace MonoTests.SystemWeb.Framework set { _delegates = value; } } -#if NET_2_0 /// <summary> /// Create a new <see cref="PageInvoker"/> which Delegates contain the /// given callback for PreInit event. @@ -53,7 +52,6 @@ namespace MonoTests.SystemWeb.Framework PageInvoker pi = new PageInvoker (pd); return pi; } -#endif /// <summary> /// Create a new <see cref="PageInvoker"/> which Delegates contain the @@ -101,7 +99,6 @@ namespace MonoTests.SystemWeb.Framework _page = (Page) parameters[0]; -#if NET_2_0 OnPreInit (null, null); _page.LoadComplete += OnLoadComplete; @@ -109,7 +106,6 @@ namespace MonoTests.SystemWeb.Framework _page.PreRenderComplete += OnPreRenderComplete; _page.InitComplete += OnInitComplete; _page.SaveStateComplete += OnSaveStateComplete; -#endif _page.CommitTransaction += new EventHandler (OnCommitTransaction); _page.AbortTransaction += new EventHandler (OnAbortTransaction); _page.Error += new EventHandler (OnError); @@ -123,7 +119,6 @@ namespace MonoTests.SystemWeb.Framework #region Handlers -#if NET_2_0 /// <summary> /// This must be made private as soon as Mono allows using private methods for delegates /// </summary> @@ -178,7 +173,6 @@ namespace MonoTests.SystemWeb.Framework { Invoke (Delegates.SaveStateComplete); } -#endif /// <summary> /// This must be made private as soon as Mono allows using private methods for delegates /// </summary> diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Response.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Response.cs index 0527f560626..67ce0a973c3 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Response.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Response.cs @@ -20,9 +20,7 @@ namespace MonoTests.SystemWeb.Framework public string Body { get { return _body; } -#if NET_2_0 internal -#endif set { _body = value; } } @@ -32,9 +30,7 @@ namespace MonoTests.SystemWeb.Framework public HttpStatusCode StatusCode { get { return _statusCode; } -#if NET_2_0 internal -#endif set { _statusCode = value; } } @@ -44,9 +40,7 @@ namespace MonoTests.SystemWeb.Framework public string StatusDescription { get { return _statusDescription; } -#if NET_2_0 internal -#endif set { _statusDescription = value; } } } diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TestRoleProvider.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TestRoleProvider.cs index 7811a9c7a52..b8f8923ad40 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TestRoleProvider.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/TestRoleProvider.cs @@ -1,4 +1,3 @@ -#if NET_2_0 using System; using System.Collections.Specialized; @@ -80,4 +79,3 @@ namespace MonoTests.SystemWeb.Framework } } } -#endif diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/TestSiteMapProvider.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/TestSiteMapProvider.cs index 9cdf41cc998..b9ebaa7c93e 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/TestSiteMapProvider.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/Tests/TestSiteMapProvider.cs @@ -2,7 +2,6 @@ using System; using System.Collections.Specialized; using System.Web; -#if NET_2_0 namespace Tests { public class TestSiteMapProvider : StaticSiteMapProvider { object rootNodeLock = new object(); @@ -34,4 +33,3 @@ namespace Tests { } } } -#endif diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestLocal.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestLocal.cs index a05f6542701..9f2dcaf4b22 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestLocal.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestLocal.cs @@ -7,7 +7,6 @@ namespace MonoTests.SystemWeb.Framework static partial void CopyResourcesLocal () { Type myself = typeof (WebTest); -#if NET_2_0 CopyPrefixedResources (myself, "App_GlobalResources/", "App_GlobalResources"); CopyPrefixedResources (myself, "App_Code/", "App_Code"); #if DOTNET @@ -19,9 +18,6 @@ namespace MonoTests.SystemWeb.Framework CopyResource (myself, "Web.mono.config", "Web.config"); #endif #endif -#else - CopyResource (myself, "Web.mono.config.1.1", "Web.config"); -#endif } } } diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestResourcesSetupAttribute.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestResourcesSetupAttribute.cs index 4c132c2335b..4d67edae1e5 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestResourcesSetupAttribute.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/NunitWeb/WebTestResourcesSetupAttribute.cs @@ -79,17 +79,11 @@ namespace MonoTests.SystemWeb.Framework throw new InvalidOperationException ("Method '" + methodName + "' cannot be found in type '" + type + "'."); if (mi.IsAbstract || -#if NET_2_0 mi.IsGenericMethodDefinition || -#endif mi.ReturnType != typeof (void) || mi.GetParameters ().Length > 0) throw new InvalidOperationException ("Method '" + methodName + "' must return void and take no parameters."); -#if NET_2_0 ret = Delegate.CreateDelegate (typeof (SetupHandler), null, mi, false) as SetupHandler; -#else - ret = Delegate.CreateDelegate (typeof (SetupHandler), mi) as SetupHandler; -#endif if (ret == null) throw new InvalidOperationException ("Failed to create a delegate to method '" + methodName + "'."); diff --git a/mcs/class/System.Web/Test/mainsoft/NunitWeb/Test1/Class1.cs b/mcs/class/System.Web/Test/mainsoft/NunitWeb/Test1/Class1.cs index 4042792bb52..60fc651d1bb 100644 --- a/mcs/class/System.Web/Test/mainsoft/NunitWeb/Test1/Class1.cs +++ b/mcs/class/System.Web/Test/mainsoft/NunitWeb/Test1/Class1.cs @@ -21,7 +21,6 @@ namespace Test1 WebTest.Unload (); } -#if NET_2_0 [Test] public void RenderSiteMapPath () { @@ -69,7 +68,6 @@ namespace Test1 MasterPage mp = p.Master; Assert.IsNotNull (mp); } -#endif [Test] public void TestStyle () { @@ -100,13 +98,10 @@ namespace Test1 LiteralControl lcb = new LiteralControl ("aaa"); LiteralControl lce = new LiteralControl ("bbb"); p.Controls.Add (lcb); -#if NET_2_0 Menu menu = new Menu (); p.Controls.Add (menu); -#endif p.Controls.Add (lce); } -#if NET_2_0 [Test] public void TestSkin () { @@ -128,7 +123,6 @@ namespace Test1 string res = new WebTest ("MyPageWithTheme.aspx").Run (); Debug.WriteLine (res); } -#endif [Test] public void UnloadTest () { diff --git a/mcs/class/System.Web/Test/standalone/ihttpmodule/PrintModule.cs b/mcs/class/System.Web/Test/standalone/ihttpmodule/PrintModule.cs index a08b95f31cc..8c678b303e8 100644 --- a/mcs/class/System.Web/Test/standalone/ihttpmodule/PrintModule.cs +++ b/mcs/class/System.Web/Test/standalone/ihttpmodule/PrintModule.cs @@ -67,7 +67,6 @@ namespace Mono.Http.Modules app.ReleaseRequestState += new EventHandler (new X ("ReleaseRequestState").Hook); app.ResolveRequestCache += new EventHandler (new X ("ResolveRequestCache").Hook); app.UpdateRequestCache += new EventHandler (new X ("UpdateRequestCache").Hook); -#if NET_2_0 app.PostAuthenticateRequest += new EventHandler (new X ("PostAuthenticateRequest").Hook); app.PostAuthorizeRequest += new EventHandler (new X ("PostAuthorizeRequest").Hook); app.PostResolveRequestCache += new EventHandler (new X ("PostResolveRequestCache").Hook); @@ -75,7 +74,6 @@ namespace Mono.Http.Modules app.PostAcquireRequestState += new EventHandler (new X ("PostAcquireRequestState").Hook); app.PostReleaseRequestState += new EventHandler (new X ("PostReleaseRequestState").Hook); app.PostUpdateRequestCache += new EventHandler (new X ("PostUpdateRequestCache").Hook); -#endif } public void Dispose () diff --git a/mcs/class/System.Web/Test/standalone/sqlmembershipprovider/SqlMembershipProvider.cs b/mcs/class/System.Web/Test/standalone/sqlmembershipprovider/SqlMembershipProvider.cs index bba85b02f9f..aa1c511111f 100644 --- a/mcs/class/System.Web/Test/standalone/sqlmembershipprovider/SqlMembershipProvider.cs +++ b/mcs/class/System.Web/Test/standalone/sqlmembershipprovider/SqlMembershipProvider.cs @@ -29,7 +29,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; using System.Collections.Specialized; @@ -1791,5 +1790,3 @@ SELECT m.PasswordAnswer, m.PasswordFormat, m.PasswordSalt } } } -#endif - diff --git a/mcs/class/System.XML/System.Xml.Serialization.Configuration/DateTimeSerializationSection.cs b/mcs/class/System.XML/System.Xml.Serialization.Configuration/DateTimeSerializationSection.cs index f101a61b0e6..40521e1a5ce 100644 --- a/mcs/class/System.XML/System.Xml.Serialization.Configuration/DateTimeSerializationSection.cs +++ b/mcs/class/System.XML/System.Xml.Serialization.Configuration/DateTimeSerializationSection.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP using System; using System.Collections; using System.Configuration; diff --git a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElement.cs b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElement.cs index 8ca05b76b0c..78f959c082f 100644 --- a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElement.cs +++ b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElement.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP using System; using System.Collections; using System.ComponentModel; diff --git a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElementCollection.cs b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElementCollection.cs index 27a639ffffb..c07c0f00ccb 100644 --- a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElementCollection.cs +++ b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionElementCollection.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP using System; using System.Collections; using System.Configuration; diff --git a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionsSection.cs b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionsSection.cs index a0c50e78d62..e014ec70e53 100644 --- a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionsSection.cs +++ b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SchemaImporterExtensionsSection.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP using System; using System.Collections; using System.Configuration; diff --git a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SerializationSectionGroup.cs b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SerializationSectionGroup.cs index 0724be07565..85a14506a6c 100644 --- a/mcs/class/System.XML/System.Xml.Serialization.Configuration/SerializationSectionGroup.cs +++ b/mcs/class/System.XML/System.Xml.Serialization.Configuration/SerializationSectionGroup.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP using System; using System.Collections; using System.Configuration; diff --git a/mcs/class/System.XML/System.Xml.Serialization.Configuration/XmlSerializerSection.cs b/mcs/class/System.XML/System.Xml.Serialization.Configuration/XmlSerializerSection.cs index 632c190a234..9dc81f96781 100644 --- a/mcs/class/System.XML/System.Xml.Serialization.Configuration/XmlSerializerSection.cs +++ b/mcs/class/System.XML/System.Xml.Serialization.Configuration/XmlSerializerSection.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP using System; using System.Collections; using System.Configuration; diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs index 1b6e3f68487..6338a8dc14f 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlReflectionImporter.cs @@ -1086,10 +1086,6 @@ namespace System.Xml.Serialization { bool CanBeNull (TypeData type) { -#if !NET_2_0 // idiotic compatibility - if (type.Type == typeof (XmlQualifiedName)) - return false; -#endif return !type.Type.IsValueType || type.IsNullable; } diff --git a/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs b/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs index 9fe70aace54..892c5c9efee 100644 --- a/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs +++ b/mcs/class/System.XML/System.Xml.Serialization/XmlSchemaImporter.cs @@ -36,7 +36,7 @@ using System.CodeDom.Compiler; using System.Xml.Schema; using System.Collections; using System.Collections.Generic; -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP using System.Configuration; using System.Xml.Serialization.Configuration; #endif @@ -44,7 +44,7 @@ using System.Xml.Serialization.Configuration; namespace System.Xml.Serialization { public class XmlSchemaImporter -#if NET_2_0 && !MOBILE +#if !MOBILE : SchemaImporter #endif { @@ -161,7 +161,7 @@ namespace System.Xml.Serialization void InitializeExtensions () { -#if NET_2_0 && CONFIGURATION_DEP +#if CONFIGURATION_DEP SerializationSectionGroup root = ConfigurationManager.GetSection ("system.xml.serialization") as SerializationSectionGroup; if (root == null) return; diff --git a/mcs/class/System.XML/System.Xml/XmlConvert.cs b/mcs/class/System.XML/System.Xml/XmlConvert.cs index a73e593c871..19d5a9c76cd 100644 --- a/mcs/class/System.XML/System.Xml/XmlConvert.cs +++ b/mcs/class/System.XML/System.Xml/XmlConvert.cs @@ -773,7 +773,6 @@ namespace System.Xml { return bufIndex - offset; } -#if NET_2_0 // actually NET_3_5 public static DateTimeOffset ToDateTimeOffset (string s) { @@ -810,7 +809,6 @@ namespace System.Xml { return new Uri (s, UriKind.RelativeOrAbsolute); } -#endif public static bool IsNCNameChar (char ch) { diff --git a/mcs/class/System.XML/System.Xml/XmlDocument.cs b/mcs/class/System.XML/System.Xml/XmlDocument.cs index dd130686ef3..3969960081e 100644 --- a/mcs/class/System.XML/System.Xml/XmlDocument.cs +++ b/mcs/class/System.XML/System.Xml/XmlDocument.cs @@ -556,10 +556,8 @@ namespace System.Xml private XmlNodeType GetNodeTypeFromString (string nodeTypeString) { -#if NET_2_0 // actually should be done in any version if (nodeTypeString == null) throw new ArgumentNullException ("nodeTypeString"); -#endif switch (nodeTypeString) { case "attribute": return XmlNodeType.Attribute; case "cdatasection": return XmlNodeType.CDATA; diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs index 0d417787a49..bf839ac30dd 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaDatatypeTests.cs @@ -102,9 +102,6 @@ namespace MonoTests.System.Xml } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] -#endif public void AnyUriRelativePathContainsColon () { XmlValidatingReader vr = new XmlValidatingReader ( diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs index 127a21aea4e..a2ab173f3cb 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaSetTests.cs @@ -6,7 +6,6 @@ // // (C) 2004 Novell Inc. // -#if NET_2_0 using System; using System.Collections; @@ -316,4 +315,3 @@ type=""xsd:string"" use=""required""/> } } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs index 8ae833f9dcc..def753ac664 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs @@ -430,7 +430,6 @@ namespace MonoTests.System.Xml XmlSchema schema = GetSchema ("Test/XmlFiles/xsd/extension-attr-redefine-1.xsd"); -#if NET_2_0 XmlSchemaSet xss = new XmlSchemaSet (); xss.Add (schema); if (StrictMsCompliant) { @@ -450,23 +449,6 @@ namespace MonoTests.System.Xml settings.ValidationType = ValidationType.Schema; settings.Schemas = xss; XmlReader vr = XmlReader.Create (sr, settings); -#else - if (StrictMsCompliant) { - schema.Compile (null); - } else { - try { - schema.Compile (null); - Assert.Fail (); - } catch (XmlSchemaException) { - } - return; - } - - XmlValidatingReader vr = new XmlValidatingReader (xml, - XmlNodeType.Document, null); - vr.Schemas.Add (schema); - vr.ValidationType = ValidationType.Schema; -#endif try { vr.Read (); @@ -482,7 +464,6 @@ namespace MonoTests.System.Xml XmlSchema schema = GetSchema ("Test/XmlFiles/xsd/extension-attr-redefine-2.xsd"); -#if NET_2_0 XmlSchemaSet xss = new XmlSchemaSet (); xss.Add (schema); xss.Compile (); @@ -493,14 +474,6 @@ namespace MonoTests.System.Xml settings.ValidationType = ValidationType.Schema; settings.Schemas = xss; XmlReader vr = XmlReader.Create (sr, settings); -#else - schema.Compile (null); - - XmlValidatingReader vr = new XmlValidatingReader (xml, - XmlNodeType.Document, null); - vr.Schemas.Add (schema); - vr.ValidationType = ValidationType.Schema; -#endif while (vr.Read ()) ; } @@ -512,7 +485,6 @@ namespace MonoTests.System.Xml XmlSchema schema = GetSchema ("Test/XmlFiles/xsd/extension-attr-redefine-3.xsd"); -#if NET_2_0 XmlSchemaSet xss = new XmlSchemaSet (); xss.Add (schema); if (StrictMsCompliant) { @@ -532,28 +504,10 @@ namespace MonoTests.System.Xml settings.ValidationType = ValidationType.Schema; settings.Schemas = xss; XmlReader vr = XmlReader.Create (sr, settings); -#else - if (StrictMsCompliant) { - schema.Compile (null); - } else { - try { - schema.Compile (null); - Assert.Fail (); - } catch (XmlSchemaException) { - } - return; - } - - XmlValidatingReader vr = new XmlValidatingReader (xml, - XmlNodeType.Document, null); - vr.Schemas.Add (schema); - vr.ValidationType = ValidationType.Schema; -#endif while (vr.Read ()) ; } -#if NET_2_0 internal class XmlTestResolver : XmlResolver { @@ -627,7 +581,6 @@ namespace MonoTests.System.Xml // Parse the file. while (reader.Read()) {} } -#endif [Test] public void TestImportSchemaThatIncludesAnother () diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTypeTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTypeTests.cs index f97b6bddc44..52601d61ab9 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTypeTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTypeTests.cs @@ -24,7 +24,6 @@ namespace MonoTests.System.Xml [TestFixture] public class XmlSchemaTypeTests { -#if NET_2_0 string [] all_types = new string [] { "string", "boolean", "float", "double", "decimal", "duration", "dateTime", "time", "date", "gYearMonth", @@ -96,6 +95,5 @@ namespace MonoTests.System.Xml } } -#endif } } diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs index 081f2c76d47..8c5d01cd9bf 100755 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaValidatorTests.cs @@ -7,7 +7,6 @@ // (C) 2008 Novell Inc. // -#if NET_2_0 using System; using System.Collections; @@ -454,4 +453,3 @@ namespace MonoTests.System.Xml } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml.Schema/standalone_tests/xsdtest.cs b/mcs/class/System.XML/Test/System.Xml.Schema/standalone_tests/xsdtest.cs index 1c1fb8ac470..01c1313f8c5 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/standalone_tests/xsdtest.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/standalone_tests/xsdtest.cs @@ -173,7 +173,6 @@ USAGE: mono xsdtest.exe options target-pattern XmlTextReader ixtr = new XmlTextReader (
Path.Combine (basePath, instanceFile));
xvr = ixtr;
-#if NET_2_0
if (version2) {
XmlReaderSettings settings =
new XmlReaderSettings ();
@@ -188,7 +187,6 @@ USAGE: mono xsdtest.exe options target-pattern settings.XmlResolver = null;
xvr = XmlReader.Create (ixtr, settings);
} else {
-#endif
XmlValidatingReader vr = new XmlValidatingReader (ixtr);
if (noResolver)
vr.XmlResolver = null;
@@ -196,9 +194,7 @@ USAGE: mono xsdtest.exe options target-pattern vr.ValidationEventHandler += noValidateHandler;
vr.Schemas.Add (schema);
xvr = vr;
-#if NET_2_0
}
-#endif
while (!xvr.EOF)
xvr.Read ();
if (!isValidInstance && !noValidate)
diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/CodeIdentifiersTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/CodeIdentifiersTests.cs index 8773f6c7ca9..9153ae7016a 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/CodeIdentifiersTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/CodeIdentifiersTests.cs @@ -40,7 +40,6 @@ namespace MonoTests.System.XmlSerialization [TestFixture] public class CodeIdentifiersTests { -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentException))] public void IgnoreCase () @@ -52,6 +51,5 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (c.IsInUse ("tEsT"), "#2"); Assert.AreEqual ("camelCase", c.MakeRightCase ("CAMELCASE"), "#3"); } -#endif } } diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/DeserializeTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/DeserializeTests.cs index daadbdf3fa2..7c4295f4554 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/DeserializeTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/DeserializeTests.cs @@ -280,7 +280,6 @@ namespace MonoTests.System.XmlSerialization #region GenericsDeseralizationTests -#if NET_2_0 [Test] public void TestDeserializeGenSimpleClassString () { @@ -512,7 +511,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual ("six", complex.nestedinner.inner); Assert.AreEqual (6, complex.nestedinner.something); } -#endif #endregion //GenericsDeseralizationTests diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapAttributesTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapAttributesTests.cs index 7910ff2d06e..88bf4a643de 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapAttributesTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapAttributesTests.cs @@ -20,11 +20,9 @@ namespace MonoTests.System.XmlSerialization public class SoapAttributesTests { [Test] -#if NET_2_0 // in .NET 2.0, SoapDefaultValue should be null by default, but we need // more tests before making this change [Category ("NotDotNet")] -#endif public void Defaults () { SoapAttributes atts = new SoapAttributes (); diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapReflectionImporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapReflectionImporterTests.cs index b6c92dcddbe..4ee21b80aee 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapReflectionImporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapReflectionImporterTests.cs @@ -95,21 +95,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (int[])); Assert.AreEqual ("ArrayOfInt", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfInt32", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Int32[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Int32[]", tm.TypeFullName, "#A4"); tm = Map (typeof (int[][])); Assert.AreEqual ("ArrayOfArrayOfInt", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfInt32", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Int32[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Int32[][]", tm.TypeFullName, "#B4"); } @@ -144,21 +136,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (string[])); Assert.AreEqual ("ArrayOfString", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfString", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("String[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.String[]", tm.TypeFullName, "#A4"); tm = Map (typeof (string[][])); Assert.AreEqual ("ArrayOfArrayOfString", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfString", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("String[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.String[][]", tm.TypeFullName, "#B4"); } @@ -193,21 +177,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (object[])); Assert.AreEqual ("ArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfObject", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Object[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Object[]", tm.TypeFullName, "#A4"); tm = Map (typeof (object[][])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfObject", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Object[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Object[][]", tm.TypeFullName, "#B4"); } @@ -248,11 +224,7 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (byte[][])); Assert.AreEqual ("ArrayOfBase64Binary", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfByte", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Byte[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Byte[][]", tm.TypeFullName, "#B4"); } @@ -479,21 +451,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (DateTime[])); Assert.AreEqual ("ArrayOfDateTime", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfDateTime", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("DateTime[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.DateTime[]", tm.TypeFullName, "#A4"); tm = Map (typeof (DateTime[][])); Assert.AreEqual ("ArrayOfArrayOfDateTime", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfDateTime", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("DateTime[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.DateTime[][]", tm.TypeFullName, "#B4"); } @@ -528,21 +492,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (Guid[])); Assert.AreEqual ("ArrayOfGuid", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfGuid", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Guid[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Guid[]", tm.TypeFullName, "#A4"); tm = Map (typeof (Guid[][])); Assert.AreEqual ("ArrayOfArrayOfGuid", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfGuid", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Guid[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Guid[][]", tm.TypeFullName, "#B4"); } @@ -601,21 +557,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (XmlQualifiedName[])); Assert.AreEqual ("ArrayOfQName", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfXmlQualifiedName", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("XmlQualifiedName[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Xml.XmlQualifiedName[]", tm.TypeFullName, "#A4"); tm = Map (typeof (XmlQualifiedName[][])); Assert.AreEqual ("ArrayOfArrayOfQName", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfXmlQualifiedName", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("XmlQualifiedName[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Xml.XmlQualifiedName[][]", tm.TypeFullName, "#B4"); } @@ -650,21 +598,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (sbyte[])); Assert.AreEqual ("ArrayOfByte", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSByte", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SByte[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.SByte[]", tm.TypeFullName, "#A4"); tm = Map (typeof (sbyte[][])); Assert.AreEqual ("ArrayOfArrayOfByte", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSByte", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SByte[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.SByte[][]", tm.TypeFullName, "#B4"); } @@ -699,21 +639,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (char[])); Assert.AreEqual ("ArrayOfChar", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfChar", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Char[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Char[]", tm.TypeFullName, "#A4"); tm = Map (typeof (char[][])); Assert.AreEqual ("ArrayOfArrayOfChar", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfChar", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Char[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Char[][]", tm.TypeFullName, "#B4"); } @@ -966,21 +898,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (AttributeTargets[])); Assert.AreEqual ("ArrayOfAttributeTargets", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfAttributeTargets", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("AttributeTargets[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.AttributeTargets[]", tm.TypeFullName, "#A4"); tm = Map (typeof (AttributeTargets[][])); Assert.AreEqual ("ArrayOfArrayOfAttributeTargets", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfAttributeTargets", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("AttributeTargets[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.AttributeTargets[][]", tm.TypeFullName, "#B4"); } @@ -1015,21 +939,13 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (SimpleClass[])); Assert.AreEqual ("ArrayOfSimpleClass", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClass", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClass[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.Xml.TestClasses.SimpleClass[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClass[][])); Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClass[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.Xml.TestClasses.SimpleClass[][]", tm.TypeFullName, "#B4"); } @@ -1139,21 +1055,13 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassEnumerable[])); Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassEnumerable", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassEnumerable[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassEnumerable[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassEnumerable[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClass", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassEnumerable", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassEnumerable[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassEnumerable[][]", tm.TypeFullName, "#B4"); } @@ -1170,21 +1078,13 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (ObjectEnumerable[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfObjectEnumerable", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("ObjectEnumerable[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.ObjectEnumerable[]", tm.TypeFullName, "#A4"); tm = Map (typeof (ObjectEnumerable[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfObjectEnumerable", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("ObjectEnumerable[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.ObjectEnumerable[][]", tm.TypeFullName, "#B4"); } @@ -1215,21 +1115,13 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassEnumerablePrivateCurrent[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassEnumerablePrivateCurrent", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateCurrent[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassEnumerablePrivateCurrent[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassEnumerablePrivateCurrent[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassEnumerablePrivateCurrent", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateCurrent[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassEnumerablePrivateCurrent[][]", tm.TypeFullName, "#B4"); } @@ -1249,21 +1141,13 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassEnumerablePrivateGetEnumerator[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassEnumerablePrivateGetEnumerator", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateGetEnumerator[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassEnumerablePrivateGetEnumerator[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassEnumerablePrivateGetEnumerator[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassEnumerablePrivateGetEnumerator", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateGetEnumerator[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassEnumerablePrivateGetEnumerator[][]", tm.TypeFullName, "#B4"); } @@ -1308,21 +1192,13 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassCollection[])); Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassCollection", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassCollection[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassCollection[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassCollection[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClass", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassCollection", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassCollection[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.SimpleClassCollection[][]", tm.TypeFullName, "#B4"); } @@ -1339,21 +1215,13 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (ObjectCollection[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfObjectCollection", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("ObjectCollection[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.ObjectCollection[]", tm.TypeFullName, "#A4"); tm = Map (typeof (ObjectCollection[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfObjectCollection", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("ObjectCollection[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.SoapReflectionImporterTests.ObjectCollection[][]", tm.TypeFullName, "#B4"); } diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs index b1c7597c150..41109b2ae94 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs @@ -68,11 +68,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSTimeSpan\" elementFormDefault=\"qualified\" targetNamespace=\"NSTimeSpan\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSTimeSpan\" targetNamespace=\"NSTimeSpan\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"TimeSpan\" />{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); @@ -84,11 +80,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema elementFormDefault=\"qualified\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"TimeSpan\" />{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#4"); } @@ -118,18 +110,10 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSSimpleClass\" elementFormDefault=\"qualified\" targetNamespace=\"NSSimpleClass\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSSimpleClass\" targetNamespace=\"NSSimpleClass\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"SimpleClass\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"saying\" nillable=\"true\" type=\"xs:string\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"saying\" type=\"xs:string\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); @@ -147,11 +131,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSStringCollection\" elementFormDefault=\"qualified\" targetNamespace=\"NSStringCollection\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSStringCollection\" targetNamespace=\"NSStringCollection\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"ArrayOfString\">{0}" + @@ -176,20 +156,12 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSStringCollectionContainer\" elementFormDefault=\"qualified\" targetNamespace=\"NSStringCollectionContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSStringCollectionContainer\" targetNamespace=\"NSStringCollectionContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"StringCollectionContainer\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"Messages\" type=\"tns:ArrayOfString\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Messages\" type=\"tns:ArrayOfString\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfString\">{0}" + @@ -214,20 +186,12 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSArrayContainer\" elementFormDefault=\"qualified\" targetNamespace=\"NSArrayContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSArrayContainer\" targetNamespace=\"NSArrayContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"ArrayContainer\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"items\" type=\"tns:ArrayOfAnyType\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"items\" type=\"tns:ArrayOfAnyType\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfAnyType\">{0}" + @@ -252,20 +216,12 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSClassArrayContainer\" elementFormDefault=\"qualified\" targetNamespace=\"NSClassArrayContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSClassArrayContainer\" targetNamespace=\"NSClassArrayContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"ClassArrayContainer\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"items\" type=\"tns:ArrayOfSimpleClass\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"items\" type=\"tns:ArrayOfSimpleClass\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfSimpleClass\">{0}" + @@ -277,11 +233,7 @@ namespace MonoTests.System.XmlSerialization " </xs:complexType>{0}" + " <xs:complexType name=\"SimpleClass\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"something\" type=\"xs:string\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"something\" type=\"xs:string\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); @@ -299,18 +251,10 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSSimpleClassWithXmlAttributes\" elementFormDefault=\"qualified\" targetNamespace=\"NSSimpleClassWithXmlAttributes\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSSimpleClassWithXmlAttributes\" targetNamespace=\"NSSimpleClassWithXmlAttributes\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"SimpleClassWithXmlAttributes\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"something\" type=\"xs:string\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"something\" type=\"xs:string\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); @@ -328,16 +272,11 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSField\" elementFormDefault=\"qualified\" targetNamespace=\"NSField\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSField\" targetNamespace=\"NSField\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"Field\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"Flags1\" type=\"tns:FlagEnum\" />{0}" + " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"Flags2\" type=\"tns:FlagEnum\" />{0}" + " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"Flags3\" type=\"tns:FlagEnum\" />{0}" + @@ -349,19 +288,6 @@ namespace MonoTests.System.XmlSerialization " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"Modifiers5\" type=\"tns:MapModifiers\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"Names\" type=\"tns:ArrayOfString\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"Street\" type=\"xs:string\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Flags1\" type=\"tns:FlagEnum\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Flags2\" type=\"tns:FlagEnum\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Flags3\" type=\"tns:FlagEnum\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Flags4\" type=\"tns:FlagEnum\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Modifiers\" type=\"tns:MapModifiers\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Modifiers2\" type=\"tns:MapModifiers\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Modifiers3\" type=\"tns:MapModifiers\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Modifiers4\" type=\"tns:MapModifiers\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Modifiers5\" type=\"tns:MapModifiers\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Names\" type=\"tns:ArrayOfString\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Street\" type=\"xs:string\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:simpleType name=\"FlagEnum\">{0}" + @@ -407,11 +333,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSMyList\" elementFormDefault=\"qualified\" targetNamespace=\"NSMyList\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSMyList\" targetNamespace=\"NSMyList\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"ArrayOfAnyType\">{0}" + @@ -436,20 +358,12 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSContainer\" elementFormDefault=\"qualified\" targetNamespace=\"NSContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSContainer\" targetNamespace=\"NSContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"Container\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"Items\" type=\"tns:ArrayOfAnyType\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Items\" type=\"tns:ArrayOfAnyType\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfAnyType\">{0}" + @@ -474,20 +388,12 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSContainer2\" elementFormDefault=\"qualified\" targetNamespace=\"NSContainer2\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSContainer2\" targetNamespace=\"NSContainer2\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"Container2\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"Items\" type=\"tns:ArrayOfAnyType\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Items\" type=\"tns:ArrayOfAnyType\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfAnyType\">{0}" + @@ -535,20 +441,11 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSChoices\" elementFormDefault=\"qualified\" targetNamespace=\"NSChoices\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSChoices\" targetNamespace=\"NSChoices\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"Choices\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"MyChoice\" type=\"xs:string\" />{0}" + " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"ItemType\" type=\"tns:ItemChoiceType\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"MyChoice\" type=\"xs:string\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ItemType\" type=\"tns:ItemChoiceType\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:simpleType name=\"ItemChoiceType\">{0}" + @@ -573,20 +470,11 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSWrongChoices\" elementFormDefault=\"qualified\" targetNamespace=\"NSWrongChoices\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSWrongChoices\" targetNamespace=\"NSWrongChoices\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"WrongChoices\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"MyChoice\" type=\"xs:string\" />{0}" + " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"ItemType\" type=\"tns:ItemChoiceType\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"MyChoice\" type=\"xs:string\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ItemType\" type=\"tns:ItemChoiceType\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:simpleType name=\"ItemChoiceType\">{0}" + @@ -611,23 +499,11 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSTestSpace\" elementFormDefault=\"qualified\" targetNamespace=\"NSTestSpace\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSTestSpace\" targetNamespace=\"NSTestSpace\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"TestSpace\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"elem\" type=\"xs:int\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"elem\" type=\"xs:int\" />{0}" + -#endif -#if NET_2_0 " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"attr\" type=\"xs:int\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"attr\" type=\"xs:int\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); @@ -645,11 +521,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSReadOnlyProperties\" elementFormDefault=\"qualified\" targetNamespace=\"NSReadOnlyProperties\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSReadOnlyProperties\" targetNamespace=\"NSReadOnlyProperties\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"ReadOnlyProperties\" />{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); } @@ -666,30 +538,17 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSListDefaults\" elementFormDefault=\"qualified\" targetNamespace=\"NSListDefaults\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSListDefaults\" targetNamespace=\"NSListDefaults\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"ListDefaults\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"list2\" type=\"tns:ArrayOfAnyType\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"list3\" type=\"tns:ArrayOfAnyType\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"list4\" type=\"tns:ArrayOfString\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"list5\" type=\"tns:ArrayOfAnyType\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"ed\" type=\"tns:SimpleClass\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"str\" type=\"xs:string\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"list2\" type=\"tns:ArrayOfAnyType\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"list3\" type=\"tns:ArrayOfAnyType\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"list4\" type=\"tns:ArrayOfString\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"list5\" type=\"tns:ArrayOfAnyType\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"ed\" type=\"tns:SimpleClass\" />{0}" + - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"str\" type=\"xs:string\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfAnyType\">{0}" + @@ -701,11 +560,7 @@ namespace MonoTests.System.XmlSerialization " </xs:complexType>{0}" + " <xs:complexType name=\"SimpleClass\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"something\" type=\"xs:string\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"something\" type=\"xs:string\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfString\">{0}" + @@ -730,20 +585,12 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSClsPerson\" elementFormDefault=\"qualified\" targetNamespace=\"NSClsPerson\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSClsPerson\" targetNamespace=\"NSClsPerson\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"clsPerson\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"EmailAccounts\" type=\"tns:ArrayOfAnyType\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"EmailAccounts\" type=\"tns:ArrayOfAnyType\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:complexType name=\"ArrayOfAnyType\">{0}" + @@ -768,18 +615,10 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSArrayClass\" elementFormDefault=\"qualified\" targetNamespace=\"NSArrayClass\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSArrayClass\" targetNamespace=\"NSArrayClass\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"ArrayClass\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"names\" type=\"xs:anyType\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"names\" type=\"xs:anyType\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#4"); @@ -797,18 +636,10 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSStructContainer\" elementFormDefault=\"qualified\" targetNamespace=\"NSStructContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSStructContainer\" targetNamespace=\"NSStructContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:complexType name=\"StructContainer\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"1\" maxOccurs=\"1\" form=\"unqualified\" name=\"Value\" type=\"tns:EnumDefaultValue\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"Value\" type=\"tns:EnumDefaultValue\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + " <xs:simpleType name=\"EnumDefaultValue\">{0}" + @@ -855,11 +686,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSSimpleClassArray\" elementFormDefault=\"qualified\" targetNamespace=\"NSSimpleClassArray\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSSimpleClassArray\" targetNamespace=\"NSSimpleClassArray\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"ArrayOfSimpleClass\">{0}" + @@ -871,11 +698,7 @@ namespace MonoTests.System.XmlSerialization " </xs:complexType>{0}" + " <xs:complexType name=\"SimpleClass\">{0}" + " <xs:sequence>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" form=\"unqualified\" name=\"saying\" nillable=\"true\" type=\"xs:string\" />{0}" + -#else - " <xs:element minOccurs=\"1\" maxOccurs=\"1\" name=\"saying\" type=\"xs:string\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); @@ -893,11 +716,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSEnumDefaultValue\" elementFormDefault=\"qualified\" targetNamespace=\"NSEnumDefaultValue\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSEnumDefaultValue\" targetNamespace=\"NSEnumDefaultValue\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:simpleType name=\"EnumDefaultValue\">{0}" + " <xs:list>{0}" + " <xs:simpleType>{0}" + @@ -919,11 +738,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"NSEnumDefaultValueNF\" elementFormDefault=\"qualified\" targetNamespace=\"NSEnumDefaultValueNF\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"NSEnumDefaultValueNF\" targetNamespace=\"NSEnumDefaultValueNF\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:simpleType name=\"EnumDefaultValueNF\">{0}" + " <xs:restriction base=\"xs:string\">{0}" + " <xs:enumeration value=\"e1\" />{0}" + @@ -953,11 +768,7 @@ namespace MonoTests.System.XmlSerialization types.Add (new TypeDescription (typeof (uint), true, "unsignedInt", "UnsignedInt")); types.Add (new TypeDescription (typeof (ulong), true, "unsignedLong", "UnsignedLong")); types.Add (new TypeDescription (typeof (DateTime), true, "dateTime", "DateTime")); -#if NET_2_0 types.Add (new TypeDescription (typeof (XmlQualifiedName), true, "QName", "QName", true)); -#else - types.Add (new TypeDescription (typeof (XmlQualifiedName), true, "QName", "QName")); -#endif types.Add (new TypeDescription (typeof (string), true, "string", "String", true)); foreach (TypeDescription typeDesc in types) { @@ -992,11 +803,7 @@ namespace MonoTests.System.XmlSerialization types.Add (new TypeDescription (typeof (uint[]), true, "unsignedInt", "UnsignedInt")); types.Add (new TypeDescription (typeof (ulong[]), true, "unsignedLong", "UnsignedLong")); types.Add (new TypeDescription (typeof (DateTime[]), true, "dateTime", "DateTime")); -#if NET_2_0 types.Add (new TypeDescription (typeof (XmlQualifiedName[]), true, "QName", "QName", true)); -#else - types.Add (new TypeDescription (typeof (XmlQualifiedName[]), true, "QName", "QName")); -#endif types.Add (new TypeDescription (typeof (string[]), true, "string", "String", true)); foreach (TypeDescription typeDesc in types) { @@ -1008,11 +815,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"{1}\" elementFormDefault=\"qualified\" targetNamespace=\"{1}\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"{1}\" targetNamespace=\"{1}\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:import namespace=\"http://schemas.xmlsoap.org/soap/encoding/\" />{0}" + " <xs:import namespace=\"http://schemas.xmlsoap.org/wsdl/\" />{0}" + " <xs:complexType name=\"ArrayOf{2}\">{0}" + @@ -1040,11 +843,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"http://microsoft.com/wsdl/types/\" elementFormDefault=\"qualified\" targetNamespace=\"http://microsoft.com/wsdl/types/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"http://microsoft.com/wsdl/types/\" targetNamespace=\"http://microsoft.com/wsdl/types/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:simpleType name=\"guid\">{0}" + " <xs:restriction base=\"xs:string\">{0}" + " <xs:pattern value=\"[0-9a-fA-F]{{8}}-[0-9a-fA-F]{{4}}-[0-9a-fA-F]{{4}}-[0-9a-fA-F]{{4}}-[0-9a-fA-F]{{12}}\" />{0}" + @@ -1065,11 +864,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + -#if NET_2_0 "<xs:schema xmlns:tns=\"http://microsoft.com/wsdl/types/\" elementFormDefault=\"qualified\" targetNamespace=\"http://microsoft.com/wsdl/types/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#else - "<xs:schema xmlns:tns=\"http://microsoft.com/wsdl/types/\" targetNamespace=\"http://microsoft.com/wsdl/types/\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#endif " <xs:simpleType name=\"char\">{0}" + " <xs:restriction base=\"xs:unsignedShort\" />{0}" + " </xs:simpleType>{0}" + @@ -1162,4 +957,4 @@ namespace MonoTests.System.XmlSerialization } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs index 91f0ed1d282..661273a3bf7 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs @@ -16,9 +16,7 @@ using System.CodeDom.Compiler; using System.Collections; using System.Globalization; using System.IO; -#if NET_2_0 using System.Reflection; -#endif using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; @@ -48,7 +46,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format(CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -68,14 +65,6 @@ namespace MonoTests.System.XmlSerialization " }}{0}" + " }}{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=true)]{0}" + - "public class ArrayClass {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public object names;{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif codeNamespace = ExportCode (typeof (ArrayClass[])); @@ -87,7 +76,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -106,13 +94,6 @@ namespace MonoTests.System.XmlSerialization " }}{0}" + " }}{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#4"); -#else - "public class ArrayClass {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public object names;{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#4"); -#endif } [Test] @@ -129,7 +110,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -149,14 +129,6 @@ namespace MonoTests.System.XmlSerialization " }}{0}" + " }}{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=true)]{0}" + - "public class ArrayContainer {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public object[] items;{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -173,7 +145,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -193,14 +164,6 @@ namespace MonoTests.System.XmlSerialization " }}{0}" + " }}{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=true)]{0}" + - "public class CDataContainer {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public System.Xml.XmlCDataSection cdata;{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -219,7 +182,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -243,18 +205,6 @@ namespace MonoTests.System.XmlSerialization " }}{0}" + " }}{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=true)]{0}" + - "public class Choices {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlElementAttribute(\"ChoiceZero\", typeof(string))]{0}" + - " [System.Xml.Serialization.XmlElementAttribute(\"ChoiceTwo\", typeof(string))]{0}" + - " [System.Xml.Serialization.XmlElementAttribute(\"ChoiceOne\", typeof(string))]{0}" + - " [System.Xml.Serialization.XmlChoiceIdentifierAttribute(\"ItemType\")]{0}" + - " public string MyChoice;{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -272,7 +222,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -431,68 +380,12 @@ namespace MonoTests.System.XmlSerialization " this.streetField = value;{0}" + " }}{0}" + " }}{0}" + -#else - "[System.Xml.Serialization.XmlRootAttribute(\"field\", Namespace=\"\", IsNullable=true)]{0}" + - "public class Field {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"flag1\")]{0}" + - " [System.ComponentModel.DefaultValueAttribute(MonoTests.System.Xml.TestClasses.FlagEnum.e1)]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum Flags1 = MonoTests.System.Xml.TestClasses.FlagEnum.e1;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"flag2\")]{0}" + - " [System.ComponentModel.DefaultValueAttribute(MonoTests.System.Xml.TestClasses.FlagEnum.e1)]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum Flags2 = MonoTests.System.Xml.TestClasses.FlagEnum.e1;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"flag3\", Form=System.Xml.Schema.XmlSchemaForm.Qualified)]{0}" + - " [System.ComponentModel.DefaultValueAttribute((MonoTests.System.Xml.TestClasses.FlagEnum.e1 | MonoTests.System.Xml.TestClasses.FlagEnum.e2))]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum Flags3 = (MonoTests.System.Xml.TestClasses.FlagEnum.e1 | MonoTests.System.Xml.TestClasses.FlagEnum.e2);{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"flag4\")]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum Flags4;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"modifiers\")]{0}" + - " public MonoTests.System.Xml.TestClasses.MapModifiers Modifiers;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"modifiers2\")]{0}" + - " public MonoTests.System.Xml.TestClasses.MapModifiers Modifiers2;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"modifiers3\")]{0}" + - " [System.ComponentModel.DefaultValueAttribute(MonoTests.System.Xml.TestClasses.MapModifiers.Public)]{0}" + - " public MonoTests.System.Xml.TestClasses.MapModifiers Modifiers3 = MonoTests.System.Xml.TestClasses.MapModifiers.Public;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"modifiers4\")]{0}" + - " [System.ComponentModel.DefaultValueAttribute(MonoTests.System.Xml.TestClasses.MapModifiers.Protected)]{0}" + - " public MonoTests.System.Xml.TestClasses.MapModifiers Modifiers4 = MonoTests.System.Xml.TestClasses.MapModifiers.Protected;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"modifiers5\", Form=System.Xml.Schema.XmlSchemaForm.Qualified)]{0}" + - " [System.ComponentModel.DefaultValueAttribute(MonoTests.System.Xml.TestClasses.MapModifiers.Public)]{0}" + - " public MonoTests.System.Xml.TestClasses.MapModifiers Modifiers5 = MonoTests.System.Xml.TestClasses.MapModifiers.Public;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"names\")]{0}" + - " public string[] Names;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"street\")]{0}" + - " public string Street;{0}" + -#endif "}}{0}" + "{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + -#endif "public enum FlagEnum {{{0}" + " {0}" + " /// <remarks/>{0}" + @@ -510,10 +403,8 @@ namespace MonoTests.System.XmlSerialization "{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + -#endif "public enum MapModifiers {{{0}" + " {0}" + " /// <remarks/>{0}" + @@ -523,11 +414,7 @@ namespace MonoTests.System.XmlSerialization " /// <remarks/>{0}" + " [System.Xml.Serialization.XmlEnumAttribute(\"protected\")]{0}" + " Protected = 2,{0}" + -#if NET_2_0 "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -544,10 +431,8 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + -#endif "[System.Xml.Serialization.XmlTypeAttribute(IncludeInSchema=false)]{0}" + "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=false)]{0}" + "public enum ItemChoiceType {{{0}" + @@ -561,11 +446,7 @@ namespace MonoTests.System.XmlSerialization " {0}" + " /// <remarks/>{0}" + " ChoiceTwo,{0}" + -#if NET_2_0 "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif codeNamespace = ExportCode (typeof (ItemChoiceType[])); Assert.IsNotNull (codeNamespace, "#3"); @@ -576,10 +457,8 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + -#endif "[System.Xml.Serialization.XmlTypeAttribute(IncludeInSchema=false)]{0}" + "public enum ItemChoiceType {{{0}" + " {0}" + @@ -592,11 +471,7 @@ namespace MonoTests.System.XmlSerialization " {0}" + " /// <remarks/>{0}" + " ChoiceTwo,{0}" + -#if NET_2_0 "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#4"); -#else - "}}{0}", Environment.NewLine), sw.ToString (), "#4"); -#endif } [Test] @@ -613,7 +488,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -653,21 +527,6 @@ namespace MonoTests.System.XmlSerialization " }}{0}" + " }}{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=true)]{0}" + - "public class ClassArrayContainer {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public MonoTests.System.Xml.TestClasses.SimpleClass[] items;{0}" + - "}}{0}" + - "{0}" + - "/// <remarks/>{0}" + - "public class SimpleClass {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public string something;{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -685,7 +544,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -962,130 +820,6 @@ namespace MonoTests.System.XmlSerialization " /// <remarks/>{0}" + " e4 = 4,{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"urn:aNS\")]{0}" + - "[System.Xml.Serialization.XmlRootAttribute(\"root\", Namespace=\"urn:aNS\", IsNullable=false)]{0}" + - "public class Root {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public MonoTests.System.Xml.TestClasses.OptionalValueTypeContainer OptionalValue;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public MonoTests.System.Xml.TestClasses.TestDefault Default;{0}" + - "}}{0}" + - "{0}" + - "/// <remarks/>{0}" + - "[System.Xml.Serialization.XmlTypeAttribute(TypeName=\"optionalValueType\", Namespace=\"some:urn\")]{0}" + - "public class OptionalValueTypeContainer {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute((MonoTests.System.Xml.TestClasses.FlagEnum.e1 | MonoTests.System.Xml.TestClasses.FlagEnum.e4))]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum Attributes = (MonoTests.System.Xml.TestClasses.FlagEnum.e1 | MonoTests.System.Xml.TestClasses.FlagEnum.e4);{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute(MonoTests.System.Xml.TestClasses.FlagEnum.e1)]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum Flags = MonoTests.System.Xml.TestClasses.FlagEnum.e1;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlIgnoreAttribute()]{0}" + - " public bool FlagsSpecified;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute(false)]{0}" + - " public bool IsEmpty = false;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlIgnoreAttribute()]{0}" + - " public bool IsEmptySpecified;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute(false)]{0}" + - " public bool IsNull = false;{0}" + - "}}{0}" + - "{0}" + - "/// <remarks/>{0}" + - "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"some:urn\")]{0}" + - "[System.FlagsAttribute()]{0}" + - "public enum FlagEnum {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlEnumAttribute(\"one\")]{0}" + - " e1 = 1,{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlEnumAttribute(\"two\")]{0}" + - " e2 = 2,{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlEnumAttribute(\"four\")]{0}" + - " e4 = 4,{0}" + - "}}{0}" + - "{0}" + - "/// <remarks/>{0}" + - "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"urn:myNS\")]{0}" + - "public class TestDefault {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " public string str;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute(\"Default Value\")]{0}" + - " public string strDefault = \"Default Value\";{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute(true)]{0}" + - " public bool boolT = true;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute(false)]{0}" + - " public bool boolF = false;{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute(typeof(System.Decimal), \"10\")]{0}" + - " public System.Decimal decimalval = ((System.Decimal)(10m));{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute((MonoTests.System.Xml.TestClasses.FlagEnum.e1 | MonoTests.System.Xml.TestClasses.FlagEnum.e4))]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum flag = (MonoTests.System.Xml.TestClasses.FlagEnum.e1 | MonoTests.System.Xml.TestClasses.FlagEnum.e4);{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.ComponentModel.DefaultValueAttribute((MonoTests.System.Xml.TestClasses.FlagEnum_Encoded.e1 | MonoTests.System.Xml.TestClasses.FlagEnum_Encoded.e4))]{0}" + - " public MonoTests.System.Xml.TestClasses.FlagEnum_Encoded flagencoded = (MonoTests.System.Xml.TestClasses.FlagEnum_Encoded.e1 | MonoTests.System.Xml.TestClasses.FlagEnum_Encoded.e4);{0}" + - "}}{0}" + - "{0}" + - "/// <remarks/>{0}" + - "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"urn:myNS\")]{0}" + - "[System.FlagsAttribute()]{0}" + - "public enum FlagEnum {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlEnumAttribute(\"one\")]{0}" + - " e1 = 1,{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlEnumAttribute(\"two\")]{0}" + - " e2 = 2,{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlEnumAttribute(\"four\")]{0}" + - " e4 = 4,{0}" + - "}}{0}" + - "{0}" + - "/// <remarks/>{0}" + - "[System.Xml.Serialization.XmlTypeAttribute(Namespace=\"urn:myNS\")]{0}" + - "[System.FlagsAttribute()]{0}" + - "public enum FlagEnum_Encoded {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " e1 = 1,{0}" + - " {0}" + - " /// <remarks/>{0}" + - " e2 = 2,{0}" + - " {0}" + - " /// <remarks/>{0}" + - " e4 = 4,{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -1102,7 +836,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "{0}{0}" + "/// <remarks/>{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + "[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" + @@ -1123,15 +856,6 @@ namespace MonoTests.System.XmlSerialization " }}{0}" + " }}{0}" + "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "[System.Xml.Serialization.XmlRootAttribute(\"simple\", Namespace=\"\", IsNullable=true)]{0}" + - "public class SimpleClassWithXmlAttributes {{{0}" + - " {0}" + - " /// <remarks/>{0}" + - " [System.Xml.Serialization.XmlAttributeAttribute(\"member\")]{0}" + - " public string something;{0}" + - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -1185,10 +909,8 @@ namespace MonoTests.System.XmlSerialization "{0}{0}" + "/// <remarks/>{0}" + "[System.FlagsAttribute()]{0}" + -#if NET_2_0 "[System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.Xml\", \"{1}\")]{0}" + "[System.SerializableAttribute()]{0}" + -#endif "[System.Xml.Serialization.XmlRootAttribute(Namespace=\"\", IsNullable=false)]{0}" + "public enum ZeroFlagEnum {{{0}" + " {0}" + @@ -1203,11 +925,7 @@ namespace MonoTests.System.XmlSerialization " /// <remarks/>{0}" + " [System.Xml.Serialization.XmlEnumAttribute(\"tns:t<w>o\")]{0}" + " e2 = 4,{0}" + -#if NET_2_0 "}}{0}", Environment.NewLine, XmlFileVersion), sw.ToString (), "#2"); -#else - "}}{0}", Environment.NewLine), sw.ToString (), "#2"); -#endif } [Test] @@ -1287,7 +1005,6 @@ namespace MonoTests.System.XmlSerialization return codeNamespace; } -#if NET_2_0 string XmlFileVersion { get { Assembly xmlAsm = typeof (XmlDocument).Assembly; @@ -1296,7 +1013,6 @@ namespace MonoTests.System.XmlSerialization return afv.Version; } } -#endif [XmlRootAttribute ("root", Namespace="urn:aNS", IsNullable=false)] public class Root diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs index 0b6e112b724..539402ae566 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlReflectionImporterTests.cs @@ -18,9 +18,7 @@ using System.Xml.Schema; using System.Xml.Serialization; using NUnit.Framework; -#if NET_2_0 using System.Collections.Generic; -#endif using MonoTests.System.Xml.TestClasses; @@ -123,39 +121,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestIntTypeMapping_Array () { XmlTypeMapping tm = Map(typeof(int[])); Assert.AreEqual ("ArrayOfInt", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfInt32", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Int32[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Int32[]", tm.TypeFullName, "#A4"); tm = Map (typeof (int[][])); Assert.AreEqual ("ArrayOfArrayOfInt", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfInt32", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Int32[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Int32[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (int[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfInt", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfInt32", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("Int32[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.Int32[][][]", tm.TypeFullName, "#C4"); } @@ -170,39 +154,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestStringTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (string[])); Assert.AreEqual ("ArrayOfString", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfString", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("String[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.String[]", tm.TypeFullName, "#A4"); tm = Map (typeof (string[][])); Assert.AreEqual ("ArrayOfArrayOfString", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfString", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("String[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.String[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (string[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfString", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfString", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("String[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.String[][][]", tm.TypeFullName, "#C4"); } @@ -217,39 +187,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestObjectTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (object[])); Assert.AreEqual ("ArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfObject", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Object[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Object[]", tm.TypeFullName, "#A4"); tm = Map (typeof (object[][])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfObject", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Object[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Object[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (object[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfObject", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("Object[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.Object[][][]", tm.TypeFullName, "#C4"); } @@ -264,9 +220,7 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestByteTypeMapping_Array () { XmlTypeMapping tm = Map(typeof(byte[])); @@ -278,21 +232,13 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (byte[][])); Assert.AreEqual ("ArrayOfBase64Binary", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfByte", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Byte[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Byte[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (byte[][][])); Assert.AreEqual ("ArrayOfArrayOfBase64Binary", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfByte", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("Byte[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.Byte[][][]", tm.TypeFullName, "#C4"); } @@ -387,39 +333,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestDateTimeTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (DateTime[])); Assert.AreEqual ("ArrayOfDateTime", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfDateTime", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("DateTime[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.DateTime[]", tm.TypeFullName, "#A4"); tm = Map (typeof (DateTime[][])); Assert.AreEqual ("ArrayOfArrayOfDateTime", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfDateTime", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("DateTime[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.DateTime[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (DateTime[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfDateTime", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfDateTime", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("DateTime[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.DateTime[][][]", tm.TypeFullName, "#C4"); } @@ -434,39 +366,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestGuidTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (Guid[])); Assert.AreEqual ("ArrayOfGuid", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfGuid", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Guid[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Guid[]", tm.TypeFullName, "#A4"); tm = Map (typeof (Guid[][])); Assert.AreEqual ("ArrayOfArrayOfGuid", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfGuid", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Guid[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Guid[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (Guid[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfGuid", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfGuid", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("Guid[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.Guid[][][]", tm.TypeFullName, "#C4"); } @@ -512,39 +430,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestCharTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (char[])); Assert.AreEqual ("ArrayOfChar", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfChar", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Char[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.Char[]", tm.TypeFullName, "#A4"); tm = Map (typeof (char[][])); Assert.AreEqual ("ArrayOfArrayOfChar", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfChar", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Char[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.Char[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (char[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfChar", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfChar", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("Char[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.Char[][][]", tm.TypeFullName, "#C4"); } @@ -697,39 +601,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestXmlSerializableTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (Employee[])); Assert.AreEqual ("ArrayOfEmployee", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfEmployee", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("Employee[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.Employee[]", tm.TypeFullName, "#A4"); tm = Map (typeof (Employee[][])); Assert.AreEqual ("ArrayOfArrayOfEmployee", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfEmployee", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("Employee[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.Employee[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (Employee[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfEmployee", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfEmployee", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("Employee[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.Employee[][][]", tm.TypeFullName, "#C4"); } @@ -778,31 +668,19 @@ namespace MonoTests.System.XmlSerialization XmlTypeMapping tm = Map (typeof (TimeSpan[])); Assert.AreEqual ("ArrayOfTimeSpan", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfTimeSpan", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("TimeSpan[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.TimeSpan[]", tm.TypeFullName, "#A4"); tm = Map (typeof (TimeSpan[][])); Assert.AreEqual ("ArrayOfArrayOfTimeSpan", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfTimeSpan", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("TimeSpan[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.TimeSpan[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (TimeSpan[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfTimeSpan", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfTimeSpan", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("TimeSpan[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.TimeSpan[][][]", tm.TypeFullName, "#C4"); } @@ -817,39 +695,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestEnumTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (AttributeTargets[])); Assert.AreEqual ("ArrayOfAttributeTargets", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfAttributeTargets", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("AttributeTargets[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("System.AttributeTargets[]", tm.TypeFullName, "#A4"); tm = Map (typeof (AttributeTargets[][])); Assert.AreEqual ("ArrayOfArrayOfAttributeTargets", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfAttributeTargets", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("AttributeTargets[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("System.AttributeTargets[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (AttributeTargets[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAttributeTargets", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfAttributeTargets", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("AttributeTargets[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("System.AttributeTargets[][][]", tm.TypeFullName, "#C4"); } @@ -864,39 +728,25 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TestClassTypeMapping_Array () { XmlTypeMapping tm = Map (typeof (SimpleClass[])); Assert.AreEqual ("ArrayOfSimpleClass", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClass", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClass[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.Xml.TestClasses.SimpleClass[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClass[][])); Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClass[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.Xml.TestClasses.SimpleClass[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (SimpleClass[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClass", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClass", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("SimpleClass[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.Xml.TestClasses.SimpleClass[][][]", tm.TypeFullName, "#C4"); } @@ -910,9 +760,7 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TypeMapping_IEnumerable_SimpleClass () { XmlTypeMapping tm = Map (typeof (SimpleClassEnumerable)); @@ -924,38 +772,24 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassEnumerable[])); Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassEnumerable", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassEnumerable[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerable[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassEnumerable[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClass", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassEnumerable", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassEnumerable[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerable[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (SimpleClassEnumerable[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfArrayOfSimpleClass", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClassEnumerable", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("SimpleClassEnumerable[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerable[][][]", tm.TypeFullName, "#C4"); } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TypeMapping_IEnumerable_Object () { XmlTypeMapping tm = Map (typeof (ObjectEnumerable)); @@ -967,31 +801,19 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (ObjectEnumerable[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfObjectEnumerable", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("ObjectEnumerable[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.ObjectEnumerable[]", tm.TypeFullName, "#A4"); tm = Map (typeof (ObjectEnumerable[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfObjectEnumerable", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("ObjectEnumerable[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.ObjectEnumerable[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (ObjectEnumerable[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfObjectEnumerable", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("ObjectEnumerable[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.ObjectEnumerable[][][]", tm.TypeFullName, "#C4"); } @@ -1010,9 +832,7 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TypeMapping_IEnumerable_SimpleClass_PrivateCurrent () { XmlTypeMapping tm = Map (typeof (SimpleClassEnumerablePrivateCurrent)); @@ -1024,38 +844,24 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassEnumerablePrivateCurrent[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassEnumerablePrivateCurrent", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateCurrent[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerablePrivateCurrent[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassEnumerablePrivateCurrent[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassEnumerablePrivateCurrent", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateCurrent[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerablePrivateCurrent[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (SimpleClassEnumerablePrivateCurrent[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClassEnumerablePrivateCurrent", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateCurrent[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerablePrivateCurrent[][][]", tm.TypeFullName, "#C4"); } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif #if ONLY_1_1 [Category ("NotDotNet")] // results in NullReferenceException in .NET 1.1 (SP1) #endif @@ -1070,31 +876,19 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassEnumerablePrivateGetEnumerator[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassEnumerablePrivateGetEnumerator", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateGetEnumerator[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerablePrivateGetEnumerator[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassEnumerablePrivateGetEnumerator[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassEnumerablePrivateGetEnumerator", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateGetEnumerator[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerablePrivateGetEnumerator[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (SimpleClassEnumerablePrivateGetEnumerator[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClassEnumerablePrivateGetEnumerator", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("SimpleClassEnumerablePrivateGetEnumerator[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassEnumerablePrivateGetEnumerator[][][]", tm.TypeFullName, "#C4"); } @@ -1127,9 +921,7 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TypeMapping_ICollection_SimpleClass () { XmlTypeMapping tm = Map (typeof (SimpleClassCollection)); @@ -1141,38 +933,24 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (SimpleClassCollection[])); Assert.AreEqual ("ArrayOfArrayOfSimpleClass", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfSimpleClassCollection", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("SimpleClassCollection[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassCollection[]", tm.TypeFullName, "#A4"); tm = Map (typeof (SimpleClassCollection[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClass", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfSimpleClassCollection", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("SimpleClassCollection[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassCollection[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (SimpleClassCollection[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfArrayOfSimpleClass", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfSimpleClassCollection", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("SimpleClassCollection[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.SimpleClassCollection[][][]", tm.TypeFullName, "#C4"); } [Test] -#if NET_2_0 [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void TypeMapping_ICollection_Object () { XmlTypeMapping tm = Map (typeof (ObjectCollection)); @@ -1184,31 +962,19 @@ namespace MonoTests.System.XmlSerialization tm = Map (typeof (ObjectCollection[])); Assert.AreEqual ("ArrayOfArrayOfAnyType", tm.ElementName, "#A1"); Assert.AreEqual (string.Empty, tm.Namespace, "#A2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfObjectCollection", tm.TypeName, "#A3"); -#else - Assert.AreEqual ("ObjectCollection[]", tm.TypeName, "#A3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.ObjectCollection[]", tm.TypeFullName, "#A4"); tm = Map (typeof (ObjectCollection[][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#B1"); Assert.AreEqual (string.Empty, tm.Namespace, "#B2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfObjectCollection", tm.TypeName, "#B3"); -#else - Assert.AreEqual ("ObjectCollection[][]", tm.TypeName, "#B3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.ObjectCollection[][]", tm.TypeFullName, "#B4"); tm = Map (typeof (ObjectCollection[][][])); Assert.AreEqual ("ArrayOfArrayOfArrayOfArrayOfAnyType", tm.ElementName, "#C1"); Assert.AreEqual (string.Empty, tm.Namespace, "#C2"); -#if NET_2_0 Assert.AreEqual ("ArrayOfArrayOfArrayOfObjectCollection", tm.TypeName, "#C3"); -#else - Assert.AreEqual ("ObjectCollection[][][]", tm.TypeName, "#C3"); -#endif Assert.AreEqual ("MonoTests.System.XmlSerialization.XmlReflectionImporterTests.ObjectCollection[][][]", tm.TypeFullName, "#C4"); } @@ -1501,11 +1267,7 @@ namespace MonoTests.System.XmlSerialization Assert.IsNull (smm.Namespace, "#4"); Assert.AreEqual ("System.String", smm.TypeFullName, "#5"); Assert.AreEqual ("string", smm.TypeName, "#6"); -#if NET_2_0 Assert.AreEqual (XmlSchemaNamespace, smm.TypeNamespace, "#7"); -#else - Assert.IsNull (smm.TypeNamespace, "#7"); -#endif rm = new XmlReflectionMember(); rm.IsReturnValue = false; @@ -1545,7 +1307,6 @@ namespace MonoTests.System.XmlSerialization new XmlSerializer (typeof (XmlArrayOnByteArrayType)); } -#if NET_2_0 [Test] public void ImportNullableInt () @@ -1657,7 +1418,6 @@ namespace MonoTests.System.XmlSerialization //should have deserialized the relationship Assert.AreEqual(1, bugTypeReload.Foo.Count); } -#endif public class Employee : IXmlSerializable { @@ -2132,7 +1892,6 @@ namespace MonoTests.System.XmlSerialization public byte [] Args; } -#if NET_2_0 public class NullableContainer { [XmlElement (IsNullable = true)] @@ -2276,7 +2035,6 @@ namespace MonoTests.System.XmlSerialization return false; } } -#endif public class Bug594490Class { diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs index fc55852869d..f4bd96cb878 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs @@ -1699,9 +1699,6 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if !NET_2_0 - [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#endif public void ExportXmlSerializable_SchemaProvider () { XmlSchemas schemas = Export (typeof (EmployeeSchemaProvider), "NSEmployeeSchemaProvider"); @@ -1713,20 +1710,8 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (Infoset (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + "<xs:schema xmlns:tns=\"NSEmployeeSchemaProvider\" elementFormDefault=\"qualified\" targetNamespace=\"NSEmployeeSchemaProvider\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#if NET_2_0 " <xs:import namespace=\"urn:types-devx-com\" />{0}" + " <xs:element name=\"employeeRoot\" nillable=\"true\" xmlns:q1=\"urn:types-devx-com\" type=\"q1:employeeRoot\" />{0}" + -#else - " <xs:import namespace=\"http://www.w3.org/2001/XMLSchema\" />{0}" + - " <xs:element name=\"EmployeeSchemaProvider\" nillable=\"true\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif "</xs:schema>", Environment.NewLine)), Infoset (sw.ToString ()), "#2"); schemas = Export (typeof (EmployeeSchemaProvider)); @@ -1738,20 +1723,8 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (Infoset (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + "<xs:schema elementFormDefault=\"qualified\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#if NET_2_0 " <xs:import namespace=\"urn:types-devx-com\" />{0}" + " <xs:element name=\"employeeRoot\" nillable=\"true\" xmlns:q1=\"urn:types-devx-com\" type=\"q1:employeeRoot\" />{0}" + -#else - " <xs:import namespace=\"http://www.w3.org/2001/XMLSchema\" />{0}" + - " <xs:element name=\"EmployeeSchemaProvider\" nillable=\"true\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif "</xs:schema>", Environment.NewLine)), Infoset (sw.ToString ()), "#4"); schemas = Export (typeof (PrimitiveSchemaProvider), "NSPrimitiveSchemaProvider"); @@ -1763,27 +1736,13 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (Infoset (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + "<xs:schema xmlns:tns=\"NSPrimitiveSchemaProvider\" elementFormDefault=\"qualified\" targetNamespace=\"NSPrimitiveSchemaProvider\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#if NET_2_0 //" <xs:import />{0}" + " <xs:element name=\"int\" nillable=\"true\" type=\"xs:int\" />{0}" + -#else - " <xs:import namespace=\"http://www.w3.org/2001/XMLSchema\" />{0}" + - " <xs:element name=\"PrimitiveSchemaProvider\" nillable=\"true\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif "</xs:schema>", Environment.NewLine)), Infoset (sw.ToString ().Replace("<xs:import />" + Environment.NewLine, "")), "#6"); } [Test] -#if NET_2_0 [Category ("NotWorking")] // support for XmlSchemaProvider is not implemented -#endif public void ExportXmlSerializable_SchemaProvider1 () { XmlSchemas schemas = Export (typeof (PrimitiveSchemaProvider)); Assert.AreEqual (1, schemas.Count, "#1"); @@ -1794,27 +1753,13 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + "<xs:schema elementFormDefault=\"qualified\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + -#if NET_2_0 " <xs:element name=\"int\" nillable=\"true\" type=\"xs:int\" />{0}" + -#else - " <xs:import namespace=\"http://www.w3.org/2001/XMLSchema\" />{0}" + - " <xs:element name=\"PrimitiveSchemaProvider\" nillable=\"true\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif "</xs:schema>", Environment.NewLine), sw.ToString (), "#8"); } [Test] [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn -#if NET_2_0 [Category ("NotWorking")] // support for XmlSchemaProvider is not implemented -#endif public void ExportXmlSerializable_Container () { XmlSchemas schemas = Export (typeof (XmlSerializableContainer), "NSXmlSerializableContainer"); @@ -1828,9 +1773,7 @@ namespace MonoTests.System.XmlSerialization "<xs:schema xmlns:tns=\"NSXmlSerializableContainer\" elementFormDefault=\"qualified\" targetNamespace=\"NSXmlSerializableContainer\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + " <xs:import namespace=\"http://www.w3.org/2001/XMLSchema\" />{0}" + " <xs:import namespace=\"urn:types-devx-com\" />{0}" + -#if NET_2_0 " <xs:import />{0}" + -#endif " <xs:element name=\"XmlSerializableContainer\" nillable=\"true\" type=\"tns:XmlSerializableContainer\" />{0}" + " <xs:complexType name=\"XmlSerializableContainer\">{0}" + " <xs:sequence>{0}" + @@ -1849,18 +1792,7 @@ namespace MonoTests.System.XmlSerialization " </xs:sequence>{0}" + " </xs:complexType>{0}" + " </xs:element>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"SlaveSchemaProvider\" xmlns:q1=\"urn:types-devx-com\" type=\"q1:employeeRoot\" />{0}" + -#else - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"SlaveSchemaProvider\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif " <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"NativeSchema\">{0}" + " <xs:complexType>{0}" + " <xs:sequence>{0}" + @@ -1868,7 +1800,6 @@ namespace MonoTests.System.XmlSerialization " </xs:sequence>{0}" + " </xs:complexType>{0}" + " </xs:element>{0}" + -#if NET_2_0 " <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"NativeSchemaProvider\" type=\"xs:int\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q2=\"urn:types-devx-com\" ref=\"q2:SlaveNamespace\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q3=\"urn:types-devx-com\" ref=\"q3:SlaveSchemaNamespace\" />{0}" + @@ -1880,26 +1811,6 @@ namespace MonoTests.System.XmlSerialization " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q9=\"urn:types-devx-com\" ref=\"q9:SlaveSchemaProviderNSOnly\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q10=\"urn:types-devx-com\" ref=\"q10:NativeSchemaNSOnly\" />{0}" + " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q11=\"urn:types-devx-com\" ref=\"q11:NativeSchemaProviderNSOnly\" />{0}" + -#else - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" name=\"NativeSchemaProvider\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q1=\"urn:types-devx-com\" ref=\"q1:SlaveNamespace\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q2=\"urn:types-devx-com\" ref=\"q2:SlaveSchemaNamespace\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q3=\"urn:types-devx-com\" ref=\"q3:SlaveSchemaProviderNamespace\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q4=\"urn:types-devx-com\" ref=\"q4:NativeSchemaNamespace\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q5=\"urn:types-devx-com\" ref=\"q5:NativeSchemaProviderNamespace\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q6=\"urn:types-devx-com\" ref=\"q6:SlaveNSOnly\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q7=\"urn:types-devx-com\" ref=\"q7:SlaveSchemaNSOnly\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q8=\"urn:types-devx-com\" ref=\"q8:SlaveSchemaProviderNSOnly\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q9=\"urn:types-devx-com\" ref=\"q9:NativeSchemaNSOnly\" />{0}" + - " <xs:element minOccurs=\"0\" maxOccurs=\"1\" xmlns:q10=\"urn:types-devx-com\" ref=\"q10:NativeSchemaProviderNSOnly\" />{0}" + -#endif " </xs:sequence>{0}" + " </xs:complexType>{0}" + "</xs:schema>", Environment.NewLine), sw.ToString (), "#2"); @@ -1911,9 +1822,7 @@ namespace MonoTests.System.XmlSerialization "<?xml version=\"1.0\" encoding=\"utf-16\"?>{0}" + "<xs:schema xmlns:tns=\"urn:types-devx-com\" targetNamespace=\"urn:types-devx-com\" id=\"EmployeeSchema\" xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">{0}" + " <xs:import namespace=\"http://www.w3.org/2001/XMLSchema\" />{0}" + -#if NET_2_0 " <xs:import />{0}" + -#endif " <xs:complexType name=\"employeeRoot\">{0}" + " <xs:attribute name=\"firstName\" />{0}" + " <xs:attribute name=\"lastName\" />{0}" + @@ -1935,18 +1844,7 @@ namespace MonoTests.System.XmlSerialization " </xs:sequence>{0}" + " </xs:complexType>{0}" + " </xs:element>{0}" + -#if NET_2_0 " <xs:element name=\"SlaveSchemaProviderNamespace\" type=\"tns:employeeRoot\" />{0}" + -#else - " <xs:element name=\"SlaveSchemaProviderNamespace\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif " <xs:element name=\"NativeSchemaNamespace\">{0}" + " <xs:complexType>{0}" + " <xs:sequence>{0}" + @@ -1954,18 +1852,7 @@ namespace MonoTests.System.XmlSerialization " </xs:sequence>{0}" + " </xs:complexType>{0}" + " </xs:element>{0}" + -#if NET_2_0 " <xs:element name=\"NativeSchemaProviderNamespace\" type=\"xs:int\" />{0}" + -#else - " <xs:element name=\"NativeSchemaProviderNamespace\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif " <xs:element name=\"SlaveNSOnly\">{0}" + " <xs:complexType>{0}" + " <xs:sequence>{0}" + @@ -1981,18 +1868,7 @@ namespace MonoTests.System.XmlSerialization " </xs:sequence>{0}" + " </xs:complexType>{0}" + " </xs:element>{0}" + -#if NET_2_0 " <xs:element name=\"SlaveSchemaProviderNSOnly\" type=\"tns:employeeRoot\" />{0}" + -#else - " <xs:element name=\"SlaveSchemaProviderNSOnly\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif " <xs:element name=\"NativeSchemaNSOnly\">{0}" + " <xs:complexType>{0}" + " <xs:sequence>{0}" + @@ -2000,18 +1876,7 @@ namespace MonoTests.System.XmlSerialization " </xs:sequence>{0}" + " </xs:complexType>{0}" + " </xs:element>{0}" + -#if NET_2_0 " <xs:element name=\"NativeSchemaProviderNSOnly\" type=\"xs:int\" />{0}" + -#else - " <xs:element name=\"NativeSchemaProviderNSOnly\">{0}" + - " <xs:complexType>{0}" + - " <xs:sequence>{0}" + - " <xs:element ref=\"xs:schema\" />{0}" + - " <xs:any />{0}" + - " </xs:sequence>{0}" + - " </xs:complexType>{0}" + - " </xs:element>{0}" + -#endif "</xs:schema>", Environment.NewLine), sw.ToString (), "#3"); sw.GetStringBuilder ().Length = 0; @@ -2041,11 +1906,7 @@ namespace MonoTests.System.XmlSerialization types.Add (new TypeDescription (typeof (uint), true, "unsignedInt", "UnsignedInt")); types.Add (new TypeDescription (typeof (ulong), true, "unsignedLong", "UnsignedLong")); types.Add (new TypeDescription (typeof (DateTime), true, "dateTime", "DateTime")); -#if NET_2_0 types.Add (new TypeDescription (typeof (XmlQualifiedName), true, "QName", "QName", true)); -#else - types.Add (new TypeDescription (typeof (XmlQualifiedName), true, "QName", "QName")); -#endif types.Add (new TypeDescription (typeof (string), true, "string", "String", true)); foreach (TypeDescription typeDesc in types) { @@ -2152,11 +2013,7 @@ namespace MonoTests.System.XmlSerialization types.Add (new TypeDescription (typeof (uint[]), true, "unsignedInt", "UnsignedInt", true)); types.Add (new TypeDescription (typeof (ulong[]), true, "unsignedLong", "UnsignedLong", true)); types.Add (new TypeDescription (typeof (DateTime[]), true, "dateTime", "DateTime", true)); -#if NET_2_0 types.Add (new TypeDescription (typeof (XmlQualifiedName[]), true, "QName", "QName", true, true)); -#else - types.Add (new TypeDescription (typeof (XmlQualifiedName[]), true, "QName", "QName", true)); -#endif types.Add (new TypeDescription (typeof (string[]), true, "string", "String", true, true)); foreach (TypeDescription typeDesc in types) { @@ -2512,31 +2369,19 @@ namespace MonoTests.System.XmlSerialization } } -#if NET_2_0 [XmlSchemaProvider ("CreateEmployeeSchema")] -#endif public class EmployeeSchemaProvider : EmployeeSchema { -#if NET_2_0 public static XmlQualifiedName CreateEmployeeSchema (XmlSchemaSet schemaSet) { schemaSet.Add (CreateSchema ()); return new XmlQualifiedName ("employeeRoot", "urn:types-devx-com"); } -#else - public override XmlSchema GetSchema () - { - return null; - } -#endif } -#if NET_2_0 [XmlSchemaProvider ("CreateLuckyNumberSchema")] -#endif public class PrimitiveSchemaProvider : IXmlSerializable { -#if NET_2_0 public static XmlQualifiedName CreateLuckyNumberSchema (XmlSchemaSet schemaSet) { XmlSchema schema = new XmlSchema (); @@ -2551,7 +2396,6 @@ namespace MonoTests.System.XmlSerialization schemaSet.Add (schema); return typeName; } -#endif public XmlSchema GetSchema () { diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs index fe4838cb2e9..e5bdcf1293d 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs @@ -943,7 +943,6 @@ namespace MonoTests.System.Xml.Serialization CodeTypeDeclaration type = FindType (codeNamespace, "TranslationStatus"); Assert.IsNotNull (type, "#10"); -#if NET_2_0 CodeMemberProperty property = FindMember (type, "Value") as CodeMemberProperty; Assert.IsNotNull (property, "#A1"); Assert.IsTrue (property.HasGet, "#A2"); @@ -963,15 +962,6 @@ namespace MonoTests.System.Xml.Serialization field = FindMember (type, "languageField") as CodeMemberField; Assert.IsNotNull (field, "#B5"); Assert.AreEqual ("System.Int32", field.Type.BaseType, "#B6"); -#else - CodeMemberField field = FindMember (type, "Value") as CodeMemberField; - Assert.IsNotNull (field, "#A1"); - Assert.AreEqual ("StatusType", field.Type.BaseType, "#A2"); - - field = FindMember (type, "Language") as CodeMemberField; - Assert.IsNotNull (field, "#B1"); - Assert.AreEqual ("System.Int32", field.Type.BaseType, "#B2"); -#endif } XmlSchemaImporter CreateSchemaImporter (string xsd) @@ -999,14 +989,9 @@ namespace MonoTests.System.Xml.Serialization XmlSchemaImporter imp = CreateSchemaImporter (xsd); XmlTypeMapping map = imp.ImportTypeMapping (new XmlQualifiedName ("Root")); CodeNamespace cns = ExportCode (map); -#if NET_2_0 CodeMemberProperty p = (CodeMemberProperty) FindMember (FindType (cns, "Root"), "Bar"); Assert.AreEqual (1, p.Type.TypeArguments.Count, "2.0 #1"); Assert.AreEqual ("System.Int32", p.Type.TypeArguments [0].BaseType, "2.0 #2"); -#else - CodeMemberField f = (CodeMemberField) FindMember (FindType (cns, "Root"), "Bar"); - Assert.AreEqual ("System.Int32", f.Type.BaseType, "1.x #1"); -#endif } [Test] @@ -1037,7 +1022,6 @@ namespace MonoTests.System.Xml.Serialization Assert.AreEqual ("A", a.ElementName, "#4-1"); // ... element name? Assert.IsTrue (a.CheckSpecified, "#4-2"); -#if NET_2_0 Assert.IsNull (map.TypeName, "#4-3"); // null at this state Assert.IsNull (map.TypeNamespace, "#4-4"); // null at this state @@ -1051,7 +1035,6 @@ namespace MonoTests.System.Xml.Serialization Assert.AreEqual (null, map.TypeName, "#5-3"); // filled after ExportExportMembersMapping(). Assert.AreEqual (null, map.TypeNamespace, "#5-4"); // filled after ExportMembersMapping(). // table contains some internal stuff that does not make sense in any public API. -#endif } CodeNamespace ExportCode (XmlTypeMapping map) diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializationWriterTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializationWriterTests.cs index 4be97a8140d..c83ef788f46 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializationWriterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializationWriterTests.cs @@ -130,11 +130,7 @@ namespace MonoTests.System.XmlSerialization public void TestFromDateTime() { DateTime d = new DateTime(); -#if NET_2_0 Assert.AreEqual ("0001-01-01T00:00:00", FromDateTime (d)); -#else - Assert.AreEqual ("0001-01-01T00:00:00.0000000", FromDateTime (d).Substring (0, 27)); -#endif } [Test] // bug #77500 @@ -202,7 +198,6 @@ namespace MonoTests.System.XmlSerialization long[] ids = {1, 2, 3, 4}; string[] values = {"one", "two", "three", "four"}; -#if NET_2_0 try { FromEnum (8, values, ids); Assert.Fail ("#A1"); @@ -212,11 +207,7 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.Message.IndexOf ("'8'") != -1, "#A4"); Assert.IsNull (ex.InnerException, "#A5"); } -#else - Assert.AreEqual ("8", FromEnum (8, values, ids), "#A6"); -#endif -#if NET_2_0 try { FromEnum (8, values, ids, "Some.Type.Name"); Assert.Fail ("#B1"); @@ -227,7 +218,6 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.Message.IndexOf ("Some.Type.Name") != -1, "#B5"); Assert.IsNull (ex.InnerException, "#B6"); } -#endif } [Test] @@ -776,15 +766,9 @@ namespace MonoTests.System.XmlSerialization xsw.ExecuteWriteTypedPrimitive ("x", ANamespace, dateTime, false); // FIXME: This is a bad test case. The following switch // should be applied to the entire test. -#if NET_2_0 Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<x xmlns='{0}'>1973-08-13T00:00:00</x>", ANamespace), xsw.Content, "#1"); -#else - Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, - "<x xmlns='{0}'>{1}</x>", ANamespace, FromDateTime (dateTime)), - xsw.Content, "#1"); -#endif xsw.Reset (); xsw.ExecuteWriteTypedPrimitive ("x", string.Empty, dateTime, false); diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerImplementationTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerImplementationTests.cs index 368b63bdbf7..bf3ef867162 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerImplementationTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerImplementationTests.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; using System.Xml.Serialization; @@ -119,4 +118,3 @@ namespace MonoTests.System.XmlSerialization } } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs index 872e6cbdf71..1a5f6e8f26c 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTestClasses.cs @@ -13,9 +13,7 @@ using System; using System.Collections; -#if NET_2_0 using System.Collections.Generic; -#endif using System.ComponentModel; using System.Xml; using System.Xml.Schema; @@ -68,7 +66,6 @@ namespace MonoTests.System.Xml.TestClasses #region GenericsTestClasses -#if NET_2_0 public class GenSimpleClass<T> { public T something = default (T); @@ -166,7 +163,6 @@ namespace MonoTests.System.Xml.TestClasses bb } -#endif #endregion // GenericsTestClasses diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs index ef6ba78867f..dd9daa2f49e 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs @@ -35,9 +35,7 @@ using System.Data; using System.Xml.Schema; using System.Xml.Serialization; using System.Reflection; -#if NET_2_0 using System.Collections.Generic; -#endif using NUnit.Framework; @@ -559,7 +557,6 @@ namespace MonoTests.System.XmlSerialization [Test] public void TestSerializeEnumDefaultValue_InvalidValue2 () { -#if NET_2_0 try { Serialize (5, typeof (EnumDefaultValue)); Assert.Fail ("#1"); @@ -571,16 +568,11 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.InnerException.Message.IndexOf ("'5'") != -1, "#6"); Assert.IsTrue (ex.InnerException.Message.IndexOf (typeof (EnumDefaultValue).FullName) != -1, "#7"); } -#else - Serialize (5, typeof (EnumDefaultValue)); - Assert.AreEqual (Infoset ("<EnumDefaultValue>5</EnumDefaultValue>"), WriterText); -#endif } [Test] public void TestSerializeEnumDefaultValueNF_InvalidValue1 () { -#if NET_2_0 try { Serialize (new EnumDefaultValueNF ()); Assert.Fail ("#1"); @@ -592,16 +584,11 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.InnerException.Message.IndexOf ("'0'") != -1, "#6"); Assert.IsTrue (ex.InnerException.Message.IndexOf (typeof (EnumDefaultValueNF).FullName) != -1, "#7"); } -#else - Serialize (new EnumDefaultValueNF ()); - Assert.AreEqual (Infoset ("<EnumDefaultValueNF>0</EnumDefaultValueNF>"), WriterText); -#endif } [Test] public void TestSerializeEnumDefaultValueNF_InvalidValue2 () { -#if NET_2_0 try { Serialize (15, typeof (EnumDefaultValueNF)); Assert.Fail ("#1"); @@ -613,10 +600,6 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.InnerException.Message.IndexOf ("'15'") != -1, "#6"); Assert.IsTrue (ex.InnerException.Message.IndexOf (typeof (EnumDefaultValueNF).FullName) != -1, "#7"); } -#else - Serialize (15, typeof (EnumDefaultValueNF)); - Assert.AreEqual (Infoset ("<EnumDefaultValueNF>15</EnumDefaultValueNF>"), WriterText); -#endif } [Test] @@ -726,7 +709,6 @@ namespace MonoTests.System.XmlSerialization f.Modifiers3 = (MapModifiers) 0; f.Modifiers4 = (MapModifiers) 888; f.Modifiers5 = (MapModifiers) 999; -#if NET_2_0 try { Serialize (f, typeof (Field)); Assert.Fail ("#E1"); @@ -744,14 +726,6 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.InnerException.Message.IndexOf (typeof (FlagEnum).FullName) != -1, "#E8"); Assert.IsNull (ex.InnerException.InnerException, "#E9"); } -#else - Serialize (f, typeof (Field)); - Assert.AreEqual (Infoset (string.Format (CultureInfo.InvariantCulture, - "<field xmlns:xsd='{0}' xmlns:xsi='{1}' flag1='one two' flag2='444'" + - " flag3='555' flag4='one two four' modifiers='666' modifiers2='777'" + - " modifiers4='888' modifiers5='999' names='a b' />", - XmlSchema.Namespace, XmlSchema.InstanceNamespace)), WriterText, "#E"); -#endif } [Test] @@ -762,15 +736,9 @@ namespace MonoTests.System.XmlSerialization SerializeEncoded (f, typeof (Field_Encoded)); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<q1:field xmlns:xsi='{1}' xmlns:xsd='{0}' id='id1' flag1=''" + " flag2='' flag3='' flag4='' modifiers='PuBlIc'" + " modifiers2='PuBlIc' modifiers4='PuBlIc' xmlns:q1='some:urn' />", -#else - "<q1:field xmlns:xsd='{0}' xmlns:xsi='{1}' id='id1' flag1=''" + - " flag2='' flag3='' flag4='' modifiers='PuBlIc'" + - " modifiers2='PuBlIc' modifiers4='PuBlIc' xmlns:q1='some:urn' />", -#endif XmlSchema.Namespace, XmlSchema.InstanceNamespace), sw.GetStringBuilder ().ToString (), "#A"); @@ -785,15 +753,9 @@ namespace MonoTests.System.XmlSerialization SerializeEncoded (f, typeof (Field_Encoded)); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<q1:field xmlns:xsi='{1}' xmlns:xsd='{0}' id='id1' flag3='two'" + " flag4='' modifiers='Protected' modifiers2='PuBlIc'" + " xmlns:q1='some:urn' />", -#else - "<q1:field xmlns:xsd='{0}' xmlns:xsi='{1}' id='id1' flag3='two'" + - " flag4='' modifiers='Protected' modifiers2='PuBlIc'" + - " xmlns:q1='some:urn' />", -#endif XmlSchema.Namespace, XmlSchema.InstanceNamespace), sw.GetStringBuilder ().ToString (), "#B"); @@ -808,17 +770,10 @@ namespace MonoTests.System.XmlSerialization SerializeEncoded (f, typeof (Field_Encoded)); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<q1:field xmlns:xsi='{1}' xmlns:xsd='{0}' id='id1' flag1='two'" + " flag2='two' flag4='' modifiers='PuBlIc' modifiers2='Protected'" + " modifiers3='Protected' modifiers4='PuBlIc' modifiers5='Protected'" + " xmlns:q1='some:urn' />", -#else - "<q1:field xmlns:xsd='{0}' xmlns:xsi='{1}' id='id1' flag1='two'" + - " flag2='two' flag4='' modifiers='PuBlIc' modifiers2='Protected'" + - " modifiers3='Protected' modifiers4='PuBlIc' modifiers5='Protected'" + - " xmlns:q1='some:urn' />", -#endif XmlSchema.Namespace, XmlSchema.InstanceNamespace), sw.GetStringBuilder ().ToString (), "#C"); @@ -830,11 +785,8 @@ namespace MonoTests.System.XmlSerialization f.Modifiers3 = (MapModifiers) 0; f.Modifiers4 = (MapModifiers) 888; f.Modifiers5 = (MapModifiers) 999; -#if NET_2_0 try { -#endif SerializeEncoded (f, typeof (Field_Encoded)); -#if NET_2_0 Assert.Fail ("#D1"); } catch (InvalidOperationException ex) { // There was an error generating the XML document @@ -850,15 +802,6 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.InnerException.Message.IndexOf (typeof (FlagEnum_Encoded).FullName) != -1, "#D8"); Assert.IsNull (ex.InnerException.InnerException, "#D9"); } -#else - Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, - "<?xml version='1.0' encoding='utf-16'?>" + - "<q1:field xmlns:xsd='{0}' xmlns:xsi='{1}' id='id1' flag2='444'" + - " flag3='555' flag4='' modifiers='666' modifiers2='777'" + - " modifiers4='888' modifiers5='999' xmlns:q1='some:urn' />", - XmlSchema.Namespace, XmlSchema.InstanceNamespace), - sw.GetStringBuilder ().ToString (), "#D"); -#endif } [Test] @@ -930,7 +873,6 @@ namespace MonoTests.System.XmlSerialization [Test] public void TestSerializeZeroFlagEnum_InvalidValue () { -#if NET_2_0 try { Serialize (4, typeof (ZeroFlagEnum)); // corresponding enum field is marked XmlIgnore Assert.Fail ("#1"); @@ -942,10 +884,6 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.InnerException.Message.IndexOf ("'4'") != -1, "#6"); Assert.IsTrue (ex.InnerException.Message.IndexOf (typeof (ZeroFlagEnum).FullName) != -1, "#7"); } -#else - Serialize (4, typeof (ZeroFlagEnum)); // corresponding enum field is marked XmlIgnore - Assert.AreEqual (Infoset ("<ZeroFlagEnum>4</ZeroFlagEnum>"), WriterText); -#endif } [Test] @@ -984,11 +922,7 @@ namespace MonoTests.System.XmlSerialization TimeZone tz = TimeZone.CurrentTimeZone; TimeSpan off = tz.GetUtcOffset (d); string sp = string.Format ("{0}{1:00}:{2:00}", off.Ticks >= 0 ? "+" : "", off.Hours, off.Minutes); -#if NET_2_0 Assert.AreEqual (Infoset ("<dateTime>0001-01-01T00:00:00</dateTime>"), WriterText); -#else - Assert.AreEqual (Infoset ("<dateTime>0001-01-01T00:00:00.0000000" + sp + "</dateTime>"), WriterText); -#endif } /* @@ -1042,11 +976,7 @@ namespace MonoTests.System.XmlSerialization Serialize (optionalValue); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<optionalValue xmlns:xsi='{1}' xmlns:xsd='{0}' xmlns='{2}' />", -#else - "<optionalValue xmlns:xsd='{0}' xmlns:xsi='{1}' xmlns='{2}' />", -#endif XmlSchema.Namespace, XmlSchema.InstanceNamespace, AnotherNamespace), sw.ToString (), "#1"); @@ -1060,11 +990,7 @@ namespace MonoTests.System.XmlSerialization Serialize (optionalValue, overrides); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<optionalValue xmlns:xsi='{1}' xmlns:xsd='{0}' xmlns='{2}'>" + -#else - "<optionalValue xmlns:xsd='{0}' xmlns:xsi='{1}' xmlns='{2}'>" + -#endif "<Attributes xmlns='{3}'>one four</Attributes>" + "</optionalValue>", XmlSchema.Namespace, XmlSchema.InstanceNamespace, AnotherNamespace, ANamespace), sw.ToString (), "#2"); @@ -1073,11 +999,7 @@ namespace MonoTests.System.XmlSerialization Serialize (optionalValue, overrides); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<optionalValue xmlns:xsi='{1}' xmlns:xsd='{0}' xmlns='{2}'>" + -#else - "<optionalValue xmlns:xsd='{0}' xmlns:xsi='{1}' xmlns='{2}'>" + -#endif "<Attributes xmlns='{3}'>one four</Attributes>" + "<Flags xmlns='{3}'>one</Flags>" + "</optionalValue>", @@ -1780,7 +1702,6 @@ namespace MonoTests.System.XmlSerialization // technically XmlSchemaForm.None has an XmlIgnore attribute, // but it is not being serialized as a member. -#if NET_2_0 try { Serialize (XmlSchemaForm.None); Assert.Fail ("#1"); @@ -1792,10 +1713,6 @@ namespace MonoTests.System.XmlSerialization Assert.IsTrue (ex.InnerException.Message.IndexOf ("'0'") != -1, "#6"); Assert.IsTrue (ex.InnerException.Message.IndexOf (typeof (XmlSchemaForm).FullName) != -1, "#7"); } -#else - Serialize (XmlSchemaForm.None); - Assert.AreEqual (Infoset ("<XmlSchemaForm>0</XmlSchemaForm>"), WriterText); -#endif } [Test] @@ -1831,7 +1748,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (Infoset ("<anyType><elem1/><elem2/></anyType>"), WriterText); } -#if NET_2_0 [Test] [ExpectedException (typeof (InvalidOperationException))] // List<XmlNode> is not supported public void TestSerializeGenericListOfNode () @@ -1849,7 +1765,6 @@ namespace MonoTests.System.XmlSerialization Serialize (new List<XmlElement> (new XmlElement [] { doc.CreateElement ("elem1"), doc.CreateElement ("elem2") }), typeof (object)); Assert.AreEqual (Infoset ("<anyType><elem1/><elem2/></anyType>"), WriterText); } -#endif [Test] public void TestSerializeXmlDocument () { @@ -2020,11 +1935,7 @@ namespace MonoTests.System.XmlSerialization Serialize (new PrimitiveTypesContainer ()); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<PrimitiveTypesContainer xmlns:xsi='{1}' xmlns:xsd='{0}' xmlns='some:urn'>" + -#else - "<PrimitiveTypesContainer xmlns:xsd='{0}' xmlns:xsi='{1}' xmlns='some:urn'>" + -#endif "<Number>2004</Number>" + "<Name>some name</Name>" + "<Index>56</Index>" + @@ -2036,11 +1947,7 @@ namespace MonoTests.System.XmlSerialization SerializeEncoded (new PrimitiveTypesContainer ()); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "<?xml version='1.0' encoding='utf-16'?>" + -#if NET_2_0 "<q1:PrimitiveTypesContainer xmlns:xsi='{1}' xmlns:xsd='{0}' id='id1' xmlns:q1='{2}'>" + -#else - "<q1:PrimitiveTypesContainer xmlns:xsd='{0}' xmlns:xsi='{1}' id='id1' xmlns:q1='{2}'>" + -#endif "<Number xsi:type='xsd:int'>2004</Number>" + "<Name xsi:type='xsd:string'>some name</Name>" + "<Index xsi:type='xsd:unsignedByte'>56</Index>" + @@ -2381,16 +2288,12 @@ namespace MonoTests.System.XmlSerialization } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ApplicationException))] -#endif public void SerializeErrorneousIXmlSerializable () { Serialize (new ErrorneousGetSchema ()); Assert.AreEqual ("<:ErrorneousGetSchema></>", Infoset (sw.ToString ())); } -#if NET_2_0 public void DateTimeRoundtrip () { // bug #337729 @@ -2400,7 +2303,6 @@ namespace MonoTests.System.XmlSerialization DateTime d = (DateTime) ser.Deserialize (new StringReader (sw.ToString ())); Assert.AreEqual (DateTimeKind.Utc, d.Kind); } -#endif [Test] public void SupportIXmlSerializableImplicitlyConvertible () @@ -2449,7 +2351,6 @@ namespace MonoTests.System.XmlSerialization #region GenericsSeralizationTests -#if NET_2_0 [Test] public void TestSerializeGenSimpleClassString () { @@ -2959,7 +2860,6 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual(WriterText, expected_text, WriterText); } -#endif #endregion //GenericsSeralizationTests @@ -3058,7 +2958,6 @@ namespace MonoTests.System.XmlSerialization public TimeSpan StringDuration = TimeSpan.FromSeconds (1); } -#if NET_2_0 public class Bug80759 { public string Test; @@ -3144,7 +3043,6 @@ namespace MonoTests.System.XmlSerialization } } -#endif void CDataTextNodes_BadNode (object s, XmlNodeEventArgs e) { diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/XPathAtomicValueTests.cs b/mcs/class/System.XML/Test/System.Xml.XPath/XPathAtomicValueTests.cs index a67e91072a8..fab7dd2e52d 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/XPathAtomicValueTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.XPath/XPathAtomicValueTests.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.Collections; @@ -522,4 +521,3 @@ namespace MonoTests.System.Xml } } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs b/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs index 022dfc7c450..c3adb2cd201 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.XPath/XPathEditableNavigatorTests.cs @@ -7,7 +7,6 @@ // Copyright (C) 2005 Novell, Inc. http://www.novell.com // -#if NET_2_0 using System; using System.Xml; @@ -792,4 +791,3 @@ namespace MonoTests.System.Xml.XPath } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorCommonTests.cs b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorCommonTests.cs index accde913026..fd31e829cb3 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorCommonTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorCommonTests.cs @@ -425,7 +425,6 @@ namespace MonoTests.System.Xml Assert.AreEqual (2, iter.Count, "#1"); } -#if NET_2_0 [Test] // bug #78067 @@ -462,7 +461,6 @@ namespace MonoTests.System.Xml xr.Read (); // should be at x:val Assert.AreEqual ("urn:x", xr.LookupNamespace ("x"), "#1"); } -#endif [Test] public void GetNamespaceConsistentTree () diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorEvaluateTests.cs b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorEvaluateTests.cs index 6d302889a72..4bc9c6e5225 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorEvaluateTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorEvaluateTests.cs @@ -47,14 +47,6 @@ namespace MonoTests.System.Xml // Testing Core Funcetion Library functions defined at: http://www.w3.org/TR/xpath#corelib [Test] -#if !NET_2_0 - // .NET 2.0 is fixed for last() to return 1 for the - // initial context position. Someone thinks we should follow - // the fix, but in reality we should just discard this - // pointless test. The positional value under those conditions - // does not make any sense. - [Category ("NotDotNet")] -#endif public void CoreFunctionNodeSetLast () { expression = navigator.Compile("last()"); @@ -69,15 +61,6 @@ namespace MonoTests.System.Xml } [Test] -#if !NET_2_0 - // .NET 2.0 is fixed for position() to return 1 for the - // initial context position. Someone thinks we should follow - // the fix, but in reality we should just discard this - // pointless test. The positional value under those conditions - // does not make any sense. -// [Category ("NotWorking")] - [Category ("NotDotNet")] -#endif public void CoreFunctionNodeSetPosition () { expression = navigator.Compile("position()"); diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorReaderTests.cs b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorReaderTests.cs index 33abdfd1825..00fb4e828cd 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorReaderTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorReaderTests.cs @@ -6,7 +6,6 @@ // // Copyright (C) 2005 Novell, Inc. http://www.novell.com // -#if NET_2_0 using System; using System.Xml; @@ -682,4 +681,3 @@ namespace MonoTests.System.Xml.XPath } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorTests.cs b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorTests.cs index 5049500052f..50f0c9fb87a 100644 --- a/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.XPath/XPathNavigatorTests.cs @@ -258,14 +258,6 @@ namespace MonoTests.System.Xml Assert.IsTrue (nav.MoveToId ("aaa"), "ctor() from XmlValidatingReader"); // FIXME: it seems to result in different in .NET 2.0. -#if NET_2_0 -#else - // When it is XmlTextReader, XPathDocument fails. - XmlTextReader xtr = new XmlTextReader (xml, XmlNodeType.Document, null); - nav = new XPathDocument (xtr).CreateNavigator (); - Assert.IsTrue (!nav.MoveToId ("aaa"), "ctor() from XmlTextReader"); - xtr.Close (); -#endif } [Test] @@ -443,7 +435,6 @@ namespace MonoTests.System.Xml Assert.IsTrue (i.MoveNext (), "#2"); } -#if NET_2_0 [Test] public void ValueAsBoolean () { @@ -716,6 +707,5 @@ namespace MonoTests.System.Xml return; Assert.Fail ("no selection"); } -#endif } } diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltArgumentListCas.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltArgumentListCas.cs index d1871433724..d501f3fcccd 100644 --- a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltArgumentListCas.cs +++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltArgumentListCas.cs @@ -69,9 +69,6 @@ namespace MonoCasTests.System.Xml.Xsl { [Test] [SecurityPermission (SecurityAction.Deny, SkipVerification = true)] -#if !NET_2_0 - [ExpectedException (typeof (SecurityException))] -#endif public void AddExtensionObject_LinkDemand () { // requires FullTrust, so denying anything break the requirements diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltCompileExceptionTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltCompileExceptionTests.cs index 3e300978f04..55b34a8cb7d 100644 --- a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltCompileExceptionTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltCompileExceptionTests.cs @@ -40,7 +40,6 @@ namespace MonoCasTests.System.Xml.Xsl { [TestFixture] public class XsltCompileExceptionTests { -#if NET_2_0 [Test] public void Constructor0 () { @@ -90,7 +89,6 @@ namespace MonoCasTests.System.Xml.Xsl Assert.IsNull (xe.StackTrace, "#A8"); Assert.IsNull (xe.TargetSite, "#A9"); } -#endif [Test] public void Constructor3 () @@ -104,13 +102,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (0, xe.LinePosition, "#A2"); Assert.IsNotNull (xe.Message, "#A3"); Assert.IsTrue (xe.Message.Length > 0, "#A4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error.", xe.Message, "#A5-US-ENGLISH"); Assert.AreEqual (-1, xe.Message.IndexOf("(0,0) :\n"), "#A5"); -#else - Assert.AreEqual ("(0,0) :\n", xe.Message, "#A5"); -#endif Assert.IsNull (xe.SourceUri, "#A6"); Assert.AreSame (cause, xe.InnerException, "#A7"); Assert.IsNull (xe.Source, "#A8"); @@ -123,13 +117,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (0, xe.LinePosition, "#B2"); Assert.IsNotNull (xe.Message, "#B3"); Assert.IsTrue (xe.Message.Length > 0, "#B4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error at (1,0). See InnerException for details.", xe.Message, "#B5-US-ENGLISH"); Assert.IsTrue (xe.Message.IndexOf("(1,0).") != -1, "#B5"); -#else - Assert.AreEqual ("(1,0) :\n", xe.Message, "#B5"); -#endif Assert.IsNull (xe.SourceUri, "#B6"); Assert.AreSame (cause, xe.InnerException, "#B7"); Assert.IsNull (xe.Source, "#B8"); @@ -142,13 +132,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (1, xe.LinePosition, "#C2"); Assert.IsNotNull (xe.Message, "#C3"); Assert.IsTrue (xe.Message.Length > 0, "#C4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error.", xe.Message, "#AC-US-ENGLISH"); Assert.AreEqual (-1, xe.Message.IndexOf("(0,1)"), "#C5"); -#else - Assert.AreEqual ("(0,1) :\n", xe.Message, "#C5"); -#endif Assert.IsNull (xe.SourceUri, "#C6"); Assert.AreSame (cause, xe.InnerException, "#C7"); Assert.IsNull (xe.Source, "#C8"); @@ -161,13 +147,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (0, xe.LinePosition, "#D2"); Assert.IsNotNull (xe.Message, "#D3"); Assert.IsTrue (xe.Message.Length > 0, "#D4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error.", xe.Message, "#D5-US-ENGLISH"); Assert.AreEqual (-1, xe.Message.IndexOf("(0,0)"), "#D5"); -#else - Assert.AreEqual ("http://local/test.xsl(0,0) :\n", xe.Message, "#D5"); -#endif Assert.AreSame (sourceUri, xe.SourceUri, "#D6"); Assert.AreSame (cause, xe.InnerException, "#D7"); Assert.IsNull (xe.Source, "#D8"); @@ -180,13 +162,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (0, xe.LinePosition, "#E2"); Assert.IsNotNull (xe.Message, "#E3"); Assert.IsTrue (xe.Message.Length > 0, "#E4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error at http://local/test.xsl(1,0). See InnerException for details.", xe.Message, "#E5-US-ENGLISH"); Assert.IsTrue (xe.Message.IndexOf("http://local/test.xsl(1,0)") != -1, "#E5"); -#else - Assert.AreEqual ("http://local/test.xsl(1,0) :\n", xe.Message, "#E5"); -#endif Assert.AreSame (sourceUri, xe.SourceUri, "#E6"); Assert.AreSame (cause, xe.InnerException, "#E7"); Assert.IsNull (xe.Source, "#E8"); @@ -199,13 +177,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (1, xe.LinePosition, "#F2"); Assert.IsNotNull (xe.Message, "#F3"); Assert.IsTrue (xe.Message.Length > 0, "#F4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error.", xe.Message, "#F5-US-ENGLISH"); Assert.AreEqual (-1, xe.Message.IndexOf("(0,1)"), "#F5"); -#else - Assert.AreEqual ("http://local/test.xsl(0,1) :\n", xe.Message, "#F5"); -#endif Assert.AreSame (sourceUri, xe.SourceUri, "#F6"); Assert.AreSame (cause, xe.InnerException, "#F7"); Assert.IsNull (xe.Source, "#F8"); @@ -218,13 +192,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (2, xe.LinePosition, "#G2"); Assert.IsNotNull (xe.Message, "#G3"); Assert.IsTrue (xe.Message.Length > 0, "#G4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error at http://local/test.xsl(1,2). See InnerException for details.", xe.Message, "#G5-US-ENGLISH"); Assert.IsTrue (xe.Message.IndexOf("http://local/test.xsl(1,2)") != -1, "#G5"); -#else - Assert.AreEqual ("http://local/test.xsl(1,2) :\n", xe.Message, "#G5"); -#endif Assert.AreSame (sourceUri, xe.SourceUri, "#G5"); Assert.AreSame (cause, xe.InnerException, "#G6"); Assert.IsNull (xe.Source, "#G7"); @@ -237,13 +207,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (4, xe.LinePosition, "#H2"); Assert.IsNotNull (xe.Message, "#H3"); Assert.IsTrue (xe.Message.Length > 0, "#H4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error at http://local/test.xsl(3,4). See InnerException for details.", xe.Message, "#H5-US-ENGLISH"); Assert.IsTrue (xe.Message.IndexOf("http://local/test.xsl(3,4)") != -1, "#H5"); -#else - Assert.AreEqual ("http://local/test.xsl(3,4) :\n", xe.Message, "#H5"); -#endif Assert.AreSame (sourceUri, xe.SourceUri, "#H6"); Assert.IsNull (xe.InnerException, "#H7"); Assert.IsNull (xe.Source, "#H8"); @@ -256,13 +222,9 @@ namespace MonoCasTests.System.Xml.Xsl Assert.AreEqual (0, xe.LinePosition, "#I2"); Assert.IsNotNull (xe.Message, "#I3"); Assert.IsTrue (xe.Message.Length > 0, "#I4"); -#if NET_2_0 // exact us-english error message // Assert.AreEqual ("XSLT compile error.", xe.Message, "#I5-US-ENGLISH"); Assert.AreEqual (-1, xe.Message.IndexOf("http://local/test.xsl(0,0) :\n"), "#I5"); -#else - Assert.AreEqual ("http://local/test.xsl(0,0) :\n", xe.Message, "#I5"); -#endif Assert.AreSame (sourceUri, xe.SourceUri, "#I6"); Assert.IsNull (xe.InnerException, "#I7"); Assert.IsNull (xe.Source, "#I8"); diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs index d82db8f554e..a995b68a31e 100644 --- a/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XsltExceptionTests.cs @@ -36,7 +36,6 @@ namespace MonoCasTests.System.Xml.Xsl { [TestFixture] public class XsltExceptionTests { -#if NET_2_0 [Test] public void Constructor0 () { @@ -66,7 +65,6 @@ namespace MonoCasTests.System.Xml.Xsl { Assert.IsNull (xsltException.StackTrace, "#7"); Assert.IsNull (xsltException.TargetSite, "#8"); } -#endif [Test] public void Constructor2 () diff --git a/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs index 09983f1bf0e..22de3c45aee 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlAttributeCollectionTests.cs @@ -193,9 +193,7 @@ namespace MonoTests.System.Xml } [Test] -#if NET_2_0 [Category ("NotDotNet")] // enbug -#endif public void RemoveDefaultAttribute () { string dtd = "<!DOCTYPE root [<!ELEMENT root EMPTY><!ATTLIST root attr CDATA 'default'>]>"; diff --git a/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs index 0d98aeb22bf..225236fe23a 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlAttributeTests.cs @@ -177,9 +177,7 @@ namespace MonoTests.System.Xml } [Test] -#if NET_2_0 [Category ("NotDotNet")] // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=336180 -#endif public void SetInnerTextAndXml () { string original = doc.OuterXml; diff --git a/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs index de32cc456ee..1197dd23015 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlCharacterDataTests.cs @@ -86,9 +86,7 @@ namespace MonoTests.System.Xml } [Test] -#if NET_2_0 [Category ("NotDotNet")] // enbug in 2.0 -#endif public void InsertData () { comment.Value = "foobaz"; @@ -129,9 +127,7 @@ namespace MonoTests.System.Xml } [Test] -#if NET_2_0 [Category ("NotDotNet")] // enbug in 2.0 -#endif public void ReplaceData () { changed = false; diff --git a/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs index 03e5a83d308..295c4ef08e1 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlConvertTests.cs @@ -907,7 +907,6 @@ namespace MonoTests.System.Xml Assert.AreEqual ("PT0S", XmlConvert.ToString (TimeSpan.FromSeconds (0))); } -#if NET_2_0 [Test] public void VerifyTOKEN () { @@ -1080,7 +1079,6 @@ namespace MonoTests.System.Xml XmlConvert.ToDateTime ("2009-12-15T08:44:05.2700544Z", mode); } } -#endif } } diff --git a/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs index 6b30f0889c8..4cdc4d2c4aa 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlDocumentTests.cs @@ -18,11 +18,7 @@ using System.Text; using NUnit.Framework; -#if NET_2_0 using InvalidNodeTypeArgException = System.ArgumentException; -#else // it makes less sense -using InvalidNodeTypeArgException = System.ArgumentOutOfRangeException; -#endif namespace MonoTests.System.Xml { @@ -201,9 +197,7 @@ namespace MonoTests.System.Xml } [Test] -#if NET_2_0 [Category ("NotDotNet")] // enbug in 2.0 -#endif public void CreateNodeNodeTypeName () { XmlNode node; diff --git a/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs index e92df56ca07..8666b2b1b0a 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlElementTests.cs @@ -317,9 +317,7 @@ namespace MonoTests.System.Xml } [Test] -#if NET_2_0 [Ignore ("This test is very implementation dependent and thus .NET 2.0 does not pass. That's why I said http://primates.ximian.com/~atsushi/blog/archives/000416.html and http://svn.myrealbox.com/viewcvs/trunk/mono/web/xml-classes?rev=23598")] -#endif public void RemoveDoesNotRemoveDefaultAttributes () { string dtd = "<!DOCTYPE root [<!ELEMENT root EMPTY><!ATTLIST root foo CDATA 'def' bar CDATA #IMPLIED>]>"; @@ -570,10 +568,8 @@ namespace MonoTests.System.Xml doc.LoadXml ("<root/>"); doc.DocumentElement.Prefix = null; -#if NET_2_0 Assert.AreEqual (string.Empty, doc.DocumentElement.Prefix, "#1"); AssertClearPrefix ((string) null); -#endif } [Test] diff --git a/mcs/class/System.XML/Test/System.Xml/XmlNamespaceManagerTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlNamespaceManagerTests.cs index b3ac5944b72..6c187bb6101 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlNamespaceManagerTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlNamespaceManagerTests.cs @@ -238,7 +238,6 @@ namespace MonoTests.System.Xml nsmgr.AddNamespace ("xmlns", "http://www.w3.org/2000/xmlns/"); } -#if NET_2_0 XmlNamespaceScope l = XmlNamespaceScope.Local; XmlNamespaceScope x = XmlNamespaceScope.ExcludeXml; XmlNamespaceScope a = XmlNamespaceScope.All; @@ -284,6 +283,5 @@ namespace MonoTests.System.Xml Assert.AreEqual (1, nsmgr.GetNamespacesInScope (x).Count, "#17"); Assert.AreEqual (2, nsmgr.GetNamespacesInScope (a).Count, "#18"); } -#endif } } diff --git a/mcs/class/System.XML/Test/System.Xml/XmlNodeReaderTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlNodeReaderTests.cs index 8d7a9a9afa6..15c4ec78f72 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlNodeReaderTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlNodeReaderTests.cs @@ -117,9 +117,7 @@ namespace MonoTests.System.Xml }
[Test]
-#if NET_2_0
[Ignore (".NET 2.0 XmlNodeReader does not allow undeclared entities at all.")]
-#endif
public void ResolveEntity2 ()
{
document.RemoveAll ();
@@ -154,9 +152,7 @@ namespace MonoTests.System.Xml }
[Test]
-#if NET_2_0
[Ignore (".NET 2.0 XmlNodeReader does not allow undeclared entities at all.")]
-#endif
public void ResolveEntityWithoutDTD ()
{
document.RemoveAll ();
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs index 41aa9bf10c9..89e659542d1 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlNodeTests.cs @@ -129,25 +129,15 @@ namespace MonoTests.System.Xml Assert.AreEqual ("urn:default", n.GetNamespaceOfPrefix (String.Empty), "#1"); Assert.AreEqual ("urn:foo", n.GetNamespaceOfPrefix ("foo"), "#2"); Assert.AreEqual (String.Empty, n.GetNamespaceOfPrefix ("bar"), "#3"); -#if NET_2_0 Assert.AreEqual ("http://www.w3.org/XML/1998/namespace", n.GetNamespaceOfPrefix ("xml"), "#4"); Assert.AreEqual ("http://www.w3.org/2000/xmlns/", n.GetNamespaceOfPrefix ("xmlns"), "#5"); -#else - Assert.AreEqual (String.Empty, n.GetNamespaceOfPrefix ("xml"), "#4"); - Assert.AreEqual (String.Empty, n.GetNamespaceOfPrefix ("xmlns"), "#5"); -#endif n = document.DocumentElement.FirstChild; Assert.AreEqual ("urn:default", n.GetNamespaceOfPrefix (String.Empty), "#6"); Assert.AreEqual ("urn:foo", n.GetNamespaceOfPrefix ("foo"), "#7"); Assert.AreEqual (String.Empty, n.GetNamespaceOfPrefix ("bar"), "#8"); -#if NET_2_0 Assert.AreEqual ("http://www.w3.org/XML/1998/namespace", n.GetNamespaceOfPrefix ("xml"), "#9"); Assert.AreEqual ("http://www.w3.org/2000/xmlns/", n.GetNamespaceOfPrefix ("xmlns"), "#10"); -#else - Assert.AreEqual (String.Empty, n.GetNamespaceOfPrefix ("xml"), "#9"); - Assert.AreEqual (String.Empty, n.GetNamespaceOfPrefix ("xmlns"), "#10"); -#endif } [Test] diff --git a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs index a969b3b3f73..65fb3fa991d 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlReaderCommonTests.cs @@ -201,14 +201,12 @@ namespace MonoTests.System.Xml document.LoadXml (xml);
xnr = new XmlNodeReader (document);
method (xnr);
-#if NET_2_0
/*
// XPathNavigatorReader tests
System.Xml.XPath.XPathDocument doc = new System.Xml.XPath.XPathDocument (new StringReader (xml));
XmlReader xpr = doc.CreateNavigator ().ReadSubtree ();
method (xpr);
*/
-#endif
}
@@ -1513,7 +1511,6 @@ namespace MonoTests.System.Xml reader.Read (); // silently returns false
}
-#if NET_2_0
[Test]
public void CreateSimple ()
{
@@ -2337,6 +2334,5 @@ namespace MonoTests.System.Xml throw task.Result;
}
#endif
-#endif
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs index c6a7e220cf3..55ed146947d 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlReaderSettingsTests.cs @@ -7,7 +7,6 @@ // (C)2004 Novell Inc. // -#if NET_2_0 using System; using System.IO; using System.Net; @@ -448,4 +447,3 @@ namespace MonoTests.System.Xml #endif } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs b/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs index 80a46e5c99f..df9756ee8f1 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlResolverTest.cs @@ -65,7 +65,6 @@ namespace MonoTests.System.Xml { ConcreteXmlResolver xr = new ConcreteXmlResolver (); xr.ResolveUri (null, null); } -#if NET_2_0 [Test] public void ResolveUri () { @@ -103,7 +102,6 @@ namespace MonoTests.System.Xml { u2 = xr.ResolveUri (null, "file:///mystuff"); Assert.IsTrue (u2.IsAbsoluteUri, "null,absolute/file"); } -#endif #if NET_4_5 class AsyncXmlResolver : XmlResolver diff --git a/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs index 596a808aac3..27cac573314 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlTextReaderTests.cs @@ -925,7 +925,6 @@ namespace MonoTests.System.Xml xtr.Read (); } -#if NET_2_0 [Test] public void Settings () { @@ -1082,7 +1081,6 @@ namespace MonoTests.System.Xml } catch (XmlException) { } } -#endif [Test] public void SurrogatePair () diff --git a/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs index 36651e61955..06eb2d30566 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlTextWriterTests.cs @@ -2345,7 +2345,6 @@ namespace MonoTests.System.Xml Assert.AreEqual ("<root xmlns:abc=\"uri:abcnamespace\"><abc:def /></root>", sw.ToString ()); } -#if NET_2_0 [Test] [ExpectedException (typeof (InvalidOperationException))] public void RejectWritingAtErrorState () @@ -2357,6 +2356,5 @@ namespace MonoTests.System.Xml xtw.WriteStartElement ("foo"); } -#endif } } diff --git a/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs index 59752547bc0..cb2ccab72be 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs @@ -59,9 +59,6 @@ namespace MonoTests.System.Xml }
[Test]
-#if !NET_2_0
- [Category ("NotDotNet")] // It should throw ArgumentNullException.
-#endif
[ExpectedException (typeof (ArgumentNullException))]
public void ResolveUriWithNullArgs ()
{
@@ -76,14 +73,12 @@ namespace MonoTests.System.Xml resolver.GetEntity (uri, null, null);
}
-#if NET_2_0
[Test]
[ExpectedException (typeof (ArgumentException))]
public void GetEntityWithRelativeFileUri ()
{
resolver.GetEntity (new Uri ("file.txt", UriKind.Relative), null, typeof (Stream));
}
-#endif
[Test]
[ExpectedException (typeof (XmlException))]
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlValidatingReaderTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlValidatingReaderTests.cs index 1dc3d5584ce..a462081608c 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlValidatingReaderTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlValidatingReaderTests.cs @@ -752,7 +752,6 @@ namespace MonoTests.System.Xml dvr.Read (); // root
dvr.Read (); // &ent3;
Assert.AreEqual (XmlNodeType.EntityReference, dvr.NodeType);
-#if NET_2_0
// under .NET 2.0, an error is raised here.
// under .NET 1.1, the error is thrown on the next read.
try {
@@ -760,16 +759,6 @@ namespace MonoTests.System.Xml Assert.Fail ("Attempt to resolve undeclared entity should fail.");
} catch (XmlException) {
}
-#else
- // ent3 does not exist in this dtd.
- dvr.ResolveEntity ();
- Assert.AreEqual (XmlNodeType.EntityReference, dvr.NodeType);
- try {
- dvr.Read ();
- Assert.Fail ("Attempt to resolve undeclared entity should fail.");
- } catch (XmlException) {
- }
-#endif
}
[Test]
@@ -863,12 +852,6 @@ namespace MonoTests.System.Xml [Test]
//[NotWorking ("default namespace seems null, not String.Empty")]
-#if NET_2_0
-#else
- // MS.NET 1.x does not consider cases that xmlns* attributes
- // could be declared as default.
- [Category ("NotDotNet")]
-#endif
public void DefaultXmlnsAttributeLookup ()
{
string xml = @"<!DOCTYPE X [
@@ -924,7 +907,6 @@ namespace MonoTests.System.Xml Assert.AreEqual ("urn:hoge", xvr.LookupNamespace ("bar"), "#8-2");
}
-#if NET_2_0
[Test]
[ExpectedException (typeof (XmlSchemaException))]
public void Bug80231 ()
@@ -937,9 +919,7 @@ namespace MonoTests.System.Xml while (!r.EOF)
r.Read ();
}
-#endif
-#if NET_2_0
[Test]
public void Bug501814 ()
{
@@ -987,9 +967,7 @@ namespace MonoTests.System.Xml doc.Schemas.Add (schema);
doc.Validate (null);
}
-#endif
-#if NET_2_0
[Test]
public void Bug502168 ()
{
@@ -1072,6 +1050,5 @@ namespace MonoTests.System.Xml doc.Schemas.Add(schema);
doc.Validate(null);
}
-#endif
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs index bd5cb6af26f..f97dd4171c8 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs @@ -7,7 +7,6 @@ // (C)2004 Novell Inc. // -#if NET_2_0 using System; using System.IO; using System.Text; @@ -413,4 +412,3 @@ namespace MonoTests.System.Xml } } -#endif diff --git a/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs index 2cf11481ffa..632bba37180 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlWriterTests.cs @@ -110,9 +110,7 @@ namespace MonoTests.System.Xml }
[Test]
-#if NET_2_0
[Category ("NotDotNet")] // enbugged in 2.0
-#endif
[ExpectedException (typeof (XmlException))]
public void WriteNodeError ()
{
@@ -206,7 +204,6 @@ namespace MonoTests.System.Xml Assert.AreEqual (xml, writer.ToString ());
}
-#if NET_2_0
[Test]
public void Create_File ()
{
@@ -778,7 +775,6 @@ namespace MonoTests.System.Xml WriteState state = xw.WriteState;
}
-#endif
}
diff --git a/mcs/class/System.XML/Test/System.Xml/XsdParticleValidationTests.cs b/mcs/class/System.XML/Test/System.Xml/XsdParticleValidationTests.cs index 92d72231134..39c641491ed 100644 --- a/mcs/class/System.XML/Test/System.Xml/XsdParticleValidationTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XsdParticleValidationTests.cs @@ -11,11 +11,7 @@ using System.Xml; using System.Xml.Schema;
using NUnit.Framework;
-#if NET_2_0
using ValidationException = System.Xml.Schema.XmlSchemaValidationException;
-#else
-using ValidationException = System.Xml.Schema.XmlSchemaException;
-#endif
namespace MonoTests.System.Xml
{
@@ -48,10 +44,8 @@ namespace MonoTests.System.Xml }
[Test]
-#if NET_2_0
[Category ("NotDotNet")]
// MS.NET throws XmlSchemaException, not -ValidationException.
-#endif
[ExpectedException (typeof (ValidationException))]
public void ValidateRootElementOnlyInvalid ()
{
diff --git a/mcs/class/System.XML/Test/System.Xml/XsdValidatingReaderTests.cs b/mcs/class/System.XML/Test/System.Xml/XsdValidatingReaderTests.cs index e129d43ee5c..c07df9abc3e 100644 --- a/mcs/class/System.XML/Test/System.Xml/XsdValidatingReaderTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XsdValidatingReaderTests.cs @@ -322,12 +322,8 @@ namespace MonoTests.System.Xml }
[Test] // bug #79650
-#if NET_2_0
// annoyance
[ExpectedException (typeof (XmlSchemaValidationException))]
-#else
- [ExpectedException (typeof (XmlSchemaException))]
-#endif
public void EnumerationFacetOnAttribute ()
{
string xml = "<test mode='NOT A ENUMERATION VALUE' />";
@@ -390,7 +386,6 @@ namespace MonoTests.System.Xml validator.Read ();
}
-#if NET_2_0
[Test]
public void Bug81460 ()
{
@@ -404,15 +399,10 @@ namespace MonoTests.System.Xml r.MoveToFirstAttribute (); // default attribute
Assert.AreEqual (String.Empty, r.Prefix);
}
-#endif
[Test]
-#if NET_2_0
// annoyance
[ExpectedException (typeof (XmlSchemaValidationException))]
-#else
- [ExpectedException (typeof (XmlSchemaException))]
-#endif
public void Bug82099 ()
{
string xsd = @"
@@ -426,18 +416,12 @@ namespace MonoTests.System.Xml string xml = "<Customer name='Bob'> </Customer>";
-#if NET_2_0
XmlReaderSettings settings = new XmlReaderSettings ();
settings.Schemas.Add (schema);
settings.ValidationType = ValidationType.Schema;
XmlReader reader = XmlReader.Create (new StringReader (xml), settings);
-#else
- XmlValidatingReader reader = new XmlValidatingReader (xml, XmlNodeType.Document, null);
- reader.Schemas.Add (schema);
- reader.ValidationType = ValidationType.Schema;
-#endif
reader.Read ();
reader.Read ();
reader.Read ();
@@ -516,7 +500,6 @@ namespace MonoTests.System.Xml xvr.Schemas.Add (XmlSchema.Read (xsr, null));
while (!xvr.EOF)
xvr.Read ();
-#if NET_2_0
xtr = new XmlTextReader (new StringReader (xml));
xsr = new XmlTextReader (new StringReader (xsd));
var s = new XmlReaderSettings ();
@@ -525,10 +508,8 @@ namespace MonoTests.System.Xml XmlReader xvr2 = XmlReader.Create (xtr, s);
while (!xvr2.EOF)
xvr2.Read ();
-#endif
}
-#if NET_2_0
[Test]
public void WhitespaceAndElementOnly ()
{
@@ -648,6 +629,5 @@ namespace MonoTests.System.Xml while (!r.EOF)
r.Read ();
}
-#endif
}
}
diff --git a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs index c7ce390d9b9..882572b340d 100644 --- a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs +++ b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Attr/Attr.cs @@ -324,9 +324,7 @@ namespace nist_dom.fundamental //---------------------------------------------------------------------------- [Test] -#if NET_2_0 [Category ("NotDotNet")] -#endif public void core0006A() { string computedValue = ""; diff --git a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Element/Element.cs b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Element/Element.cs index 0ac43c1167a..5973928d7ed 100644 --- a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Element/Element.cs +++ b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/Element/Element.cs @@ -458,9 +458,7 @@ namespace nist_dom.fundamental //----------------------------------------------------------------------------
[Test]
-#if NET_2_0
[Category ("NotDotNet")]
-#endif
public void core0008E()
{
string computedValue = "";
@@ -960,9 +958,7 @@ namespace nist_dom.fundamental //----------------------------------------------------------------------------
[Test]
-#if NET_2_0
[Category ("NotDotNet")]
-#endif
public void core0016E()
{
string computedValue = "";
diff --git a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs index c3a961794bf..5e6187026f2 100644 --- a/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs +++ b/mcs/class/System.XML/Test/System.Xml/nist_dom/fundamental/NamedNodeMap/NamedNodeMap.cs @@ -510,9 +510,7 @@ namespace nist_dom.fundamental //----------------------------------------------------------------------------
[Test]
-#if NET_2_0
[Category ("NotDotNet")]
-#endif
public void core0009M()
{
string computedValue = "";
diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest.cs index cbe89abb77a..10cb55203a9 100644 --- a/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest.cs +++ b/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest.cs @@ -407,7 +407,6 @@ namespace MonoTests.System.Xml Assert.AreEqual (2, iter.Count, "#1"); } -#if NET_2_0 [Test] // bug #78067 @@ -442,7 +441,6 @@ namespace MonoTests.System.Xml xr.Read (); // should be at x:val Assert.AreEqual ("urn:x", xr.LookupNamespace ("x"), "#1"); } -#endif [Test] public void GetNamespaceConsistentTree () diff --git a/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest3.cs b/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest3.cs index 8be98040096..bebc468ec9b 100644 --- a/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest3.cs +++ b/mcs/class/System.Xml.Linq/Test/System.Xml.XPath/ExtensionsTest3.cs @@ -68,14 +68,6 @@ namespace MonoTests.System.Xml // Testing Core Funcetion Library functions defined at: http://www.w3.org/TR/xpath#corelib [Test] -#if !NET_2_0 - // .NET 2.0 is fixed for last() to return 1 for the - // initial context position. Someone thinks we should follow - // the fix, but in reality we should just discard this - // pointless test. The positional value under those conditions - // does not make any sense. - [Category ("NotDotNet")] -#endif public void CoreFunctionNodeSetLast () { expression = navigator.Compile("last()"); @@ -90,15 +82,6 @@ namespace MonoTests.System.Xml } [Test] -#if !NET_2_0 - // .NET 2.0 is fixed for position() to return 1 for the - // initial context position. Someone thinks we should follow - // the fix, but in reality we should just discard this - // pointless test. The positional value under those conditions - // does not make any sense. -// [Category ("NotWorking")] - [Category ("NotDotNet")] -#endif public void CoreFunctionNodeSetPosition () { expression = navigator.Compile("position()"); diff --git a/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderCas.cs b/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderCas.cs index ea7760f811e..e0a13028e4d 100644 --- a/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderCas.cs +++ b/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderCas.cs @@ -65,7 +65,6 @@ namespace MonoCasTests.Microsoft.CSharp { catch (NotImplementedException) { // mono } -#if NET_2_0 CodeTypeMember ctm = new CodeTypeMember (); StringWriter sw = new StringWriter (); CodeGeneratorOptions cgo = new CodeGeneratorOptions (); @@ -75,7 +74,6 @@ namespace MonoCasTests.Microsoft.CSharp { catch (NotImplementedException) { // mono } -#endif } // LinkDemand diff --git a/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs index fe60d4e5a86..7b988908317 100644 --- a/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs +++ b/mcs/class/System/Test/Microsoft.CSharp/CSharpCodeProviderTest.cs @@ -80,13 +80,11 @@ namespace MonoTests.Microsoft.CSharp Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.StaticConstructors), "#20"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.TryCatchStatements), "#21"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.Win32Resources), "#22"); -#if NET_2_0 Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.DeclareIndexerProperties), "#23"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.GenericTypeDeclaration), "#24"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.GenericTypeReference), "#25"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.PartialTypes), "#26"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.Resources), "#27"); -#endif } [Test] @@ -106,9 +104,7 @@ namespace MonoTests.Microsoft.CSharp options.GenerateExecutable = false; options.GenerateInMemory = true; options.TempFiles = new TempFileCollection (_tempDir); -#if NET_2_0 options.EmbeddedResources.Add (sourceFile); -#endif ICodeCompiler compiler = _codeProvider.CreateCompiler (); CompilerResults results = compiler.CompileAssemblyFromFile (options, @@ -129,7 +125,6 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (1, tempFiles.Length, "#5"); Assert.AreEqual (sourceFile, tempFiles[0], "#6"); -#if NET_2_0 string[] resources = compiledAssembly.GetManifestResourceNames(); Assert.IsNotNull (resources, "#7"); Assert.AreEqual (1, resources.Length, "#8"); @@ -141,7 +136,6 @@ namespace MonoTests.Microsoft.CSharp Assert.IsNull (info.FileName, "#13"); Assert.IsNull (info.ReferencedAssembly, "#14"); Assert.AreEqual ((ResourceLocation.Embedded | ResourceLocation.ContainedInManifestFile), info.ResourceLocation, "#15"); -#endif } [Test] @@ -171,10 +165,8 @@ namespace MonoTests.Microsoft.CSharp options.GenerateInMemory = true; options.OutputAssembly = string.Empty; options.TempFiles = new TempFileCollection (_tempDir); -#if NET_2_0 options.EmbeddedResources.Add (sourceFile1); options.LinkedResources.Add (sourceFile2); -#endif ICodeCompiler compiler = _codeProvider.CreateCompiler (); CompilerResults results = compiler.CompileAssemblyFromFileBatch (options, @@ -202,7 +194,6 @@ namespace MonoTests.Microsoft.CSharp Assert.IsTrue (File.Exists (sourceFile1), "#C2"); Assert.IsTrue (File.Exists (sourceFile2), "#C3"); -#if NET_2_0 string[] resources = compiledAssembly.GetManifestResourceNames(); Assert.IsNotNull (resources, "#D1"); Assert.AreEqual (2, resources.Length, "#D2"); @@ -233,7 +224,6 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual ("file2.cs", info.FileName, "#F6"); Assert.IsNull (info.ReferencedAssembly, "#F7"); Assert.AreEqual ((ResourceLocation) 0, info.ResourceLocation, "#F8"); -#endif } [Test] @@ -262,10 +252,8 @@ namespace MonoTests.Microsoft.CSharp options.GenerateExecutable = false; options.GenerateInMemory = true; options.TempFiles = new TempFileCollection (_tempDir); -#if NET_2_0 options.EmbeddedResources.Add (sourceFile1); options.LinkedResources.Add (sourceFile2); -#endif ICodeCompiler compiler = _codeProvider.CreateCompiler (); CompilerResults results = compiler.CompileAssemblyFromFileBatch (options, @@ -293,7 +281,6 @@ namespace MonoTests.Microsoft.CSharp Assert.IsTrue (File.Exists (sourceFile1), "#C2"); Assert.IsTrue (File.Exists (sourceFile2), "#C3"); -#if NET_2_0 string[] resources = compiledAssembly.GetManifestResourceNames(); Assert.IsNotNull (resources, "#D1"); Assert.AreEqual (2, resources.Length, "#D2"); @@ -324,7 +311,6 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual ("file2.cs", info.FileName, "#F6"); Assert.IsNull (info.ReferencedAssembly, "#F7"); Assert.AreEqual ((ResourceLocation) 0, info.ResourceLocation, "#F8"); -#endif } [Test] diff --git a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs index 2bcbb8be173..ce73d46fc06 100644 --- a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs +++ b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromExpressionTest.cs @@ -97,7 +97,6 @@ namespace MonoTests.Microsoft.CSharp sb.Length = 0; Assert.AreEqual ("void", Generate (new CodeTypeReferenceExpression (""), sw), "#10"); sb.Length = 0; -#if NET_2_0 Assert.AreEqual ("byte", Generate (new CodeTypeReferenceExpression (typeof (byte)), sw), "#11"); sb.Length = 0; Assert.AreEqual ("decimal", Generate (new CodeTypeReferenceExpression (typeof (decimal)), sw), "#12"); @@ -114,24 +113,6 @@ namespace MonoTests.Microsoft.CSharp sb.Length = 0; Assert.AreEqual ("float", Generate (new CodeTypeReferenceExpression (typeof (float)), sw), "#18"); sb.Length = 0; -#else - Assert.AreEqual (typeof (byte).FullName, Generate (new CodeTypeReferenceExpression (typeof (byte)), sw), "#19"); - sb.Length = 0; - Assert.AreEqual (typeof (decimal).FullName, Generate (new CodeTypeReferenceExpression (typeof (decimal)), sw), "#20"); - sb.Length = 0; - Assert.AreEqual (typeof (double).FullName, Generate (new CodeTypeReferenceExpression (typeof (double)), sw), "#21"); - sb.Length = 0; - Assert.AreEqual (typeof (sbyte).FullName, Generate (new CodeTypeReferenceExpression (typeof (sbyte)), sw), "#22"); - sb.Length = 0; - Assert.AreEqual (typeof (ushort).FullName, Generate (new CodeTypeReferenceExpression (typeof (ushort)), sw), "#23"); - sb.Length = 0; - Assert.AreEqual (typeof (uint).FullName, Generate (new CodeTypeReferenceExpression (typeof (uint)), sw), "#24"); - sb.Length = 0; - Assert.AreEqual (typeof (ulong).FullName, Generate (new CodeTypeReferenceExpression (typeof (ulong)), sw), "#25"); - sb.Length = 0; - Assert.AreEqual (typeof (float).FullName, Generate (new CodeTypeReferenceExpression (typeof (float)), sw), "#26"); - sb.Length = 0; -#endif sw.Close (); } } @@ -253,17 +234,9 @@ namespace MonoTests.Microsoft.CSharp sb.Length = 0; Assert.AreEqual ("'\\''", Generate (new CodePrimitiveExpression ('\''), sw), "#39"); sb.Length = 0; -#if NET_2_0 Assert.AreEqual ("'\\u2028'", Generate (new CodePrimitiveExpression ('\u2028'), sw), "#40"); -#else - Assert.AreEqual ("'\\u8232'", Generate (new CodePrimitiveExpression ('\u2028'), sw), "#40"); -#endif sb.Length = 0; -#if NET_2_0 Assert.AreEqual ("'\\u2029'", Generate (new CodePrimitiveExpression ('\u2029'), sw), "#41"); -#else - Assert.AreEqual ("'\\u8233'", Generate (new CodePrimitiveExpression ('\u2029'), sw), "#41"); -#endif sb.Length = 0; Assert.AreEqual ("'\u2030'", Generate (new CodePrimitiveExpression ('\u2030'), sw), "#42"); sw.Close (); @@ -506,7 +479,6 @@ namespace MonoTests.Microsoft.CSharp } } -#if NET_2_0 [Test] public void DefaultValueExpressionTest () { @@ -518,7 +490,6 @@ namespace MonoTests.Microsoft.CSharp sw.Close (); } } -#endif [Test] public void DelegateInvokeTest () diff --git a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs index d78c41692d7..17d7909c420 100644 --- a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs +++ b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromNamespaceTest.cs @@ -169,7 +169,6 @@ namespace MonoTests.Microsoft.CSharp "}}{0}", NewLine), Generate (options), "#B2"); } -#if NET_2_0 [Test] public void Type_TypeParameters () { @@ -531,6 +530,5 @@ namespace MonoTests.Microsoft.CSharp " }}{0}" + "}}{0}", NewLine), Generate ()); } -#endif } } diff --git a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromStatementTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromStatementTest.cs index aa3934eeea4..108611e752d 100644 --- a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromStatementTest.cs +++ b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromStatementTest.cs @@ -202,11 +202,7 @@ namespace MonoTests.Microsoft.CSharp " ;;{0}" + " DoB();{0}" + " ;{0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC();{0}" + "}}{0}", NewLine), Generate (), "#3"); @@ -217,20 +213,12 @@ namespace MonoTests.Microsoft.CSharp " ;;{0}" + " DoB();{0}" + " ;{0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC();{0}" + "}}{0}" + "else {{{0}" + " DoD();{0}" + -#if NET_2_0 "B{0}" + -#else - " B{0}" + -#endif " ;;{0}" + " DoE();{0}" + " ;{0}" + @@ -245,19 +233,11 @@ namespace MonoTests.Microsoft.CSharp " ;;{0}" + " DoB();{0}" + " ;{0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC();{0}" + "}} else {{{0}" + " DoD();{0}" + -#if NET_2_0 "B{0}" + -#else - " B{0}" + -#endif " ;;{0}" + " DoE();{0}" + " ;{0}" + @@ -273,11 +253,7 @@ namespace MonoTests.Microsoft.CSharp "}}{0}" + "else {{{0}" + " DoD();{0}" + -#if NET_2_0 "B{0}" + -#else - " B{0}" + -#endif " ;;{0}" + " DoE();{0}" + " ;{0}" + @@ -292,11 +268,7 @@ namespace MonoTests.Microsoft.CSharp " ;;{0}" + " DoB();{0}" + " ;{0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC();{0}" + "}}{0}", NewLine), Generate (), "#7"); } @@ -380,17 +352,9 @@ namespace MonoTests.Microsoft.CSharp " ;;{0}" + " DoB();{0}" + "test:{0}" + -#if NET_2_0 "C{0}" + -#else - " C{0}" + -#endif " ;{0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC();{0}" + "}}{0}", NewLine), Generate (), "#5"); } @@ -411,11 +375,7 @@ namespace MonoTests.Microsoft.CSharp cls.Statement = new CodeSnippetStatement ("A"); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "class:{0}" + -#if NET_2_0 "A{0}", -#else - " A{0}", -#endif NewLine), Generate (), "#3"); } @@ -538,13 +498,8 @@ namespace MonoTests.Microsoft.CSharp "catch (System.ApplicationException ) {{{0}" + "}}{0}" + "finally {{{0}" + -#if NET_2_0 "A{0}" + "B{0}" + -#else - " A{0}" + - " B{0}" + -#endif "}}{0}", NewLine), Generate (), "#1"); options.ElseOnClosing = true; @@ -555,13 +510,8 @@ namespace MonoTests.Microsoft.CSharp "}} catch (System.ArgumentException ex1) {{{0}" + "}} catch (System.ApplicationException ) {{{0}" + "}} finally {{{0}" + -#if NET_2_0 "A{0}" + "B{0}" + -#else - " A{0}" + - " B{0}" + -#endif "}}{0}", NewLine), Generate (), "#2"); statement = new CodeTryCatchFinallyStatement (); diff --git a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromTypeTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromTypeTest.cs index 3fcc1d6d3b7..42a42146a3e 100644 --- a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromTypeTest.cs +++ b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorFromTypeTest.cs @@ -110,11 +110,7 @@ namespace MonoTests.Microsoft.CSharp { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "internal abstract class Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#else - "abstract class Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#endif "}}{0}", NewLine), code); } @@ -160,11 +156,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal event int Click;{0}" + -#else - " /*FamANDAssem*/ internal event int Click;{0}" + -#endif "}}{0}", NewLine), code); } @@ -331,11 +323,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Name {{{0}" + -#else - " internal int Name {{{0}" + -#endif " set {{{0}" + " }}{0}" + " }}{0}" + @@ -404,11 +392,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Name {{{0}" + -#else - " internal int Name {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -664,11 +648,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Execute() {{{0}" + -#else - " internal int Execute() {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -680,11 +660,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Execute() {{{0}" + -#else - " internal int Execute() {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -762,11 +738,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " public virtual int Something([A()] [B()] params out object value, [C()] ref int ) {{{0}" + -#else - " public virtual int Something([A()] [System.ParamArrayAttribute()] [B()] out object value, [C()] ref int ) {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -780,19 +752,10 @@ namespace MonoTests.Microsoft.CSharp " {0}" + " [A()]{0}" + " [B()]{0}" + -#if NET_2_0 " params{0}" + -#else - " [System.ParamArrayAttribute()]{0}" + -#endif " [return: C(A1=false, A2=true)]{0}" + -#if !NET_2_0 - " [return: System.ParamArrayAttribute()]{0}" + -#endif " [return: D()]{0}" + -#if NET_2_0 " return: params{0}" + -#endif " public virtual int Execute() {{{0}" + " }}{0}" + "}}{0}", NewLine), code); @@ -928,10 +891,8 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " [B()]{0}" + -#endif " static Test1() {{{0}" + " }}{0}" + "}}{0}", NewLine), code); @@ -948,10 +909,8 @@ namespace MonoTests.Microsoft.CSharp "public class Test1{0}" + "{{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " [B()]{0}" + -#endif " static Test1(){0}" + " {{{0}" + " }}{0}" + @@ -965,12 +924,8 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public class Test1 {{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " public static int Main() {{{0}" + -#else - " public static void Main() {{{0}" + -#endif " Test.InnerType x;{0}" + " }}{0}" + "}}{0}", NewLine), code); @@ -996,7 +951,6 @@ namespace MonoTests.Microsoft.CSharp Assert.IsTrue (sw.ToString ().IndexOf ("@default") > 0); } -#if NET_2_0 [Test] public void GenericCodeTypeReferencesTest () { @@ -1009,9 +963,7 @@ namespace MonoTests.Microsoft.CSharp " private System.Nullable<> Bar;{0}" + "}}{0}", NewLine), code); } -#endif -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -1020,7 +972,6 @@ namespace MonoTests.Microsoft.CSharp "public partial class Test1 {{{0}" + "}}{0}", NewLine), code); } -#endif } [TestFixture] @@ -1503,17 +1454,12 @@ namespace MonoTests.Microsoft.CSharp string code = GenerateEntryPointMethod (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public delegate void Test1();{0}{0}" + -#if NET_2_0 "[A()]{0}" + "public static int Main() {{{0}" + -#else - "public static void Main() {{{0}" + -#endif " Test.InnerType x;{0}" + "}}{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -1522,7 +1468,6 @@ namespace MonoTests.Microsoft.CSharp "public delegate void Test1();{0}" , NewLine), code); } -#endif #endregion Override implementation of CodeGeneratorFromTypeTestBase } @@ -1616,11 +1561,7 @@ namespace MonoTests.Microsoft.CSharp { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "internal interface Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#else - "interface Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#endif "}}{0}", NewLine), code); } @@ -1666,11 +1607,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public interface Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal event int Click;{0}" + -#else - " /*FamANDAssem*/ internal event int Click;{0}" + -#endif "}}{0}", NewLine), code); } @@ -2131,11 +2068,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public interface Test1 {{{0}" + " {0}" + -#if NET_2_0 " int Something([A()] [B()] params out object value, [C()] ref int );{0}" + -#else - " int Something([A()] [System.ParamArrayAttribute()] [B()] out object value, [C()] ref int );{0}" + -#endif "}}{0}", NewLine), code); } @@ -2148,19 +2081,10 @@ namespace MonoTests.Microsoft.CSharp " {0}" + " [A()]{0}" + " [B()]{0}" + -#if NET_2_0 " params{0}" + -#else - " [System.ParamArrayAttribute()]{0}" + -#endif " [return: C(A1=false, A2=true)]{0}" + -#if !NET_2_0 - " [return: System.ParamArrayAttribute()]{0}" + -#endif " [return: D()]{0}" + -#if NET_2_0 " return: params{0}" + -#endif " int Execute();{0}" + "}}{0}", NewLine), code); } @@ -2291,18 +2215,13 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public interface Test1 {{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " public static int Main() {{{0}" + -#else - " public static void Main() {{{0}" + -#endif " Test.InnerType x;{0}" + " }}{0}" + "}}{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -2311,7 +2230,6 @@ namespace MonoTests.Microsoft.CSharp "public partial interface Test1 {{{0}" + "}}{0}", NewLine), code); } -#endif #endregion Override implementation of CodeGeneratorFromTypeTestBase } @@ -2404,11 +2322,7 @@ namespace MonoTests.Microsoft.CSharp { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "internal struct Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#else - "struct Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#endif "}}{0}", NewLine), code); } @@ -2454,11 +2368,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal event int Click;{0}" + -#else - " /*FamANDAssem*/ internal event int Click;{0}" + -#endif "}}{0}", NewLine), code); } @@ -2570,11 +2480,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Name {{{0}" + -#else - " internal int Name {{{0}" + -#endif " set {{{0}" + " }}{0}" + " }}{0}" + @@ -2643,11 +2549,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Name {{{0}" + -#else - " internal int Name {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -2879,11 +2781,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Execute() {{{0}" + -#else - " internal int Execute() {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -2895,11 +2793,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " internal virtual int Execute() {{{0}" + -#else - " internal int Execute() {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -2965,11 +2859,7 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " public virtual int Something([A()] [B()] params out object value, [C()] ref int ) {{{0}" + -#else - " public virtual int Something([A()] [System.ParamArrayAttribute()] [B()] out object value, [C()] ref int ) {{{0}" + -#endif " }}{0}" + "}}{0}", NewLine), code); } @@ -2983,19 +2873,10 @@ namespace MonoTests.Microsoft.CSharp " {0}" + " [A()]{0}" + " [B()]{0}" + -#if NET_2_0 " params{0}" + -#else - " [System.ParamArrayAttribute()]{0}" + -#endif " [return: C(A1=false, A2=true)]{0}" + -#if !NET_2_0 - " [return: System.ParamArrayAttribute()]{0}" + -#endif " [return: D()]{0}" + -#if NET_2_0 " return: params{0}" + -#endif " public virtual int Execute() {{{0}" + " }}{0}" + "}}{0}", NewLine), code); @@ -3131,10 +3012,8 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " [B()]{0}" + -#endif " static Test1() {{{0}" + " }}{0}" + "}}{0}", NewLine), code, "#1"); @@ -3151,10 +3030,8 @@ namespace MonoTests.Microsoft.CSharp "public struct Test1{0}" + "{{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " [B()]{0}" + -#endif " static Test1(){0}" + " {{{0}" + " }}{0}" + @@ -3168,18 +3045,13 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public struct Test1 {{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " public static int Main() {{{0}" + -#else - " public static void Main() {{{0}" + -#endif " Test.InnerType x;{0}" + " }}{0}" + "}}{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -3188,7 +3060,6 @@ namespace MonoTests.Microsoft.CSharp "public partial struct Test1 {{{0}" + "}}{0}", NewLine), code); } -#endif #endregion Override implementation of CodeGeneratorFromTypeTestBase } @@ -3281,11 +3152,7 @@ namespace MonoTests.Microsoft.CSharp { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "internal enum Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#else - "enum Test1 : int, System.Security.Principal.IIdentity, string, System.Security.IPermission {{{0}" + -#endif "}}{0}", NewLine), code); } @@ -3841,18 +3708,13 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "public enum Test1 {{{0}" + " {0}" + -#if NET_2_0 " [A()]{0}" + " public static int Main() {{{0}" + -#else - " public static void Main() {{{0}" + -#endif " Test.InnerType x;{0}" + " }}{0}" + "}}{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -3861,7 +3723,6 @@ namespace MonoTests.Microsoft.CSharp "public enum Test1 {{{0}" + "}}{0}", NewLine), code); } -#endif #endregion Override implementation of CodeGeneratorFromTypeTestBase } diff --git a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorTypeOutputTest.cs b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorTypeOutputTest.cs index 547844fd425..b21620bbcbe 100644 --- a/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorTypeOutputTest.cs +++ b/mcs/class/System/Test/Microsoft.CSharp/CodeGeneratorTypeOutputTest.cs @@ -9,9 +9,7 @@ using System; using System.CodeDom; using System.CodeDom.Compiler; -#if NET_2_0 using System.Collections.Generic; -#endif using NUnit.Framework; @@ -30,7 +28,6 @@ namespace MonoTests.Microsoft.CSharp gen = new CSharpCodeProvider ().CreateGenerator (); } -#if NET_2_0 // This test fails on 2.0 profile, because our CodeTypeReference does not // parse basetype from right to left. [Test] @@ -40,7 +37,6 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual ("A[,,][,]", gen.GetTypeOutput (new CodeTypeReference ("A[,,][,]")), "#5"); Assert.AreEqual ("A<B, D>[,]", gen.GetTypeOutput (new CodeTypeReference ("A[B,,D][,]")), "#6"); } -#endif [Test] public void GetTypeOutput () @@ -49,19 +45,8 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual ("A[]", gen.GetTypeOutput (new CodeTypeReference ("A[]")), "#2"); Assert.AreEqual ("int[]", gen.GetTypeOutput (new CodeTypeReference (typeof (int).FullName, 1)), "#3"); Assert.AreEqual ("int[,]", gen.GetTypeOutput (new CodeTypeReference (typeof (int).FullName, 2)), "#4"); -#if NET_2_0 Assert.AreEqual ("System.Nullable<int>", gen.GetTypeOutput (new CodeTypeReference (typeof (int?))), "#7"); Assert.AreEqual ("System.Collections.Generic.Dictionary<int, string>", gen.GetTypeOutput (new CodeTypeReference (typeof (Dictionary<int, string>))), "#8"); -#else - Assert.AreEqual ("A[,,][,]", gen.GetTypeOutput (new CodeTypeReference ("A[,,][,]")), "#5"); - Assert.AreEqual ("A[B,,D][,]", gen.GetTypeOutput (new CodeTypeReference ("A[B,,D][,]")), "#6"); - Assert.AreEqual ("System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", - gen.GetTypeOutput (new CodeTypeReference ("System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]")), - "#9"); - Assert.AreEqual ("System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]", - gen.GetTypeOutput (new CodeTypeReference ("System.Collections.Generic.Dictionary`2[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]")), - "#10"); -#endif } [Test] @@ -82,7 +67,6 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual ("object", gen.GetTypeOutput (new CodeTypeReference ("systeM.oBject")), "#14"); Assert.AreEqual ("void", gen.GetTypeOutput (new CodeTypeReference (typeof(void))), "#15"); Assert.AreEqual ("void", gen.GetTypeOutput (new CodeTypeReference ("systeM.vOid")), "#16"); -#if NET_2_0 Assert.AreEqual ("byte", gen.GetTypeOutput (new CodeTypeReference (typeof(byte))), "#17"); Assert.AreEqual ("byte", gen.GetTypeOutput (new CodeTypeReference ("systeM.bYte")), "#18"); Assert.AreEqual ("sbyte", gen.GetTypeOutput (new CodeTypeReference (typeof(sbyte))), "#19"); @@ -99,24 +83,6 @@ namespace MonoTests.Microsoft.CSharp Assert.AreEqual ("ulong", gen.GetTypeOutput (new CodeTypeReference ("systeM.uinT64")), "#30"); Assert.AreEqual ("ushort", gen.GetTypeOutput (new CodeTypeReference (typeof (ushort))), "#31"); Assert.AreEqual ("ushort", gen.GetTypeOutput (new CodeTypeReference ("systeM.uinT16")), "#32"); -#else - Assert.AreEqual (typeof (byte).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (byte))), "#17"); - Assert.AreEqual ("systeM.bYte", gen.GetTypeOutput (new CodeTypeReference ("systeM.bYte")), "#18"); - Assert.AreEqual (typeof (sbyte).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (sbyte))), "#19"); - Assert.AreEqual ("systeM.sBYte", gen.GetTypeOutput (new CodeTypeReference ("systeM.sBYte")), "#20"); - Assert.AreEqual (typeof (decimal).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (decimal))), "#21"); - Assert.AreEqual ("systeM.dEcimal", gen.GetTypeOutput (new CodeTypeReference ("systeM.dEcimal")), "#22"); - Assert.AreEqual (typeof (double).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (double))), "#23"); - Assert.AreEqual ("systeM.dOuble", gen.GetTypeOutput (new CodeTypeReference ("systeM.dOuble")), "#24"); - Assert.AreEqual (typeof (float).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (float))), "#25"); - Assert.AreEqual ("systeM.SiNgle", gen.GetTypeOutput (new CodeTypeReference ("systeM.SiNgle")), "#26"); - Assert.AreEqual (typeof (uint).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (uint))), "#27"); - Assert.AreEqual ("systeM.UinT32", gen.GetTypeOutput (new CodeTypeReference ("systeM.UinT32")), "#28"); - Assert.AreEqual (typeof (ulong).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (ulong))), "#29"); - Assert.AreEqual ("systeM.uinT64", gen.GetTypeOutput (new CodeTypeReference ("systeM.uinT64")), "#30"); - Assert.AreEqual (typeof (ushort).FullName, gen.GetTypeOutput (new CodeTypeReference (typeof (ushort))), "#31"); - Assert.AreEqual ("systeM.uinT16", gen.GetTypeOutput (new CodeTypeReference ("systeM.uinT16")), "#32"); -#endif } } } diff --git a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromExpressionTest.cs b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromExpressionTest.cs index b1962777675..ba97e7d12b1 100644 --- a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromExpressionTest.cs +++ b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromExpressionTest.cs @@ -86,7 +86,6 @@ namespace MonoTests.Microsoft.VisualBasic sb.Length = 0; Assert.AreEqual (typeof (void).FullName, Generate (new CodeTypeReferenceExpression (""), sw), "#14"); sb.Length = 0; -#if NET_2_0 Assert.AreEqual ("SByte", Generate (new CodeTypeReferenceExpression (typeof (sbyte)), sw), "#15"); sb.Length = 0; Assert.AreEqual ("UShort", Generate (new CodeTypeReferenceExpression (typeof (ushort)), sw), "#16"); @@ -95,16 +94,6 @@ namespace MonoTests.Microsoft.VisualBasic sb.Length = 0; Assert.AreEqual ("ULong", Generate (new CodeTypeReferenceExpression (typeof (ulong)), sw), "#18"); sb.Length = 0; -#else - Assert.AreEqual (typeof (sbyte).FullName, Generate (new CodeTypeReferenceExpression (typeof (sbyte)), sw), "#19"); - sb.Length = 0; - Assert.AreEqual (typeof(ushort).FullName, Generate (new CodeTypeReferenceExpression (typeof (ushort)), sw), "#20"); - sb.Length = 0; - Assert.AreEqual (typeof(uint).FullName, Generate (new CodeTypeReferenceExpression (typeof (uint)), sw), "#21"); - sb.Length = 0; - Assert.AreEqual (typeof(ulong).FullName, Generate (new CodeTypeReferenceExpression (typeof (ulong)), sw), "#22"); - sb.Length = 0; -#endif sw.Close (); } } @@ -153,11 +142,7 @@ namespace MonoTests.Microsoft.VisualBasic [Test] public void PrimitiveExpressionTest_Char () { -#if NET_2_0 string vbNs = "Global.Microsoft.VisualBasic"; -#else - string vbNs = "Microsoft.VisualBasic"; -#endif StringBuilder sb = new StringBuilder (); using (StringWriter sw = new StringWriter (sb)) { @@ -315,28 +300,16 @@ namespace MonoTests.Microsoft.VisualBasic using (StringWriter sw = new StringWriter (sb)) { cpde = new CodeParameterDeclarationExpression (); -#if NET_2_0 Assert.AreEqual ("ByVal __exception As System.Void", Generate (cpde, sw), "#1"); -#else - Assert.AreEqual ("ByVal As System.Void", Generate (cpde, sw), "#1"); -#endif sb.Length = 0; cpde = new CodeParameterDeclarationExpression ((string) null, (string) null); -#if NET_2_0 Assert.AreEqual ("ByVal __exception As System.Void", Generate (cpde, sw), "#2"); -#else - Assert.AreEqual ("ByVal As System.Void", Generate (cpde, sw), "#2"); -#endif sb.Length = 0; cpde = new CodeParameterDeclarationExpression ("A", (string) null); -#if NET_2_0 Assert.AreEqual ("ByVal __exception As A", Generate (cpde, sw), "#3"); -#else - Assert.AreEqual ("ByVal As A", Generate (cpde, sw), "#3"); -#endif sb.Length = 0; cpde = new CodeParameterDeclarationExpression ((string) null, "B"); @@ -507,31 +480,19 @@ namespace MonoTests.Microsoft.VisualBasic sb = new StringBuilder (); using (StringWriter sw = new StringWriter (sb)) { code = Generate (new CodeDelegateInvokeExpression (null, new CodePrimitiveExpression ("abc")), sw); -#if NET_2_0 Assert.AreEqual ("(\"abc\")", code, "#01"); -#else - Assert.AreEqual ("RaiseEvent (\"abc\")", code, "#01"); -#endif } sb = new StringBuilder (); using (StringWriter sw = new StringWriter (sb)) { code = Generate (new CodeDelegateInvokeExpression (new CodeThisReferenceExpression (), new CodePrimitiveExpression ("abc")), sw); -#if NET_2_0 Assert.AreEqual ("Me(\"abc\")", code, "#02"); -#else - Assert.AreEqual ("RaiseEvent Me(\"abc\")", code, "#02"); -#endif } sb = new StringBuilder (); using (StringWriter sw = new StringWriter (sb)) { code = Generate (new CodeDelegateInvokeExpression (new CodePrimitiveExpression ("primitive"), new CodePrimitiveExpression ("abc")), sw); -#if NET_2_0 Assert.AreEqual ("\"primitive\"(\"abc\")", code, "#03"); -#else - Assert.AreEqual ("RaiseEvent \"primitive\"(\"abc\")", code, "#03"); -#endif } sb = new StringBuilder (); diff --git a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromNamespaceTest.cs b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromNamespaceTest.cs index a35c8c51490..31f8a8390b7 100644 --- a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromNamespaceTest.cs +++ b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromNamespaceTest.cs @@ -161,7 +161,6 @@ namespace MonoTests.Microsoft.VisualBasic "End Namespace{0}", NewLine), Generate (options), "#B2"); } -#if NET_2_0 [Test] public void Type_TypeParameters () { @@ -478,6 +477,5 @@ namespace MonoTests.Microsoft.VisualBasic " End Class{0}" + "End Namespace{0}", NewLine), Generate ()); } -#endif } } diff --git a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromStatementTest.cs b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromStatementTest.cs index bdf2b11b251..aba747c13a2 100644 --- a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromStatementTest.cs +++ b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromStatementTest.cs @@ -243,11 +243,7 @@ namespace MonoTests.Microsoft.VisualBasic " ;{0}" + " DoB(){0}" + " {0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC(){0}" + "End If{0}", NewLine), Generate (), "#3"); @@ -258,19 +254,11 @@ namespace MonoTests.Microsoft.VisualBasic " ;{0}" + " DoB(){0}" + " {0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC(){0}" + "Else{0}" + " DoD(){0}" + -#if NET_2_0 "B{0}" + -#else - " B{0}" + -#endif " ;{0}" + " DoE(){0}" + " {0}" + @@ -285,19 +273,11 @@ namespace MonoTests.Microsoft.VisualBasic " ;{0}" + " DoB(){0}" + " {0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC(){0}" + "Else{0}" + " DoD(){0}" + -#if NET_2_0 "B{0}" + -#else - " B{0}" + -#endif " ;{0}" + " DoE(){0}" + " {0}" + @@ -312,11 +292,7 @@ namespace MonoTests.Microsoft.VisualBasic "If true == false Then{0}" + "Else{0}" + " DoD(){0}" + -#if NET_2_0 "B{0}" + -#else - " B{0}" + -#endif " ;{0}" + " DoE(){0}" + " {0}" + @@ -331,11 +307,7 @@ namespace MonoTests.Microsoft.VisualBasic " ;{0}" + " DoB(){0}" + " {0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC(){0}" + "End If{0}", NewLine), Generate (), "#7"); } @@ -422,17 +394,9 @@ namespace MonoTests.Microsoft.VisualBasic " ;{0}" + " DoB(){0}" + "test:{0}" + -#if NET_2_0 "C{0}" + -#else - " C{0}" + -#endif " {0}" + -#if NET_2_0 "A{0}" + -#else - " A{0}" + -#endif " DoC(){0}" + " testInt = (testInt + 1){0}" + "Loop{0}", NewLine), Generate (), "#5"); @@ -454,11 +418,7 @@ namespace MonoTests.Microsoft.VisualBasic cls.Statement = new CodeSnippetStatement ("A"); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "class:{0}" + -#if NET_2_0 "A{0}", -#else - " A{0}", -#endif NewLine), Generate (), "#3"); } @@ -575,19 +535,10 @@ namespace MonoTests.Microsoft.VisualBasic "Try {0}" + " goto exit{0}" + "Catch ex1 As System.ArgumentException{0}" + -#if NET_2_0 "Catch __exception As System.ApplicationException{0}" + -#else - "Catch As System.ApplicationException{0}" + -#endif "Finally{0}" + -#if NET_2_0 "A{0}" + "B{0}" + -#else - " A{0}" + - " B{0}" + -#endif "End Try{0}", NewLine), Generate (), "#1"); options.ElseOnClosing = true; @@ -595,19 +546,10 @@ namespace MonoTests.Microsoft.VisualBasic "Try {0}" + " goto exit{0}" + "Catch ex1 As System.ArgumentException{0}" + -#if NET_2_0 "Catch __exception As System.ApplicationException{0}" + -#else - "Catch As System.ApplicationException{0}" + -#endif "Finally{0}" + -#if NET_2_0 "A{0}" + "B{0}" + -#else - " A{0}" + - " B{0}" + -#endif "End Try{0}", NewLine), Generate (), "#2"); statement = new CodeTryCatchFinallyStatement (); @@ -630,11 +572,7 @@ namespace MonoTests.Microsoft.VisualBasic statement = cvds; Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "Dim __exception As System.Void{0}", -#else - "Dim As System.Void{0}", -#endif NewLine), Generate (), "#1"); cvds.Name = "class"; @@ -655,11 +593,7 @@ namespace MonoTests.Microsoft.VisualBasic cvds.Name = null; Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "Dim __exception As Integer = 25{0}", -#else - "Dim As Integer = 25{0}", -#endif NewLine), Generate (), "#6"); } } diff --git a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromTypeTest.cs b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromTypeTest.cs index 207bb9f4786..335daa73a8d 100644 --- a/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromTypeTest.cs +++ b/mcs/class/System/Test/Microsoft.VisualBasic/CodeGeneratorFromTypeTest.cs @@ -76,11 +76,7 @@ namespace MonoTests.Microsoft.VisualBasic { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "Friend MustInherit Class Test1{0}" + -#else - "MustInherit Class Test1{0}" + -#endif " Inherits Integer{0}" + " Implements System.Security.Principal.IIdentity, String, System.Security.IPermission{0}" + "End Class{0}", NewLine), code); @@ -106,11 +102,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Private Event __exception As System.Void{0}" + -#else - " Private Event As System.Void{0}" + -#endif "End Class{0}", NewLine), code); } @@ -132,11 +124,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Friend Event Click As Integer Implements IPolicy.Click , IWhatever.Click{0}" + -#else - " Friend Event Click As Integer{0}" + -#endif "End Class{0}", NewLine), code); } @@ -151,11 +139,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Protected Event System_Int32_Click As Integer Implements Integer.Click{0}" + -#else - " Protected Event Click As Integer{0}" + -#endif "End Class{0}", NewLine), code); } @@ -170,11 +154,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Event System_Int32_Click As Integer Implements IPolicy.Click{0}" + -#else - " Public Event Click As Integer{0}" + -#endif "End Class{0}", NewLine), code); } @@ -187,11 +167,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Private __exception As System.Void{0}" + -#else - " Private As System.Void{0}" + -#endif "End Class{0}", NewLine), code); } @@ -225,11 +201,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public MustInherit Class Test1{0}" + " {0}" + -#if NET_2_0 " Public MustOverride Property Name() As String{0}" + -#else - " Public MustOverride Property Name As String{0}" + -#endif " Get{0}" + " Set{0}" + " End Property{0}" + @@ -243,11 +215,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Shared WriteOnly Property Name() As String{0}" + -#else - " Public Shared WriteOnly Property Name As String{0}" + -#endif " Set{0}" + " End Set{0}" + " End Property{0}" + @@ -263,11 +231,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Private Property () As System.Void{0}" + -#else - " Private Property As System.Void{0}" + -#endif " End Property{0}" + "End Class{0}", NewLine), code); } @@ -280,11 +244,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property Name() As Integer{0}" + -#else - " Public Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + "End Class{0}", NewLine), code); } @@ -297,11 +257,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Protected Overridable ReadOnly Property Name() As Integer{0}" + -#else - " Protected Overridable ReadOnly Property Name As Integer{0}" + -#endif " Get{0}" + " End Get{0}" + " End Property{0}" + @@ -316,11 +272,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overridable WriteOnly Property Name() As Integer{0}" + -#else - " Friend WriteOnly Property Name As Integer{0}" + -#endif " Set{0}" + " End Set{0}" + " End Property{0}" + @@ -335,11 +287,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Protected Overridable Property Name() As Integer{0}" + -#else - " Protected Overridable Property Name As Integer{0}" + -#endif " Get{0}" + " End Get{0}" + " Set{0}" + @@ -361,11 +309,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Protected Friend Property Name() As Integer{0}" + -#else - " Protected Friend Property Name As Integer{0}" + -#endif " End Property{0}" + "End Class{0}", NewLine), code); } @@ -383,11 +327,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overridable Property Name() As Integer{0}" + -#else - " Friend Property Name As Integer{0}" + -#endif " End Property{0}" + "End Class{0}", NewLine), code); } @@ -433,11 +373,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property iTem() As Integer{0}" + -#else - " Public Overridable Property iTem As Integer{0}" + -#endif " End Property{0}" + "End Class{0}", NewLine), code); } @@ -485,11 +421,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property Name() As Integer Implements IPolicy.Name , IWhatever.Name{0}" + -#else - " Public Overridable Property Name As Integer Implements IPolicy.Name , IWhatever.Name{0}" + -#endif " End Property{0}" + "End Class{0}", NewLine), code); } @@ -505,11 +437,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Protected Overloads Overridable Property Name() As Integer{0}" + -#else - " Protected Overloads Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + "End Class{0}", NewLine), code); } @@ -525,11 +453,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Overloads Overridable Property Name() As Integer{0}" + -#else - " Public Overloads Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + " {0}" + " Private Overloads Property Name(ByVal value1 As Object) As Integer{0}" + @@ -548,11 +472,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property Name() As Integer{0}" + -#else - " Public Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + " {0}" + " Property System_Int32_Name(ByVal value1 As Object) As Integer Implements Integer.Name{0}" + @@ -600,11 +520,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Private Shadows Property Name() As Integer{0}" + -#else - " Private Shadows Property Name As Integer{0}" + -#endif " Get{0}" + " End Get{0}" + " Set{0}" + @@ -646,11 +562,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef __exception As Integer) As Integer{0}" + -#else - " Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef As Integer) As Integer{0}" + -#endif " End Function{0}" + "End Class{0}", NewLine), code); } @@ -662,11 +574,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overridable Function Execute() As Integer Implements IPolicy.Execute , IWhatever.Execute{0}" + -#else - " Friend Function Execute() As Integer Implements IPolicy.Execute , IWhatever.Execute{0}" + -#endif " End Function{0}" + "End Class{0}", NewLine), code); } @@ -682,11 +590,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overloads Overridable Function Execute() As Integer{0}" + -#else - " Friend Overloads Function Execute() As Integer{0}" + -#endif " End Function{0}" + "End Class{0}", NewLine), code); } @@ -768,11 +672,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Function Something(<A(), System.ParamArrayAttribute(), B()> ByRef value As Object, <C()> ByRef __exception As Integer) As Integer{0}" + -#else - " Public Overridable Function Something(<A(), System.ParamArrayAttribute(), B()> ByRef value As Object, <C()> ByRef As Integer) As Integer{0}" + -#endif " End Function{0}" + "End Class{0}", NewLine), code); } @@ -907,10 +807,8 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " <A(), _{0}" + " B()> _{0}" + -#endif " Shared Sub New(){0}" + " End Sub{0}" + "End Class{0}", NewLine), code); @@ -923,16 +821,13 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Class Test1{0}" + " {0}" + -#if NET_2_0 " <A()> _{0}" + -#endif " Public Shared Sub Main(){0}" + " Dim x As Test.InnerType{0}" + " End Sub{0}" + "End Class{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -941,7 +836,6 @@ namespace MonoTests.Microsoft.VisualBasic "Partial Public Class Test1{0}" + "End Class{0}", NewLine), code); } -#endif } [TestFixture] @@ -1418,9 +1312,7 @@ namespace MonoTests.Microsoft.VisualBasic string code = GenerateEntryPointMethod (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Delegate Sub Test1(){0}{0}" + -#if NET_2_0 "<A()> _{0}" + -#endif "Public Shared Sub Main(){0}" + " Dim x As Test.InnerType{0}" + "End Sub{0}", NewLine), code); @@ -1437,7 +1329,6 @@ namespace MonoTests.Microsoft.VisualBasic "Public Delegate Sub A(ByVal param As type){0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -1445,7 +1336,6 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Delegate Sub Test1(){0}", NewLine), code); } -#endif } [TestFixture] @@ -1505,11 +1395,7 @@ namespace MonoTests.Microsoft.VisualBasic { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "Friend Interface Test1{0}" + -#else - "Interface Test1{0}" + -#endif " Inherits Integer, System.Security.Principal.IIdentity, String, System.Security.IPermission{0}" + "End Interface{0}", NewLine), code); } @@ -1534,11 +1420,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Private Event __exception As System.Void{0}" + -#else - " Private Event As System.Void{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1560,11 +1442,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Friend Event Click As Integer Implements IPolicy.Click , IWhatever.Click{0}" + -#else - " Friend Event Click As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1575,11 +1453,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Protected Event System_Int32_Click As Integer Implements Integer.Click{0}" + -#else - " Protected Event Click As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1590,11 +1464,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Public Event System_Int32_Click As Integer Implements IPolicy.Click{0}" + -#else - " Public Event Click As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1638,11 +1508,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Property () As System.Void{0}" + -#else - " Property As System.Void{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1654,11 +1520,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer{0}" + -#else - " Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1670,11 +1532,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " ReadOnly Property Name() As Integer{0}" + -#else - " ReadOnly Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1686,11 +1544,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " WriteOnly Property Name() As Integer{0}" + -#else - " WriteOnly Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1702,11 +1556,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer{0}" + -#else - " Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1718,11 +1568,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer{0}" + -#else - " Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1734,11 +1580,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer{0}" + -#else - " Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1773,11 +1615,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property iTem() As Integer{0}" + -#else - " Property iTem As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1812,11 +1650,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer Implements IPolicy.Name , IWhatever.Name{0}" + -#else - " Property Name As Integer Implements IPolicy.Name , IWhatever.Name{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1827,11 +1661,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer{0}" + -#else - " Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1842,11 +1672,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer{0}" + -#else - " Property Name As Integer{0}" + -#endif " {0}" + " Property Name(ByVal value1 As Object) As Integer{0}" + "End Interface{0}", NewLine), code); @@ -1859,11 +1685,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Property Name() As Integer{0}" + -#else - " Property Name As Integer{0}" + -#endif " {0}" + " Property System_Int32_Name(ByVal value1 As Object) As Integer Implements Integer.Name{0}" + "End Interface{0}", NewLine), code); @@ -1899,11 +1721,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Shadows Property Name() As Integer{0}" + -#else - " Shadows Property Name As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -1938,11 +1756,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef __exception As Integer) As Integer{0}" + -#else - " Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef As Integer) As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -2023,11 +1837,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " Function Something(<A(), System.ParamArrayAttribute(), B()> ByRef value As Object, <C()> ByRef __exception As Integer) As Integer{0}" + -#else - " Function Something(<A(), System.ParamArrayAttribute(), B()> ByRef value As Object, <C()> ByRef As Integer) As Integer{0}" + -#endif "End Interface{0}", NewLine), code); } @@ -2143,16 +1953,13 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Interface Test1{0}" + " {0}" + -#if NET_2_0 " <A()> _{0}" + -#endif " Public Shared Sub Main(){0}" + " Dim x As Test.InnerType{0}" + " End Sub{0}" + "End Interface{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -2161,7 +1968,6 @@ namespace MonoTests.Microsoft.VisualBasic "Partial Public Interface Test1{0}" + "End Interface{0}", NewLine), code); } -#endif } [TestFixture] @@ -2221,11 +2027,7 @@ namespace MonoTests.Microsoft.VisualBasic { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "Friend Structure Test1{0}" + -#else - "Structure Test1{0}" + -#endif " Implements Integer, System.Security.Principal.IIdentity, String, System.Security.IPermission{0}" + "End Structure{0}", NewLine), code); } @@ -2250,11 +2052,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Private Event __exception As System.Void{0}" + -#else - " Private Event As System.Void{0}" + -#endif "End Structure{0}", NewLine), code); } @@ -2276,11 +2074,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Friend Event Click As Integer Implements IPolicy.Click , IWhatever.Click{0}" + -#else - " Friend Event Click As Integer{0}" + -#endif "End Structure{0}", NewLine), code); } @@ -2291,11 +2085,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Protected Event System_Int32_Click As Integer Implements Integer.Click{0}" + -#else - " Protected Event Click As Integer{0}" + -#endif "End Structure{0}", NewLine), code); } @@ -2306,11 +2096,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Event System_Int32_Click As Integer Implements IPolicy.Click{0}" + -#else - " Public Event Click As Integer{0}" + -#endif "End Structure{0}", NewLine), code); } @@ -2323,11 +2109,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Private __exception As System.Void{0}" + -#else - " Private As System.Void{0}" + -#endif "End Structure{0}", NewLine), code); } @@ -2363,11 +2145,7 @@ namespace MonoTests.Microsoft.VisualBasic " {0}" + " <A(), _{0}" + " B()> _{0}" + -#if NET_2_0 " Private Property () As System.Void{0}" + -#else - " Private Property As System.Void{0}" + -#endif " End Property{0}" + "End Structure{0}", NewLine), code); } @@ -2380,11 +2158,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property Name() As Integer{0}" + -#else - " Public Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + "End Structure{0}", NewLine), code); } @@ -2397,11 +2171,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Protected Overridable ReadOnly Property Name() As Integer{0}" + -#else - " Protected Overridable ReadOnly Property Name As Integer{0}" + -#endif " Get{0}" + " End Get{0}" + " End Property{0}" + @@ -2416,11 +2186,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overridable WriteOnly Property Name() As Integer{0}" + -#else - " Friend WriteOnly Property Name As Integer{0}" + -#endif " Set{0}" + " End Set{0}" + " End Property{0}" + @@ -2435,11 +2201,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Protected Overridable Property Name() As Integer{0}" + -#else - " Protected Overridable Property Name As Integer{0}" + -#endif " Get{0}" + " End Get{0}" + " Set{0}" + @@ -2461,11 +2223,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Protected Friend Property Name() As Integer{0}" + -#else - " Protected Friend Property Name As Integer{0}" + -#endif " End Property{0}" + "End Structure{0}", NewLine), code); } @@ -2478,11 +2236,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overridable Property Name() As Integer{0}" + -#else - " Friend Property Name As Integer{0}" + -#endif " End Property{0}" + "End Structure{0}", NewLine), code); } @@ -2520,11 +2274,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property iTem() As Integer{0}" + -#else - " Public Overridable Property iTem As Integer{0}" + -#endif " End Property{0}" + "End Structure{0}", NewLine), code); } @@ -2566,11 +2316,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property Name() As Integer Implements IPolicy.Name , IWhatever.Name{0}" + -#else - " Public Overridable Property Name As Integer Implements IPolicy.Name , IWhatever.Name{0}" + -#endif " End Property{0}" + "End Structure{0}", NewLine), code); } @@ -2582,11 +2328,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Protected Overloads Overridable Property Name() As Integer{0}" + -#else - " Protected Overloads Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + "End Structure{0}", NewLine), code); } @@ -2598,11 +2340,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Overloads Overridable Property Name() As Integer{0}" + -#else - " Public Overloads Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + " {0}" + " Private Overloads Property Name(ByVal value1 As Object) As Integer{0}" + @@ -2617,11 +2355,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Property Name() As Integer{0}" + -#else - " Public Overridable Property Name As Integer{0}" + -#endif " End Property{0}" + " {0}" + " Property System_Int32_Name(ByVal value1 As Object) As Integer Implements Integer.Name{0}" + @@ -2661,11 +2395,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Private Shadows Property Name() As Integer{0}" + -#else - " Private Shadows Property Name As Integer{0}" + -#endif " Get{0}" + " End Get{0}" + " Set{0}" + @@ -2707,11 +2437,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef __exception As Integer) As Integer{0}" + -#else - " Public Overridable Function Something(<A(), B()> ByVal value As Object, <C(A1:=false, A2:=true), D()> ByRef As Integer) As Integer{0}" + -#endif " End Function{0}" + "End Structure{0}", NewLine), code); } @@ -2723,11 +2449,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overridable Function Execute() As Integer Implements IPolicy.Execute , IWhatever.Execute{0}" + -#else - " Friend Function Execute() As Integer Implements IPolicy.Execute , IWhatever.Execute{0}" + -#endif " End Function{0}" + "End Structure{0}", NewLine), code); } @@ -2739,11 +2461,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Friend Overloads Overridable Function Execute() As Integer{0}" + -#else - " Friend Overloads Function Execute() As Integer{0}" + -#endif " End Function{0}" + "End Structure{0}", NewLine), code); } @@ -2809,11 +2527,7 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " Public Overridable Function Something(<A(), System.ParamArrayAttribute(), B()> ByRef value As Object, <C()> ByRef __exception As Integer) As Integer{0}" + -#else - " Public Overridable Function Something(<A(), System.ParamArrayAttribute(), B()> ByRef value As Object, <C()> ByRef As Integer) As Integer{0}" + -#endif " End Function{0}" + "End Structure{0}", NewLine), code); } @@ -2954,10 +2668,8 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " <A(), _{0}" + " B()> _{0}" + -#endif " Shared Sub New(){0}" + " End Sub{0}" + "End Structure{0}", NewLine), code); @@ -2970,16 +2682,13 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Structure Test1{0}" + " {0}" + -#if NET_2_0 " <A()> _{0}" + -#endif " Public Shared Sub Main(){0}" + " Dim x As Test.InnerType{0}" + " End Sub{0}" + "End Structure{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -2988,7 +2697,6 @@ namespace MonoTests.Microsoft.VisualBasic "Partial Public Structure Test1{0}" + "End Structure{0}", NewLine), code); } -#endif } [TestFixture] @@ -3048,11 +2756,7 @@ namespace MonoTests.Microsoft.VisualBasic { string code = GenerateDerivedType (Options); Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, -#if NET_2_0 "Friend Enum Test1 As Integer{0}" + -#else - "Enum Test1 As Integer{0}" + -#endif "End Enum{0}", NewLine), code); } @@ -3565,16 +3269,13 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (string.Format (CultureInfo.InvariantCulture, "Public Enum Test1{0}" + " {0}" + -#if NET_2_0 " <A()> _{0}" + -#endif " Public Shared Sub Main(){0}" + " Dim x As Test.InnerType{0}" + " End Sub{0}" + "End Enum{0}", NewLine), code); } -#if NET_2_0 [Test] public override void PartialTypeTest () { @@ -3583,6 +3284,5 @@ namespace MonoTests.Microsoft.VisualBasic "Partial Public Enum Test1{0}" + "End Enum{0}", NewLine), code); } -#endif } } diff --git a/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderCas.cs b/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderCas.cs index 7be0d0be266..cfd9abc7414 100644 --- a/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderCas.cs +++ b/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderCas.cs @@ -66,7 +66,6 @@ namespace MonoCasTests.Microsoft.VisualBasic { catch (NotImplementedException) { // mono } -#if NET_2_0 CodeTypeMember ctm = new CodeTypeMember (); StringWriter sw = new StringWriter (); CodeGeneratorOptions cgo = new CodeGeneratorOptions (); @@ -76,7 +75,6 @@ namespace MonoCasTests.Microsoft.VisualBasic { catch (NotImplementedException) { // mono } -#endif } // LinkDemand diff --git a/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderTest.cs b/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderTest.cs index 44b703e6337..8220a1e8f62 100644 --- a/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderTest.cs +++ b/mcs/class/System/Test/Microsoft.VisualBasic/VBCodeProviderTest.cs @@ -109,13 +109,11 @@ namespace MonoTests.Microsoft.VisualBasic Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.StaticConstructors), "#20"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.TryCatchStatements), "#21"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.Win32Resources), "#22"); -#if NET_2_0 Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.DeclareIndexerProperties), "#23"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.GenericTypeDeclaration), "#24"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.GenericTypeReference), "#25"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.PartialTypes), "#26"); Assert.IsTrue (codeGenerator.Supports (GeneratorSupport.Resources), "#27"); -#endif } [Test] @@ -211,9 +209,7 @@ namespace MonoTests.Microsoft.VisualBasic options.GenerateExecutable = false; options.GenerateInMemory = true; options.TempFiles = new TempFileCollection (_tempDir); -#if NET_2_0 options.EmbeddedResources.Add (sourceFile); -#endif ICodeCompiler compiler = _codeProvider.CreateCompiler (); CompilerResults results = compiler.CompileAssemblyFromFile (options, @@ -234,14 +230,12 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual (1, tempFiles.Length, "#5"); Assert.AreEqual (sourceFile, tempFiles[0], "#6"); -#if NET_2_0 string[] resources = compiledAssembly.GetManifestResourceNames(); Assert.IsNotNull (resources, "#7"); Assert.AreEqual (1, resources.Length, "#8"); Assert.AreEqual ("file.vb", resources[0], "#9"); Assert.IsNull (compiledAssembly.GetFile ("file.vb"), "#10"); Assert.IsNotNull (compiledAssembly.GetManifestResourceStream ("file.vb"), "#11"); -#endif } [Test] @@ -272,10 +266,8 @@ namespace MonoTests.Microsoft.VisualBasic options.GenerateInMemory = true; options.OutputAssembly = string.Empty; options.TempFiles = new TempFileCollection (_tempDir); -#if NET_2_0 options.EmbeddedResources.Add (sourceFile1); options.LinkedResources.Add (sourceFile2); -#endif ICodeCompiler compiler = _codeProvider.CreateCompiler (); CompilerResults results = compiler.CompileAssemblyFromFileBatch (options, @@ -303,7 +295,6 @@ namespace MonoTests.Microsoft.VisualBasic Assert.IsTrue (File.Exists (sourceFile1), "#C2"); Assert.IsTrue (File.Exists (sourceFile2), "#C3"); -#if NET_2_0 string[] resources = compiledAssembly.GetManifestResourceNames(); Assert.IsNotNull (resources, "#D1"); Assert.AreEqual (2, resources.Length, "#D2"); @@ -334,7 +325,6 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual ("file2.vb", info.FileName, "#F6"); Assert.IsNull (info.ReferencedAssembly, "#F7"); Assert.AreEqual ((ResourceLocation) 0, info.ResourceLocation, "#F8"); -#endif } [Test] @@ -364,10 +354,8 @@ namespace MonoTests.Microsoft.VisualBasic options.GenerateExecutable = false; options.GenerateInMemory = true; options.TempFiles = new TempFileCollection (_tempDir); -#if NET_2_0 options.EmbeddedResources.Add (sourceFile1); options.LinkedResources.Add (sourceFile2); -#endif ICodeCompiler compiler = _codeProvider.CreateCompiler (); CompilerResults results = compiler.CompileAssemblyFromFileBatch (options, @@ -395,7 +383,6 @@ namespace MonoTests.Microsoft.VisualBasic Assert.IsTrue (File.Exists (sourceFile1), "#C2"); Assert.IsTrue (File.Exists (sourceFile2), "#C3"); -#if NET_2_0 string[] resources = compiledAssembly.GetManifestResourceNames(); Assert.IsNotNull (resources, "#D1"); Assert.AreEqual (2, resources.Length, "#D2"); @@ -426,7 +413,6 @@ namespace MonoTests.Microsoft.VisualBasic Assert.AreEqual ("file2.vb", info.FileName, "#F6"); Assert.IsNull (info.ReferencedAssembly, "#F7"); Assert.AreEqual ((ResourceLocation) 0, info.ResourceLocation, "#F8"); -#endif } [Test] diff --git a/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyCas.cs b/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyCas.cs index 6af8d085390..ebc7601a0d9 100644 --- a/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyCas.cs +++ b/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -114,4 +113,3 @@ namespace MonoCasTests.Microsoft.Win32 { } } -#endif diff --git a/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyTest.cs b/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyTest.cs index 7a0b9b20c59..f6947709c95 100644 --- a/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyTest.cs +++ b/mcs/class/System/Test/Microsoft.Win32/IntranetZoneCredentialPolicyTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -161,4 +160,3 @@ namespace MonoTests.Microsoft.Win32 { } } -#endif diff --git a/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsCas.cs b/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsCas.cs index 69725a32990..202bd6a3657 100644 --- a/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsCas.cs +++ b/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -98,4 +97,3 @@ namespace MonoCasTests.Microsoft.Win32 { } } -#endif diff --git a/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsTest.cs b/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsTest.cs index 6a3750b420c..8b74889743f 100644 --- a/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsTest.cs +++ b/mcs/class/System/Test/Microsoft.Win32/SessionSwitchEventArgsTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -60,4 +59,3 @@ namespace MonoTests.Microsoft.Win32 { } } -#endif diff --git a/mcs/class/System/Test/Microsoft.Win32/SystemEventsCas.cs b/mcs/class/System/Test/Microsoft.Win32/SystemEventsCas.cs index 128bd815c7d..cc9b5239e13 100644 --- a/mcs/class/System/Test/Microsoft.Win32/SystemEventsCas.cs +++ b/mcs/class/System/Test/Microsoft.Win32/SystemEventsCas.cs @@ -82,7 +82,6 @@ namespace MonoCasTests.Microsoft.Win32 { // mono } } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void DisplaySettingsChanging_Deny_Unrestricted () @@ -95,7 +94,6 @@ namespace MonoCasTests.Microsoft.Win32 { // mono } } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void EventsThreadShutdown_Deny_Unrestricted () @@ -198,7 +196,6 @@ namespace MonoCasTests.Microsoft.Win32 { // mono } } -#if NET_2_0 private void SessionSwitchCallback (object o, SessionSwitchEventArgs args) { } @@ -215,7 +212,6 @@ namespace MonoCasTests.Microsoft.Win32 { // mono } } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void TimeChanged_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/CodeDomProviderCas.cs b/mcs/class/System/Test/System.CodeDom.Compiler/CodeDomProviderCas.cs index a9d536085bb..79eceefbdcc 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/CodeDomProviderCas.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/CodeDomProviderCas.cs @@ -92,7 +92,6 @@ namespace MonoCasTests.System.CodeDom.Compiler { Assert.IsNull (cdp.CreateGenerator (writer), "CreateGenerator(TextWriter)"); Assert.IsNull (cdp.CreateParser (), "CreateParser()"); Assert.IsNotNull (cdp.GetConverter (typeof (string)), "GetConverter"); -#if NET_2_0 Assert.IsNotNull (CodeDomProvider.GetAllCompilerInfo (), "GetAllCompilerInfo"); // mono returns null (missing config?) @@ -101,10 +100,8 @@ namespace MonoCasTests.System.CodeDom.Compiler { Assert.IsFalse (CodeDomProvider.IsDefinedExtension (String.Empty), "String.Empty"); Assert.IsFalse (CodeDomProvider.IsDefinedLanguage (String.Empty), "String.Empty"); -#endif } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] [ExpectedException (typeof (NotImplementedException))] @@ -333,7 +330,6 @@ namespace MonoCasTests.System.CodeDom.Compiler { Assert.IsFalse ((bool) mi.Invoke (null, new object[1] { String.Empty }), "IsDefinedLanguage('')"); // requires full trust (i.e. unrestricted permission set) } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void LinkDemand_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorCas.cs b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorCas.cs index 2a233f0f3f3..62a0f8ada19 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorCas.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorCas.cs @@ -279,9 +279,7 @@ namespace MonoCasTests.System.CodeDom.Compiler { public void TestProtectedProperties () { -#if NET_2_0 Assert.IsNull (CurrentClass, "CurrentClass"); -#endif Assert.IsNull (CurrentMember, "CurrentMember"); Assert.AreEqual ("<% unknown %>", CurrentMemberName, "CurrentMemberName"); Assert.AreEqual ("<% unknown %>", CurrentTypeName, "CurrentTypeName"); @@ -350,22 +348,18 @@ namespace MonoCasTests.System.CodeDom.Compiler { } catch (NullReferenceException) { } -#if NET_2_0 try { GenerateDefaultValueExpression (null); } catch (NotImplementedException) { // both mono & ms } -#endif try { GenerateDirectionExpression (null); } catch (NullReferenceException) { } -#if NET_2_0 GenerateDirectives (null); -#endif try { GenerateDoubleValue (Double.MaxValue); } @@ -539,7 +533,6 @@ namespace MonoCasTests.System.CodeDom.Compiler { Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Public () @@ -552,7 +545,6 @@ namespace MonoCasTests.System.CodeDom.Compiler { // mono } } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs index 58f071048e2..eb9d32a9e15 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorFromTypeTestBase.cs @@ -184,10 +184,8 @@ namespace MonoTests.System.CodeDom.Compiler [Test] public abstract void EntryPointMethodTest (); -#if NET_2_0 [Test] public abstract void PartialTypeTest (); -#endif protected string GenerateDefaultType (CodeGeneratorOptions options) { @@ -1109,7 +1107,6 @@ namespace MonoTests.System.CodeDom.Compiler return GenerateCodeFromType (TypeDeclaration, options); } -#if NET_2_0 protected string GenerateGenericCodeTypeReferences (CodeGeneratorOptions options) { CodeTypeDeclaration td = new CodeTypeDeclaration ("Test"); @@ -1131,6 +1128,5 @@ namespace MonoTests.System.CodeDom.Compiler TypeDeclaration.IsPartial = true; return GenerateCodeFromType (TypeDeclaration, options); } -#endif } } diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs index 61c51c132f4..96cdf62cfaf 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorOptionsTest.cs @@ -45,16 +45,12 @@ namespace MonoTests.System.CodeDom.Compiler { Assert.AreEqual ("Block", cgo.BracingStyle, "BracingStyle"); Assert.IsFalse (cgo.ElseOnClosing, "ElseOnClosing"); Assert.AreEqual (" ", cgo.IndentString, "IndentString"); -#if NET_2_0 Assert.IsFalse (cgo.VerbatimOrder, "VerbatimOrder"); -#endif Assert.IsNull (cgo["BlankLinesBetweenMembers"], "this[BlankLinesBetweenMembers]"); Assert.IsNull (cgo["BracingStyle"], "this[BracingStyle]"); Assert.IsNull (cgo["ElseOnClosing"], "this[ElseOnClosing]"); Assert.IsNull (cgo["IndentString"], "this[IndentString]"); -#if NET_2_0 Assert.IsNull (cgo["VerbatimOrder"], "this[VerbatimOrder]"); -#endif } [Test] @@ -70,10 +66,8 @@ namespace MonoTests.System.CodeDom.Compiler { Assert.IsNotNull (cgo["ElseOnClosing"], "this[ElseOnClosing]"); cgo.IndentString = cgo.IndentString; Assert.IsNotNull (cgo["IndentString"], "this[IndentString]"); -#if NET_2_0 cgo.VerbatimOrder = cgo.VerbatimOrder; Assert.IsNotNull (cgo["VerbatimOrder"], "this[VerbatimOrder]"); -#endif } [Test] @@ -99,12 +93,10 @@ namespace MonoTests.System.CodeDom.Compiler { Assert.AreEqual ("\t", cgo.IndentString, "IndentString-1"); cgo["IndentString"] = null; Assert.AreEqual (" ", cgo.IndentString, "IndentString-2"); -#if NET_2_0 cgo.VerbatimOrder = true; Assert.IsTrue (cgo.VerbatimOrder, "VerbatimOrder-1"); cgo["VerbatimOrder"] = null; Assert.IsFalse (cgo.VerbatimOrder, "VerbatimOrder-2"); -#endif } } } diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorTest.cs b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorTest.cs index 58277c22f22..56b0dba69e4 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorTest.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/CodeGeneratorTest.cs @@ -425,7 +425,6 @@ namespace MonoTests.System.CodeDom.Compiler return value; } -#if NET_2_0 protected override void GenerateDirectives (CodeDirectiveCollection directives) { foreach (CodeDirective d in directives) { @@ -444,7 +443,6 @@ namespace MonoTests.System.CodeDom.Compiler } } } -#endif #endregion Override implementation of CodeGenerator } diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/CompilerInfoCas.cs b/mcs/class/System/Test/System.CodeDom.Compiler/CompilerInfoCas.cs index 4f7efcfc8db..2b9d1d69571 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/CompilerInfoCas.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/CompilerInfoCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -120,4 +119,3 @@ namespace MonoCasTests.System.CodeDom.Compiler { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/CompilerParametersCas.cs b/mcs/class/System/Test/System.CodeDom.Compiler/CompilerParametersCas.cs index e65e9372918..a979fb21a18 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/CompilerParametersCas.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/CompilerParametersCas.cs @@ -76,10 +76,8 @@ namespace MonoCasTests.System.CodeDom.Compiler { cp.WarningLevel = 0; Assert.IsNull (cp.Win32Resource, "Win32Resource"); cp.Win32Resource = "*"; -#if NET_2_0 Assert.AreEqual (0, cp.EmbeddedResources.Count, "EmbeddedResources"); Assert.AreEqual (0, cp.LinkedResources.Count, "LinkedResources"); -#endif } [Test] @@ -109,10 +107,8 @@ namespace MonoCasTests.System.CodeDom.Compiler { cp.WarningLevel = 0; Assert.IsNull (cp.Win32Resource, "Win32Resource"); cp.Win32Resource = "*"; -#if NET_2_0 Assert.AreEqual (0, cp.EmbeddedResources.Count, "EmbeddedResources"); Assert.AreEqual (0, cp.LinkedResources.Count, "LinkedResources"); -#endif } [Test] @@ -142,10 +138,8 @@ namespace MonoCasTests.System.CodeDom.Compiler { cp.WarningLevel = 0; Assert.IsNull (cp.Win32Resource, "Win32Resource"); cp.Win32Resource = "*"; -#if NET_2_0 Assert.AreEqual (0, cp.EmbeddedResources.Count, "EmbeddedResources"); Assert.AreEqual (0, cp.LinkedResources.Count, "LinkedResources"); -#endif } [Test] @@ -175,10 +169,8 @@ namespace MonoCasTests.System.CodeDom.Compiler { cp.WarningLevel = 0; Assert.IsNull (cp.Win32Resource, "Win32Resource"); cp.Win32Resource = "*"; -#if NET_2_0 Assert.AreEqual (0, cp.EmbeddedResources.Count, "EmbeddedResources"); Assert.AreEqual (0, cp.LinkedResources.Count, "LinkedResources"); -#endif } [Test] diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/ExecutorTest.cs b/mcs/class/System/Test/System.CodeDom.Compiler/ExecutorTest.cs index e6e0881944c..12cb1ebde55 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/ExecutorTest.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/ExecutorTest.cs @@ -74,11 +74,7 @@ namespace MonoTests.System.CodeDom.Compiler [TestFixtureTearDown] public void FixtureTearDown () { -#if NET_2_0 winid.Dispose (); -#else - GC.KeepAlive (winid); -#endif } [Test] diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs b/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs index 2593ce97181..e20f6a5bf2c 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -71,4 +70,3 @@ namespace MonoCasTests.System.CodeDom.Compiler { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs b/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs index 16fb96c1909..d0f0ca773b9 100644 --- a/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs +++ b/mcs/class/System/Test/System.CodeDom.Compiler/GeneratedCodeAttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -65,4 +64,3 @@ namespace MonoTests.System.CodeDom.Compiler { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationCas.cs b/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationCas.cs index 50a781d5879..f4331570a95 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationCas.cs @@ -56,9 +56,7 @@ namespace MonoCasTests.System.CodeDom { Assert.AreEqual (0, cad.Arguments.Count, "Arguments"); Assert.AreEqual (String.Empty, cad.Name, "Name"); cad.Name = null; -#if NET_2_0 Assert.AreEqual ("System.Void", cad.AttributeType.BaseType, "AttributeType.BaseType"); -#endif } [Test] @@ -69,9 +67,7 @@ namespace MonoCasTests.System.CodeDom { Assert.AreEqual (0, cad.Arguments.Count, "Arguments"); Assert.AreEqual ("mono", cad.Name, "Name"); cad.Name = null; -#if NET_2_0 Assert.AreEqual ("System.Void", cad.AttributeType.BaseType, "AttributeType.BaseType"); -#endif } [Test] @@ -83,11 +79,8 @@ namespace MonoCasTests.System.CodeDom { Assert.AreEqual (1, cad.Arguments.Count, "Arguments"); Assert.AreEqual ("mono", cad.Name, "Name"); cad.Name = null; -#if NET_2_0 Assert.AreEqual ("System.Void", cad.AttributeType.BaseType, "AttributeType.BaseType"); -#endif } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor3_Deny_Unrestricted () @@ -112,7 +105,6 @@ namespace MonoCasTests.System.CodeDom { cad.Name = null; Assert.AreEqual ("System.Void", cad.AttributeType.BaseType, "AttributeType.BaseType"); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void LinkDemand_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationTest.cs b/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationTest.cs index f87efb5a2dc..bf0f0d3163f 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeAttributeDeclarationTest.cs @@ -43,20 +43,16 @@ namespace MonoTests.System.CodeDom CodeAttributeDeclaration cad = new CodeAttributeDeclaration ((string) null); Assert.IsNotNull (cad.Name, "#1"); Assert.AreEqual (string.Empty, cad.Name, "#2"); -#if NET_2_0 Assert.IsNotNull (cad.AttributeType, "#3"); Assert.AreEqual (typeof(void).FullName, cad.AttributeType.BaseType, "#4"); -#endif Assert.IsNotNull (cad.Arguments, "#5"); Assert.AreEqual (0, cad.Arguments.Count, "#6"); cad.Name = null; Assert.IsNotNull (cad.Name, "#7"); Assert.AreEqual (string.Empty, cad.Name, "#8"); -#if NET_2_0 Assert.IsNotNull (cad.AttributeType, "#9"); Assert.AreEqual (typeof(void).FullName, cad.AttributeType.BaseType, "#10"); -#endif } [Test] @@ -65,9 +61,7 @@ namespace MonoTests.System.CodeDom CodeAttributeDeclaration cad = new CodeAttributeDeclaration (); Assert.IsNotNull (cad.Name, "#1"); Assert.AreEqual (string.Empty, cad.Name, "#2"); -#if NET_2_0 Assert.IsNull (cad.AttributeType, "#3"); -#endif Assert.IsNotNull (cad.Arguments, "#4"); Assert.AreEqual (0, cad.Arguments.Count, "#5"); } @@ -78,10 +72,8 @@ namespace MonoTests.System.CodeDom CodeAttributeDeclaration cad = new CodeAttributeDeclaration ("mono"); Assert.AreEqual (0, cad.Arguments.Count, "#1"); Assert.AreEqual ("mono", cad.Name, "#2"); -#if NET_2_0 Assert.IsNotNull (cad.AttributeType, "#3"); Assert.AreEqual ("mono", cad.AttributeType.BaseType, "#4"); -#endif } [Test] @@ -90,20 +82,15 @@ namespace MonoTests.System.CodeDom CodeAttributeDeclaration cad = new CodeAttributeDeclaration ("mono", new CodeAttributeArgument ()); Assert.AreEqual (1, cad.Arguments.Count, "#1"); Assert.AreEqual ("mono", cad.Name, "#2"); -#if NET_2_0 Assert.IsNotNull (cad.AttributeType, "#3"); Assert.AreEqual ("mono", cad.AttributeType.BaseType, "#4"); -#endif cad.Name = null; Assert.AreEqual (1, cad.Arguments.Count, "#5"); Assert.AreEqual (string.Empty, cad.Name, "#6"); -#if NET_2_0 Assert.IsNotNull (cad.AttributeType, "#7"); Assert.AreEqual (typeof(void).FullName, cad.AttributeType.BaseType, "#8"); -#endif } -#if NET_2_0 [Test] public void Constructor3 () { @@ -157,6 +144,5 @@ namespace MonoTests.System.CodeDom Assert.AreEqual (string.Empty, cad.Name, "#13"); Assert.IsNull (cad.AttributeType, "#14"); } -#endif } } diff --git a/mcs/class/System/Test/System.CodeDom/CodeCastExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeCastExpressionTest.cs index 18fa7f0b67a..31362104ff6 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeCastExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeCastExpressionTest.cs @@ -136,11 +136,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor3_NullType () { CodeCastExpression cce = new CodeCastExpression ((Type) null, diff --git a/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaCas.cs b/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaCas.cs index ad846fbf2c1..86edea2f6dd 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -86,4 +85,3 @@ namespace MonoCasTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaTest.cs b/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaTest.cs index a856ec91376..23d3ca0aef0 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeChecksumPragmaTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -84,4 +83,3 @@ namespace MonoTests.System.CodeDom } } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeCompileUnitCas.cs b/mcs/class/System/Test/System.CodeDom/CodeCompileUnitCas.cs index eec5ee998a9..b9146c25630 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeCompileUnitCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeCompileUnitCas.cs @@ -56,10 +56,8 @@ namespace MonoCasTests.System.CodeDom { Assert.AreEqual (0, ccu.AssemblyCustomAttributes.Count, "AssemblyCustomAttributes"); Assert.AreEqual (0, ccu.Namespaces.Count, "Namespaces"); Assert.AreEqual (0, ccu.ReferencedAssemblies.Count, "ReferencedAssemblies"); -#if NET_2_0 Assert.AreEqual (0, ccu.StartDirectives.Count, "StartDirectives"); Assert.AreEqual (0, ccu.EndDirectives.Count, "EndDirectives"); -#endif } [Test] diff --git a/mcs/class/System/Test/System.CodeDom/CodeConstructorTest.cs b/mcs/class/System/Test/System.CodeDom/CodeConstructorTest.cs index 8e9badbc7d1..394633377e3 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeConstructorTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeConstructorTest.cs @@ -52,7 +52,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cc.CustomAttributes, "#4"); Assert.AreEqual (0, cc.CustomAttributes.Count, "#5"); -#if NET_2_0 Assert.IsNotNull (cc.StartDirectives, "#6"); Assert.AreEqual (0, cc.StartDirectives.Count, "#7"); @@ -61,7 +60,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cc.TypeParameters, "#10"); Assert.AreEqual (0, cc.TypeParameters.Count, "#11"); -#endif Assert.IsNull (cc.LinePragma, "#12"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionCas.cs b/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionCas.cs index 65a68688b9c..a838033965d 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -80,4 +79,3 @@ namespace MonoCasTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionTest.cs index ad7e27494e1..ba966b269da 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeDefaultValueExpressionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -73,4 +72,3 @@ namespace MonoTests.System.CodeDom } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeDirectiveCas.cs b/mcs/class/System/Test/System.CodeDom/CodeDirectiveCas.cs index d83f018ddd8..48664fe0cd5 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeDirectiveCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeDirectiveCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -68,4 +67,3 @@ namespace MonoCasTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionCas.cs b/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionCas.cs index 22ee7c20fa7..3b3c7359933 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -120,4 +119,3 @@ namespace MonoCasTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionTest.cs index b80dc98ff55..1888c29c586 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeDirectiveCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -242,5 +241,4 @@ namespace MonoTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeGotoStatementCas.cs b/mcs/class/System/Test/System.CodeDom/CodeGotoStatementCas.cs index 52f6b2e2318..1a966645e1c 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeGotoStatementCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeGotoStatementCas.cs @@ -47,7 +47,6 @@ namespace MonoCasTests.System.CodeDom { if (!SecurityManager.SecurityEnabled) Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor0_Deny_Unrestricted () @@ -56,7 +55,6 @@ namespace MonoCasTests.System.CodeDom { Assert.IsNull (cgs.Label, "Label"); cgs.Label = "mono"; } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor1_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom/CodeGotoStatementTest.cs b/mcs/class/System/Test/System.CodeDom/CodeGotoStatementTest.cs index 4a82bbf79a7..e85c76f2b5f 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeGotoStatementTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeGotoStatementTest.cs @@ -38,7 +38,6 @@ namespace MonoTests.System.CodeDom [TestFixture] public class CodeGotoStatementTest { -#if NET_2_0 [Test] public void Constructor0 () { @@ -69,7 +68,6 @@ namespace MonoTests.System.CodeDom cgs.Label = label; Assert.AreSame (label, cgs.Label, "#13"); } -#endif [Test] public void Constructor1 () @@ -80,13 +78,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cgs.Label, "#1"); Assert.AreSame (label1, cgs.Label, "#2"); -#if NET_2_0 Assert.IsNotNull (cgs.StartDirectives, "#3"); Assert.AreEqual (0, cgs.StartDirectives.Count, "#4"); Assert.IsNotNull (cgs.EndDirectives, "#5"); Assert.AreEqual (0, cgs.EndDirectives.Count, "#6"); -#endif Assert.IsNotNull (cgs.UserData, "#7"); Assert.AreEqual (typeof(ListDictionary), cgs.UserData.GetType (), "#8"); @@ -100,9 +96,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Constructor1_NullLabel () { CodeGotoStatement cgs = new CodeGotoStatement ((string) null); @@ -112,9 +106,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Constructor1_EmptyLabel () { CodeGotoStatement cgs = new CodeGotoStatement (string.Empty); #if ONLY_1_1 @@ -124,9 +116,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Label_Null () { CodeGotoStatement cgs = new CodeGotoStatement ("mono"); @@ -137,9 +127,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Label_Empty () { CodeGotoStatement cgs = new CodeGotoStatement ("mono"); cgs.Label = string.Empty; diff --git a/mcs/class/System/Test/System.CodeDom/CodeLabeledStatementTest.cs b/mcs/class/System/Test/System.CodeDom/CodeLabeledStatementTest.cs index d78a2db3e28..8164d6511fa 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeLabeledStatementTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeLabeledStatementTest.cs @@ -47,13 +47,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cls.Label, "#2"); Assert.AreEqual (string.Empty, cls.Label, "#3"); -#if NET_2_0 Assert.IsNotNull (cls.StartDirectives, "#4"); Assert.AreEqual (0, cls.StartDirectives.Count, "#5"); Assert.IsNotNull (cls.EndDirectives, "#6"); Assert.AreEqual (0, cls.EndDirectives.Count, "#7"); -#endif Assert.IsNotNull (cls.UserData, "#8"); Assert.AreEqual (typeof(ListDictionary), cls.UserData.GetType (), "#9"); @@ -95,13 +93,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cls.Label, "#2"); Assert.AreSame (label, cls.Label, "#3"); -#if NET_2_0 Assert.IsNotNull (cls.StartDirectives, "#4"); Assert.AreEqual (0, cls.StartDirectives.Count, "#5"); Assert.IsNotNull (cls.EndDirectives, "#6"); Assert.AreEqual (0, cls.EndDirectives.Count, "#7"); -#endif Assert.IsNotNull (cls.UserData, "#8"); Assert.AreEqual (typeof(ListDictionary), cls.UserData.GetType (), "#9"); @@ -125,13 +121,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cls.Label, "#2"); Assert.AreSame (label, cls.Label, "#3"); -#if NET_2_0 Assert.IsNotNull (cls.StartDirectives, "#4"); Assert.AreEqual (0, cls.StartDirectives.Count, "#5"); Assert.IsNotNull (cls.EndDirectives, "#6"); Assert.AreEqual (0, cls.EndDirectives.Count, "#7"); -#endif Assert.IsNotNull (cls.UserData, "#8"); Assert.AreEqual (typeof(ListDictionary), cls.UserData.GetType (), "#9"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeLinePragmaCas.cs b/mcs/class/System/Test/System.CodeDom/CodeLinePragmaCas.cs index 4f93e53acdf..b1d45615f0e 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeLinePragmaCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeLinePragmaCas.cs @@ -47,7 +47,6 @@ namespace MonoCasTests.System.CodeDom { if (!SecurityManager.SecurityEnabled) Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor0_Deny_Unrestricted () @@ -58,7 +57,6 @@ namespace MonoCasTests.System.CodeDom { Assert.AreEqual (0, clp.LineNumber, "LineNumber"); clp.LineNumber = Int32.MinValue; } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor1_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom/CodeLinePragmaTest.cs b/mcs/class/System/Test/System.CodeDom/CodeLinePragmaTest.cs index 0509700b059..e6539fa9a2f 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeLinePragmaTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeLinePragmaTest.cs @@ -37,7 +37,6 @@ namespace MonoTests.System.CodeDom [TestFixture] public class CodeLinePragmaTest { -#if NET_2_0 [Test] public void Constructor0 () { @@ -58,7 +57,6 @@ namespace MonoTests.System.CodeDom clp.LineNumber = 5; Assert.AreEqual (5, clp.LineNumber, "#8"); } -#endif [Test] public void Constructor1 () diff --git a/mcs/class/System/Test/System.CodeDom/CodeMemberMethodCas.cs b/mcs/class/System/Test/System.CodeDom/CodeMemberMethodCas.cs index 74a4a5fd6c4..b55ecd9a73a 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeMemberMethodCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeMemberMethodCas.cs @@ -61,9 +61,7 @@ namespace MonoCasTests.System.CodeDom { cmm.ReturnType = new CodeTypeReference ("System.Int32"); Assert.AreEqual (0, cmm.Statements.Count, "Statements"); Assert.AreEqual (0, cmm.ReturnTypeCustomAttributes.Count, "ReturnTypeCustomAttributes"); -#if NET_2_0 Assert.AreEqual (0, cmm.TypeParameters.Count, "TypeParameters"); -#endif } [Test] diff --git a/mcs/class/System/Test/System.CodeDom/CodeMemberMethodTest.cs b/mcs/class/System/Test/System.CodeDom/CodeMemberMethodTest.cs index be1ef52f002..ea730279e1d 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeMemberMethodTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeMemberMethodTest.cs @@ -52,7 +52,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cmm.CustomAttributes, "#4"); Assert.AreEqual (0, cmm.CustomAttributes.Count, "#5"); -#if NET_2_0 Assert.IsNotNull (cmm.StartDirectives, "#6"); Assert.AreEqual (0, cmm.StartDirectives.Count, "#7"); @@ -61,7 +60,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cmm.TypeParameters, "#10"); Assert.AreEqual (0, cmm.TypeParameters.Count, "#11"); -#endif Assert.IsNull (cmm.LinePragma, "#12"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeMethodInvokeExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeMethodInvokeExpressionTest.cs index 328ef6f123a..e3516a51973 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeMethodInvokeExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeMethodInvokeExpressionTest.cs @@ -44,9 +44,7 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cmie.Method, "#1"); Assert.AreEqual (string.Empty, cmie.Method.MethodName, "#2"); Assert.IsNull (cmie.Method.TargetObject, "#3"); -#if NET_2_0 Assert.AreEqual (0, cmie.Method.TypeArguments.Count, "#4"); -#endif Assert.IsNotNull (cmie.Parameters, "#5"); Assert.AreEqual (0, cmie.Parameters.Count, "#6"); @@ -59,9 +57,7 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cmie.Method, "#9"); Assert.AreEqual (string.Empty, cmie.Method.MethodName, "#10"); Assert.IsNull (cmie.Method.TargetObject, "#11"); -#if NET_2_0 Assert.AreEqual (0, cmie.Method.TypeArguments.Count, "#12"); -#endif } [Test] @@ -80,9 +76,7 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cmie.Method, "#3"); Assert.AreEqual (string.Empty, cmie.Method.MethodName, "#4"); Assert.IsNull (cmie.Method.TargetObject, "#5"); -#if NET_2_0 Assert.AreEqual (0, cmie.Method.TypeArguments.Count, "#6"); -#endif CodeMethodReferenceExpression method2 = new CodeMethodReferenceExpression (); cmie.Method = method2; @@ -99,9 +93,7 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cmie.Method, "#13"); Assert.AreEqual (string.Empty, cmie.Method.MethodName, "#14"); Assert.IsNull (cmie.Method.TargetObject, "#15"); -#if NET_2_0 Assert.AreEqual (0, cmie.Method.TypeArguments.Count, "#16"); -#endif Assert.IsNotNull (cmie.Parameters, "#17"); Assert.AreEqual (1, cmie.Parameters.Count, "#18"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionCas.cs b/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionCas.cs index 6ad30029509..d4f4db0ac39 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionCas.cs @@ -57,9 +57,7 @@ namespace MonoCasTests.System.CodeDom { cmre.MethodName = "mono"; Assert.IsNull (cmre.TargetObject, "TargetObject"); cmre.TargetObject = new CodeExpression (); -#if NET_2_0 Assert.AreEqual (0, cmre.TypeArguments.Count, "TypeArguments"); -#endif } [Test] @@ -72,11 +70,8 @@ namespace MonoCasTests.System.CodeDom { cmre.MethodName = String.Empty; Assert.AreSame (target, cmre.TargetObject, "TargetObject"); cmre.TargetObject = new CodeExpression (); -#if NET_2_0 Assert.AreEqual (0, cmre.TypeArguments.Count, "TypeArguments"); -#endif } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor2_Deny_Unrestricted () @@ -90,7 +85,6 @@ namespace MonoCasTests.System.CodeDom { cmre.TargetObject = new CodeExpression (); Assert.AreEqual (1, cmre.TypeArguments.Count, "TypeArguments"); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void LinkDemand_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionTest.cs index 4c5a9c90c51..8b19b6bf56f 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeMethodReferenceExpressionTest.cs @@ -46,10 +46,8 @@ namespace MonoTests.System.CodeDom Assert.AreEqual (string.Empty, cmre.MethodName, "#2"); Assert.IsNull (cmre.TargetObject, "#3"); -#if NET_2_0 Assert.IsNotNull (cmre.TypeArguments, "#4"); Assert.AreEqual (0, cmre.TypeArguments.Count, "#5"); -#endif string methodName = "mono"; cmre.MethodName = methodName; @@ -82,10 +80,8 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cmre.TargetObject, "#3"); Assert.AreSame (expression, cmre.TargetObject, "#4"); -#if NET_2_0 Assert.IsNotNull (cmre.TypeArguments, "#5"); Assert.AreEqual (0, cmre.TypeArguments.Count, "#6"); -#endif cmre = new CodeMethodReferenceExpression ((CodeExpression) null, (string) null); @@ -94,7 +90,6 @@ namespace MonoTests.System.CodeDom Assert.IsNull (cmre.TargetObject, "#9"); } -#if NET_2_0 [Test] public void Constructor2 () { @@ -135,6 +130,5 @@ namespace MonoTests.System.CodeDom CodeMethodReferenceExpression cmre = new CodeMethodReferenceExpression ( expression, methodName, (CodeTypeReference) null); } -#endif } } diff --git a/mcs/class/System/Test/System.CodeDom/CodeObjectCreateExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeObjectCreateExpressionTest.cs index 9e9c4de3f68..6d324bacd77 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeObjectCreateExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeObjectCreateExpressionTest.cs @@ -148,11 +148,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor3_NullType () { CodeObjectCreateExpression coce = new CodeObjectCreateExpression ( diff --git a/mcs/class/System/Test/System.CodeDom/CodeParameterDeclarationExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeParameterDeclarationExpressionTest.cs index 0021fb9b5ae..938d7966a35 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeParameterDeclarationExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeParameterDeclarationExpressionTest.cs @@ -142,11 +142,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor3_NullType () { CodeParameterDeclarationExpression cpde = new CodeParameterDeclarationExpression ( diff --git a/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveCas.cs b/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveCas.cs index fed96cb4976..8e5261ecb06 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -83,4 +82,3 @@ namespace MonoCasTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveTest.cs b/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveTest.cs index bbaa6f80b67..73ddc56e384 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeRegionDirectiveTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -86,4 +85,3 @@ namespace MonoTests.System.CodeDom } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitCas.cs b/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitCas.cs index 1a4ac920bb3..8a28a48ce56 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitCas.cs @@ -47,7 +47,6 @@ namespace MonoCasTests.System.CodeDom { if (!SecurityManager.SecurityEnabled) Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor0_Deny_Unrestricted () @@ -58,7 +57,6 @@ namespace MonoCasTests.System.CodeDom { Assert.AreEqual (String.Empty, cscu.Value, "Value"); cscu.Value = "mono"; } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor1_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitTest.cs b/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitTest.cs index 08c68999672..0687ce38afa 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeSnippetCompileUnitTest.cs @@ -38,7 +38,6 @@ namespace MonoTests.System.CodeDom [TestFixture] public class CodeSnippetCompileUnitTest { -#if NET_2_0 [Test] public void Constructor0 () { @@ -76,7 +75,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cscu.LinePragma, "#19"); Assert.AreSame (clp, cscu.LinePragma, "#20"); } -#endif [Test] public void Constructor1 () @@ -99,13 +97,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cscu.ReferencedAssemblies, "#9"); Assert.AreEqual (0, cscu.ReferencedAssemblies.Count, "#10"); -#if NET_2_0 Assert.IsNotNull (cscu.StartDirectives, "#11"); Assert.AreEqual (0, cscu.StartDirectives.Count, "#12"); Assert.IsNotNull (cscu.EndDirectives, "#13"); Assert.AreEqual (0, cscu.EndDirectives.Count, "#14"); -#endif Assert.IsNotNull (cscu.UserData, "#15"); Assert.AreEqual (typeof(ListDictionary), cscu.UserData.GetType (), "#16"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeSnippetStatementTest.cs b/mcs/class/System/Test/System.CodeDom/CodeSnippetStatementTest.cs index 84a8362ef26..b6459ed2ba1 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeSnippetStatementTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeSnippetStatementTest.cs @@ -47,13 +47,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (css.Value, "#2"); Assert.AreEqual (string.Empty, css.Value, "#3"); -#if NET_2_0 Assert.IsNotNull (css.StartDirectives, "#4"); Assert.AreEqual (0, css.StartDirectives.Count, "#5"); Assert.IsNotNull (css.EndDirectives, "#6"); Assert.AreEqual (0, css.EndDirectives.Count, "#7"); -#endif Assert.IsNotNull (css.UserData, "#8"); Assert.AreEqual (typeof(ListDictionary), css.UserData.GetType (), "#9"); @@ -84,13 +82,11 @@ namespace MonoTests.System.CodeDom Assert.AreEqual (stmt, css.Value, "#3"); Assert.AreSame (stmt, css.Value, "#4"); -#if NET_2_0 Assert.IsNotNull (css.StartDirectives, "#5"); Assert.AreEqual (0, css.StartDirectives.Count, "#6"); Assert.IsNotNull (css.EndDirectives, "#7"); Assert.AreEqual (0, css.EndDirectives.Count, "#8"); -#endif Assert.IsNotNull (css.UserData, "#9"); Assert.AreEqual (typeof(ListDictionary), css.UserData.GetType (), "#10"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeSnippetTypeMemberTest.cs b/mcs/class/System/Test/System.CodeDom/CodeSnippetTypeMemberTest.cs index a514c45572f..16cca7e5d45 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeSnippetTypeMemberTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeSnippetTypeMemberTest.cs @@ -52,13 +52,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cstm.CustomAttributes, "#4"); Assert.AreEqual (0, cstm.CustomAttributes.Count, "#5"); -#if NET_2_0 Assert.IsNotNull (cstm.StartDirectives, "#6"); Assert.AreEqual (0, cstm.StartDirectives.Count, "#7"); Assert.IsNotNull (cstm.EndDirectives, "#8"); Assert.AreEqual (0, cstm.EndDirectives.Count, "#9"); -#endif Assert.IsNotNull (cstm.Text, "#10"); Assert.AreEqual (string.Empty, cstm.Text, "#11"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeStatementCas.cs b/mcs/class/System/Test/System.CodeDom/CodeStatementCas.cs index f931bfaff0c..ecfbbd115e0 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeStatementCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeStatementCas.cs @@ -55,10 +55,8 @@ namespace MonoCasTests.System.CodeDom { CodeStatement cs = new CodeStatement (); Assert.IsNull (cs.LinePragma, "LinePragma"); cs.LinePragma = new CodeLinePragma (String.Empty, Int16.MinValue); -#if NET_2_0 Assert.AreEqual (0, cs.StartDirectives.Count, "StartDirectives"); Assert.AreEqual (0, cs.EndDirectives.Count, "EndDirectives"); -#endif } [Test] diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeConstructorTest.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeConstructorTest.cs index 4c50c453758..9c858f914e8 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeConstructorTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeConstructorTest.cs @@ -52,7 +52,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (ctc.CustomAttributes, "#4"); Assert.AreEqual (0, ctc.CustomAttributes.Count, "#5"); -#if NET_2_0 Assert.IsNotNull (ctc.StartDirectives, "#6"); Assert.AreEqual (0, ctc.StartDirectives.Count, "#7"); @@ -61,7 +60,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (ctc.TypeParameters, "#10"); Assert.AreEqual (0, ctc.TypeParameters.Count, "#11"); -#endif Assert.IsNull (ctc.LinePragma, "#12"); diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeDeclarationCas.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeDeclarationCas.cs index 768dfe0ad74..4b4f2763054 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeDeclarationCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeDeclarationCas.cs @@ -68,10 +68,8 @@ namespace MonoCasTests.System.CodeDom { ctd.IsStruct = true; Assert.AreEqual (0, ctd.Members.Count, "Members"); Assert.AreEqual (TypeAttributes.Public, ctd.TypeAttributes, "TypeAttributes"); -#if NET_2_0 Assert.IsFalse (ctd.IsPartial, "IsPartial"); ctd.IsPartial = true; -#endif ctd.PopulateBaseTypes += new EventHandler (Handler); ctd.PopulateBaseTypes -= new EventHandler (Handler); ctd.PopulateMembers += new EventHandler (Handler); @@ -94,10 +92,8 @@ namespace MonoCasTests.System.CodeDom { ctd.IsStruct = true; Assert.AreEqual (0, ctd.Members.Count, "Members"); Assert.AreEqual (TypeAttributes.Public, ctd.TypeAttributes, "TypeAttributes"); -#if NET_2_0 Assert.IsFalse (ctd.IsPartial, "IsPartial"); ctd.IsPartial = true; -#endif ctd.PopulateBaseTypes += new EventHandler (Handler); ctd.PopulateBaseTypes -= new EventHandler (Handler); ctd.PopulateMembers += new EventHandler (Handler); diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeMemberCas.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeMemberCas.cs index 3be57f484e5..84df55f71c1 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeMemberCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeMemberCas.cs @@ -62,10 +62,8 @@ namespace MonoCasTests.System.CodeDom { ctm.LinePragma = new CodeLinePragma (String.Empty, Int32.MaxValue); Assert.AreEqual (String.Empty, ctm.Name, "Name"); ctm.Name = "mono"; -#if NET_2_0 Assert.AreEqual (0, ctm.StartDirectives.Count, "StartDirectives"); Assert.AreEqual (0, ctm.EndDirectives.Count, "EndDirectives"); -#endif } [Test] diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeOfExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeOfExpressionTest.cs index 8ec880e68de..9ef4d703648 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeOfExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeOfExpressionTest.cs @@ -102,11 +102,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor3_NullType () { CodeTypeOfExpression ctoe = new CodeTypeOfExpression ((Type) null); diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCas.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCas.cs index c00798c01fa..f3d608169aa 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoCasTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCollectionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCollectionTest.cs index 2215d7ebe2c..87592faadf7 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCollectionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeParameterCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -242,4 +241,3 @@ namespace MonoTests.System.CodeDom { } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeParameterTest.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeParameterTest.cs index ae4e5224381..7cd512fcf22 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeParameterTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeParameterTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -89,4 +88,3 @@ namespace MonoTests.System.CodeDom } } -#endif diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceCas.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceCas.cs index 2672ac87cd5..5501b61eda0 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceCas.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceCas.cs @@ -47,7 +47,6 @@ namespace MonoCasTests.System.CodeDom { if (!SecurityManager.SecurityEnabled) Assert.Ignore ("SecurityManager.SecurityEnabled is OFF"); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor0_Deny_Unrestricted () @@ -63,7 +62,6 @@ namespace MonoCasTests.System.CodeDom { ctr.Options = CodeTypeReferenceOptions.GlobalReference; Assert.AreEqual (0, ctr.TypeArguments.Count, "TypeArguments"); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor1_Deny_Unrestricted () @@ -75,11 +73,9 @@ namespace MonoCasTests.System.CodeDom { ctr.ArrayElementType = new CodeTypeReference ("System.String"); Assert.AreEqual (0, ctr.ArrayRank, "ArrayRank"); ctr.ArrayRank = 1; -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, ctr.Options, "Options"); ctr.Options = CodeTypeReferenceOptions.GenericTypeParameter; Assert.AreEqual (0, ctr.TypeArguments.Count, "TypeArguments"); -#endif } [Test] @@ -93,11 +89,9 @@ namespace MonoCasTests.System.CodeDom { ctr.ArrayElementType = new CodeTypeReference ("System.String"); Assert.AreEqual (0, ctr.ArrayRank, "ArrayRank"); ctr.ArrayRank = 1; -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, ctr.Options, "Options"); ctr.Options = CodeTypeReferenceOptions.GenericTypeParameter; Assert.AreEqual (0, ctr.TypeArguments.Count, "TypeArguments"); -#endif } [Test] @@ -112,13 +106,10 @@ namespace MonoCasTests.System.CodeDom { ctr.ArrayElementType = new CodeTypeReference ("System.String"); ctr.BaseType = String.Empty; ctr.ArrayRank = 0; -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, ctr.Options, "Options"); ctr.Options = CodeTypeReferenceOptions.GenericTypeParameter; Assert.AreEqual (0, ctr.TypeArguments.Count, "TypeArguments"); -#endif } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void Constructor4_Deny_Unrestricted () @@ -184,7 +175,6 @@ namespace MonoCasTests.System.CodeDom { ctr.Options = CodeTypeReferenceOptions.GenericTypeParameter; Assert.AreEqual (1, ctr.TypeArguments.Count, "TypeArguments"); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void LinkDemand_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceExpressionTest.cs index 5c349414f39..1f6e4c1bed6 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceExpressionTest.cs @@ -37,7 +37,6 @@ namespace MonoTests.System.CodeDom [TestFixture] public class CodeTypeReferenceExpressionTest { -#if NET_2_0 [Test] public void Constructor0 () { @@ -45,7 +44,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (ctre.Type, "#1"); Assert.AreEqual (typeof (void).FullName, ctre.Type.BaseType, "#2"); } -#endif [Test] public void Constructor1 () @@ -95,11 +93,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor3_NullType () { CodeTypeReferenceExpression ctre = new CodeTypeReferenceExpression ((Type) null); diff --git a/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceTest.cs b/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceTest.cs index aee90f00748..c968ebbea42 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeTypeReferenceTest.cs @@ -9,9 +9,7 @@ using System; using System.CodeDom; -#if NET_2_0 using System.Collections.Generic; -#endif using NUnit.Framework; @@ -27,11 +25,9 @@ namespace MonoTests.System.CodeDom Assert.AreEqual (typeof (void).FullName, reference.BaseType); Assert.AreEqual (0, reference.ArrayRank); Assert.IsNull (reference.ArrayElementType); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); -#endif } [Test] @@ -41,19 +37,13 @@ namespace MonoTests.System.CodeDom Assert.AreEqual (typeof (void).FullName, reference.BaseType, "#1"); Assert.AreEqual (0, reference.ArrayRank, "#2"); Assert.IsNull (reference.ArrayElementType, "#3"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); -#endif } [Test] -#if NET_2_0 [ExpectedException (typeof(ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void NullType () { new CodeTypeReference ((Type) null); @@ -77,7 +67,6 @@ namespace MonoTests.System.CodeDom public void BaseTypeTest1 () { CodeTypeReference reference = new CodeTypeReference ("A[B]"); -#if NET_2_0 Assert.AreEqual ("A", reference.BaseType, "#1"); Assert.AreEqual (0, reference.ArrayRank, "#2"); Assert.IsNull (reference.ArrayElementType, "#3"); @@ -92,11 +81,6 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ((CodeTypeReferenceOptions) 0, typeArgument.Options, "#10"); Assert.IsNotNull (typeArgument.TypeArguments, "#11"); Assert.AreEqual (0, typeArgument.TypeArguments.Count, "#12"); -#else - Assert.AreEqual ("A[B]", reference.BaseType, "#1"); - Assert.AreEqual (0, reference.ArrayRank, "#2"); - Assert.IsNull (reference.ArrayElementType, "#3"); -#endif } [Test] @@ -106,21 +90,17 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ("A", reference.BaseType, "#1"); Assert.AreEqual (1, reference.ArrayRank, "#2"); Assert.IsNotNull (reference.ArrayElementType, "#3"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); -#endif CodeTypeReference arrayElementType = reference.ArrayElementType; Assert.AreEqual ("A", arrayElementType.BaseType, "#7"); Assert.AreEqual (0, arrayElementType.ArrayRank, "#8"); Assert.IsNull (arrayElementType.ArrayElementType, "#9"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, arrayElementType.Options, "#10"); Assert.IsNotNull (arrayElementType.TypeArguments, "#11"); Assert.AreEqual (0, arrayElementType.TypeArguments.Count, "#12"); -#endif } [Test] @@ -130,21 +110,17 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ("A", reference.BaseType, "#1"); Assert.AreEqual (2, reference.ArrayRank, "#2"); Assert.IsNotNull (reference.ArrayElementType, "#3"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); -#endif CodeTypeReference arrayElementType = reference.ArrayElementType; Assert.AreEqual ("A", arrayElementType.BaseType, "#7"); Assert.AreEqual (0, arrayElementType.ArrayRank, "#8"); Assert.IsNull (arrayElementType.ArrayElementType, "#9"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, arrayElementType.Options, "#10"); Assert.IsNotNull (arrayElementType.TypeArguments, "#11"); Assert.AreEqual (0, arrayElementType.TypeArguments.Count, "#12"); -#endif } [Test] @@ -154,28 +130,23 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ("A", reference.BaseType, "#1"); Assert.AreEqual (3, reference.ArrayRank, "#2"); Assert.IsNotNull (reference.ArrayElementType, "#3"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); -#endif CodeTypeReference arrayElementType = reference.ArrayElementType; Assert.AreEqual ("A", arrayElementType.BaseType, "#7"); Assert.AreEqual (0, arrayElementType.ArrayRank, "#8"); Assert.IsNull (arrayElementType.ArrayElementType, "#9"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, arrayElementType.Options, "#10"); Assert.IsNotNull (arrayElementType.TypeArguments, "#11"); Assert.AreEqual (0, arrayElementType.TypeArguments.Count, "#12"); -#endif } [Test] public void BaseTypeTest5 () { CodeTypeReference reference = new CodeTypeReference ("A[B,C]"); -#if NET_2_0 Assert.AreEqual ("A", reference.BaseType, "#1"); Assert.AreEqual (0, reference.ArrayRank, "#2"); Assert.IsNull (reference.ArrayElementType, "#3"); @@ -198,11 +169,6 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ((CodeTypeReferenceOptions) 0, typeArgument.Options, "#16"); Assert.IsNotNull (typeArgument.TypeArguments, "#17"); Assert.AreEqual (0, typeArgument.TypeArguments.Count, "#18"); -#else - Assert.AreEqual ("A[B,C]", reference.BaseType, "#1"); - Assert.AreEqual (0, reference.ArrayRank, "#2"); - Assert.IsNull (reference.ArrayElementType, "#3"); -#endif } [Test] @@ -212,18 +178,15 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ("A[", reference.BaseType, "#1"); Assert.AreEqual (0, reference.ArrayRank, "#2"); Assert.IsNull (reference.ArrayElementType, "#3"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); -#endif } [Test] public void BaseTypeTest7 () { CodeTypeReference reference = new CodeTypeReference ("A[,B,,C]"); -#if NET_2_0 Assert.AreEqual ("A", reference.BaseType, "#1"); Assert.AreEqual (0, reference.ArrayRank, "#2"); Assert.IsNull (reference.ArrayElementType, "#3"); @@ -246,95 +209,59 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ((CodeTypeReferenceOptions) 0, typeArgument.Options, "#16"); Assert.IsNotNull (typeArgument.TypeArguments, "#17"); Assert.AreEqual (0, typeArgument.TypeArguments.Count, "#18"); -#else - Assert.AreEqual ("A[,B,,C]", reference.BaseType, "#1"); - Assert.AreEqual (0, reference.ArrayRank, "#2"); - Assert.IsNull (reference.ArrayElementType, "#3"); -#endif } [Test] -#if NET_2_0 // CodeTypeReference should parse basetype from right to left in 2.0 // profile [Category ("NotWorking")] -#endif public void BaseTypeTest8 () { CodeTypeReference reference = new CodeTypeReference ("A[,,][,]"); Assert.AreEqual ("A", reference.BaseType, "#1"); -#if NET_2_0 Assert.AreEqual (3, reference.ArrayRank, "#2"); -#else - Assert.AreEqual (2, reference.ArrayRank, "#2"); -#endif Assert.IsNotNull (reference.ArrayElementType, "#3"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); -#endif CodeTypeReference arrayElementType = reference.ArrayElementType; Assert.AreEqual ("A", arrayElementType.BaseType, "#7"); -#if NET_2_0 Assert.AreEqual (2, arrayElementType.ArrayRank, "#8"); -#else - Assert.AreEqual (3, arrayElementType.ArrayRank, "#8"); -#endif Assert.IsNotNull (arrayElementType.ArrayElementType, "#9"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, arrayElementType.Options, "#10"); Assert.IsNotNull (arrayElementType.TypeArguments, "#11"); Assert.AreEqual (0, arrayElementType.TypeArguments.Count, "#12"); -#endif arrayElementType = arrayElementType.ArrayElementType; Assert.AreEqual ("A", arrayElementType.BaseType, "#13"); Assert.AreEqual (0, arrayElementType.ArrayRank, "#14"); Assert.IsNull (arrayElementType.ArrayElementType, "#15"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, arrayElementType.Options, "#16"); Assert.IsNotNull (arrayElementType.TypeArguments, "#17"); Assert.AreEqual (0, arrayElementType.TypeArguments.Count, "#18"); -#endif } [Test] -#if NET_2_0 // CodeTypeReference should parse basetype from right to left in 2.0 // profile [Category ("NotWorking")] -#endif public void BaseTypeTest9 () { CodeTypeReference reference = new CodeTypeReference ("A[B,,D][,]"); -#if NET_2_0 Assert.AreEqual ("A`2", reference.BaseType, "#1"); Assert.AreEqual (2, reference.ArrayRank, "#2"); -#else - Assert.AreEqual ("A[B,,D]", reference.BaseType, "#1"); - Assert.AreEqual (2, reference.ArrayRank, "#2"); -#endif Assert.IsNotNull (reference.ArrayElementType, "#3"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, reference.Options, "#4"); Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (2, reference.TypeArguments.Count, "#6"); -#endif CodeTypeReference arrayElementType = reference.ArrayElementType; -#if NET_2_0 Assert.AreEqual ("A`2", arrayElementType.BaseType, "#7"); Assert.AreEqual (0, arrayElementType.ArrayRank, "#8"); -#else - Assert.AreEqual ("A[B,,D]", arrayElementType.BaseType, "#7"); - Assert.AreEqual (0, arrayElementType.ArrayRank, "#8"); -#endif Assert.IsNull (arrayElementType.ArrayElementType, "#9"); -#if NET_2_0 Assert.AreEqual ((CodeTypeReferenceOptions) 0, arrayElementType.Options, "#10"); Assert.IsNotNull (arrayElementType.TypeArguments, "#11"); Assert.AreEqual (2, arrayElementType.TypeArguments.Count, "#12"); @@ -354,10 +281,8 @@ namespace MonoTests.System.CodeDom Assert.AreEqual ((CodeTypeReferenceOptions) 0, typeArgument.Options, "#22"); Assert.IsNotNull (typeArgument.TypeArguments, "#23"); Assert.AreEqual (0, typeArgument.TypeArguments.Count, "#24"); -#endif } -#if NET_2_0 [Test] public void Defaults () { @@ -598,7 +523,6 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (reference.TypeArguments, "#5"); Assert.AreEqual (0, reference.TypeArguments.Count, "#6"); } -#endif // bug #76535 [Test] diff --git a/mcs/class/System/Test/System.CodeDom/CodeVariableDeclarationStatementTest.cs b/mcs/class/System/Test/System.CodeDom/CodeVariableDeclarationStatementTest.cs index 1b2349f5144..4eb87ad40c0 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeVariableDeclarationStatementTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeVariableDeclarationStatementTest.cs @@ -67,13 +67,11 @@ namespace MonoTests.System.CodeDom Assert.IsNotNull (cvds.Type, "#11"); Assert.AreEqual (typeof (void).FullName, cvds.Type.BaseType, "#12"); -#if NET_2_0 Assert.IsNotNull (cvds.StartDirectives, "#13"); Assert.AreEqual (0, cvds.StartDirectives.Count, "#14"); Assert.IsNotNull (cvds.EndDirectives, "#15"); Assert.AreEqual (0, cvds.EndDirectives.Count, "#16"); -#endif Assert.IsNull (cvds.LinePragma, "#17"); @@ -153,11 +151,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor3_NullType () { CodeVariableDeclarationStatement cvds = new CodeVariableDeclarationStatement ( @@ -240,11 +234,7 @@ namespace MonoTests.System.CodeDom } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor6_NullType () { CodeVariableDeclarationStatement cvds = new CodeVariableDeclarationStatement ( diff --git a/mcs/class/System/Test/System.CodeDom/CodeVariableReferenceExpressionTest.cs b/mcs/class/System/Test/System.CodeDom/CodeVariableReferenceExpressionTest.cs index 799b5d18fe9..d8a5b747f3e 100644 --- a/mcs/class/System/Test/System.CodeDom/CodeVariableReferenceExpressionTest.cs +++ b/mcs/class/System/Test/System.CodeDom/CodeVariableReferenceExpressionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -73,4 +72,3 @@ namespace MonoTests.System.CodeDom } } -#endif diff --git a/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs b/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs index 65b54087b29..b50ff0fc666 100644 --- a/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs +++ b/mcs/class/System/Test/System.Collections.Generic/LinkedListTest.cs @@ -1,4 +1,3 @@ -#if NET_2_0 using System; using System.Collections.Generic; using System.IO; @@ -341,4 +340,3 @@ namespace MonoTests.System.Collections.Generic } } -#endif diff --git a/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs b/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs index 5c3a1a78c06..9e32e84e0a8 100644 --- a/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs +++ b/mcs/class/System/Test/System.Collections.Generic/QueueTest.cs @@ -5,7 +5,6 @@ // Ben Maurer (bmaurer@ximian.com) // -#if NET_2_0 using System; using System.Collections; using System.Collections.Generic; @@ -376,4 +375,3 @@ namespace MonoTests.System.Collections.Generic { 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b }; } } -#endif diff --git a/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs b/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs index 2371500bd74..b6baac08e85 100644 --- a/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs +++ b/mcs/class/System/Test/System.Collections.Generic/SortedListTest.cs @@ -29,7 +29,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -527,4 +526,3 @@ namespace MonoTests.System.Collections.Generic } } -#endif diff --git a/mcs/class/System/Test/System.Collections.Generic/StackTest.cs b/mcs/class/System/Test/System.Collections.Generic/StackTest.cs index 3f8b64ec0d0..0827b25d931 100644 --- a/mcs/class/System/Test/System.Collections.Generic/StackTest.cs +++ b/mcs/class/System/Test/System.Collections.Generic/StackTest.cs @@ -5,7 +5,6 @@ // Ben Maurer (bmaurer@ximian.com) // -#if NET_2_0 using System; using System.Collections; using System.Collections.Generic; @@ -341,4 +340,3 @@ namespace MonoTests.System.Collections.Generic 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b }; } } -#endif diff --git a/mcs/class/System/Test/System.Collections.Specialized/BitVector32Test.cs b/mcs/class/System/Test/System.Collections.Specialized/BitVector32Test.cs index 75a92a79bd4..b9f7de849fb 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/BitVector32Test.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/BitVector32Test.cs @@ -197,11 +197,7 @@ namespace MonoTests.System.Collections.Specialized public void NegativeIndexer () { BitVector32 bv = new BitVector32 (-1); -#if NET_2_0 Assert.IsTrue (bv [Int32.MinValue], "Int32.MinValue"); -#else - Assert.IsFalse (bv [Int32.MinValue], "Int32.MinValue"); -#endif } [Test] diff --git a/mcs/class/System/Test/System.Collections.Specialized/HybridDictionaryTest.cs b/mcs/class/System/Test/System.Collections.Specialized/HybridDictionaryTest.cs index 9fb135d5821..0f8d85c3cf7 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/HybridDictionaryTest.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/HybridDictionaryTest.cs @@ -72,9 +72,7 @@ namespace MonoTests.System.Collections.Specialized } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Empty () { HybridDictionary hd = new HybridDictionary (); diff --git a/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseCas.cs b/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseCas.cs index 234b60db7ba..c01e6a7f57f 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseCas.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseCas.cs @@ -62,11 +62,9 @@ namespace MonoCasTests.System.Collections.Specialized { unit.GetObjectData (); unit.GetAllValues_Type (); unit.GetAllValues (); -#if NET_2_0 unit.Constructor_IEqualityComparer (); unit.Constructor_Int_IEqualityComparer (); unit.GetObjectData_IEqualityComparer (); -#endif } [Test] diff --git a/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseTest.cs b/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseTest.cs index 8253706df63..d9a8a6ed672 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseTest.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/NameObjectCollectionBaseTest.cs @@ -58,7 +58,6 @@ namespace MonoTests.System.Collections.Specialized { { } -#if NET_2_0 public UnitTestNameObjectCollectionBase (IEqualityComparer comparer) : base (comparer) { @@ -68,7 +67,6 @@ namespace MonoTests.System.Collections.Specialized { : base (capacity, comparer) { } -#endif public bool _IsReadOnly { get { return base.IsReadOnly; } set { base.IsReadOnly = value; } @@ -218,7 +216,6 @@ namespace MonoTests.System.Collections.Specialized { { new UnitTestNameObjectCollectionBase (Int32.MinValue); } -#if NET_2_0 [Test] public void Constructor_IEqualityComparer () { @@ -281,7 +278,6 @@ namespace MonoTests.System.Collections.Specialized { } } } -#endif [Test] public void Constructor_Provider_Comparer () { @@ -443,7 +439,6 @@ namespace MonoTests.System.Collections.Specialized { UnitTestNameObjectCollectionBase coll = new UnitTestNameObjectCollectionBase (); coll.Add ("a", "!"); coll._IsReadOnly = true; -#if NET_2_0 try { coll.Set (0, "1"); Assert.Fail ("#1"); @@ -453,10 +448,6 @@ namespace MonoTests.System.Collections.Specialized { Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); } -#else - coll.Set (0, "1"); - Assert.AreEqual ("1", coll.Get (0), "Get(0)"); -#endif } [Test] @@ -499,7 +490,6 @@ namespace MonoTests.System.Collections.Specialized { public void CopyTo_Array_Null () { UnitTestNameObjectCollectionBase c = new UnitTestNameObjectCollectionBase (); -#if NET_2_0 try { ((ICollection)c).CopyTo (null, 0); Assert.Fail ("#A1"); @@ -510,16 +500,12 @@ namespace MonoTests.System.Collections.Specialized { Assert.IsNotNull (ex.ParamName, "#A5"); Assert.AreEqual ("array", ex.ParamName, "#A6"); } -#else - ((ICollection) c).CopyTo (null, 0); -#endif c.Add ("1", "mono"); try { ((ICollection) c).CopyTo (null, 0); Assert.Fail ("#B1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); @@ -527,10 +513,6 @@ namespace MonoTests.System.Collections.Specialized { Assert.IsNotNull (ex.ParamName, "#B5"); Assert.AreEqual ("array", ex.ParamName, "#B6"); } -#else - } catch (NullReferenceException) { - } -#endif } [Test] @@ -542,21 +524,12 @@ namespace MonoTests.System.Collections.Specialized { try { ((ICollection) c).CopyTo (array, -1); Assert.Fail ("#1"); -#if NET_2_0 } 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"); } -#else - } catch (IndexOutOfRangeException ex) { - // Index was outside the bounds of the array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - } -#endif } [Test] @@ -571,7 +544,6 @@ namespace MonoTests.System.Collections.Specialized { try { ((ICollection) c).CopyTo (array, 2); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentException ex) { // Insufficient space in the target location to // copy the information @@ -580,14 +552,6 @@ namespace MonoTests.System.Collections.Specialized { Assert.IsNotNull (ex.Message, "#4"); Assert.IsNull (ex.ParamName, "#5"); } -#else - } catch (IndexOutOfRangeException ex) { - // Index was outside the bounds of the array - Assert.AreEqual (typeof (IndexOutOfRangeException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - } -#endif } [Test] diff --git a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionCas.cs b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionCas.cs index b99cf65240a..2b70487740d 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionCas.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionCas.cs @@ -70,10 +70,8 @@ namespace MonoCasTests.System.Collections.Specialized { unit.CaseInsensitive (); unit.CopyTo (); unit.Remove (); -#if NET_2_0 unit.Constructor_IEqualityComparer (); unit.Constructor_Int_IEqualityComparer (); -#endif } [Test] diff --git a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs index 60abadc3387..03d4b3212d4 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/NameValueCollectionTest.cs @@ -201,11 +201,7 @@ namespace MonoTests.System.Collections.Specialized { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Add_NVC_Null () { new NameValueCollection ().Add (null); @@ -340,11 +336,7 @@ namespace MonoTests.System.Collections.Specialized { } [Test] -#if NET_2_0 [ExpectedException (typeof (InvalidCastException))] -#else - [ExpectedException (typeof (ArrayTypeMismatchException))] -#endif public void CopyTo_WrongTypeArray () { Array a = Array.CreateInstance (typeof (DateTime), 3); @@ -385,28 +377,19 @@ namespace MonoTests.System.Collections.Specialized { } } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor_Null_NVC () { NameValueCollection nvc = new NameValueCollection((NameValueCollection)null); } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Constructor_Capacity_Null_NVC () { NameValueCollection nvc = new NameValueCollection(10, (NameValueCollection)null); } -#if NET_2_0 [Test] public void Constructor_IEqualityComparer () { @@ -448,7 +431,6 @@ namespace MonoTests.System.Collections.Specialized { Assert.AreEqual (c2.Get ("KEY"), "value", "Constructor_NameValueCollection"); c2.Remove ("key"); } -#endif class MyNVC : NameValueCollection { List<string> log; diff --git a/mcs/class/System/Test/System.Collections.Specialized/StringDictionaryTest.cs b/mcs/class/System/Test/System.Collections.Specialized/StringDictionaryTest.cs index 3e17e08b263..a618efb23fe 100644 --- a/mcs/class/System/Test/System.Collections.Specialized/StringDictionaryTest.cs +++ b/mcs/class/System/Test/System.Collections.Specialized/StringDictionaryTest.cs @@ -57,11 +57,7 @@ namespace MonoTests.System.Collections.Specialized { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void This_Null () { StringDictionary sd = new StringDictionary (); @@ -100,11 +96,7 @@ namespace MonoTests.System.Collections.Specialized { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Add_NullKey () { StringDictionary sd = new StringDictionary (); @@ -112,11 +104,7 @@ namespace MonoTests.System.Collections.Specialized { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void ContainsKey_Null () { StringDictionary sd = new StringDictionary (); @@ -124,11 +112,7 @@ namespace MonoTests.System.Collections.Specialized { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void Remove_Null () { StringDictionary sd = new StringDictionary (); diff --git a/mcs/class/System/Test/System.ComponentModel.Design.Serialization/ContextStackTest.cs b/mcs/class/System/Test/System.ComponentModel.Design.Serialization/ContextStackTest.cs index 4cfc383b5ab..c35d672d381 100644 --- a/mcs/class/System/Test/System.ComponentModel.Design.Serialization/ContextStackTest.cs +++ b/mcs/class/System/Test/System.ComponentModel.Design.Serialization/ContextStackTest.cs @@ -58,7 +58,6 @@ namespace MonoTests.System.ComponentModel.Design.Serialization Assert.AreSame (two, stack [0], "#6"); Assert.AreSame (two, stack.Current, "#7"); -#if NET_2_0 string three = "three"; stack.Append (three); @@ -72,15 +71,11 @@ namespace MonoTests.System.ComponentModel.Design.Serialization Assert.AreSame (three, stack[0], "#13"); Assert.AreSame (three, stack.Current, "#14"); Assert.AreSame (three, stack.Pop (), "#15"); -#else - Assert.AreSame (two, stack.Pop (), "#15"); -#endif Assert.IsNull (stack.Pop (), "#16"); Assert.IsNull (stack.Current, "#17"); } -#if NET_2_0 [Test] public void Append_Context_Null () { @@ -95,7 +90,6 @@ namespace MonoTests.System.ComponentModel.Design.Serialization Assert.AreEqual ("context", ex.ParamName, "#5"); } } -#endif [Test] // Item (Int32) public void Indexer1 () @@ -209,4 +203,4 @@ namespace MonoTests.System.ComponentModel.Design.Serialization } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System/Test/System.ComponentModel.Design/CheckoutExceptionTest.cs b/mcs/class/System/Test/System.ComponentModel.Design/CheckoutExceptionTest.cs index 9ee7ed031c2..1b3fdf5456b 100644 --- a/mcs/class/System/Test/System.ComponentModel.Design/CheckoutExceptionTest.cs +++ b/mcs/class/System/Test/System.ComponentModel.Design/CheckoutExceptionTest.cs @@ -74,7 +74,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.AreEqual (string.Empty, ex.Message, "#C4"); } -#if NET_2_0 [Test] // ctor (string, Exception) public void Constructor3 () { @@ -104,7 +103,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.IsNotNull (ex.Message, "#D3"); Assert.AreEqual (string.Empty, ex.Message, "#D4"); } -#endif [Test] // ctor (string, int) public void Constructor4 () @@ -139,11 +137,7 @@ namespace MonoTests.System.ComponentModel.Design public void Canceled () { CheckoutException ex = CheckoutException.Canceled; -#if NET_2_0 Assert.AreEqual (-2147467260, ex.ErrorCode, "#1"); -#else - Assert.AreEqual (-2147467259, ex.ErrorCode, "#1"); -#endif Assert.IsNull (ex.InnerException, "#2"); Assert.IsNotNull (ex.Message, "#3"); Assert.IsTrue (ex.Message.IndexOf (ex.GetType ().FullName) == -1, "#4"); @@ -151,4 +145,4 @@ namespace MonoTests.System.ComponentModel.Design } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System/Test/System.ComponentModel.Design/ServiceContainerTest.cs b/mcs/class/System/Test/System.ComponentModel.Design/ServiceContainerTest.cs index f66f7f47686..a7044fde9f4 100644 --- a/mcs/class/System/Test/System.ComponentModel.Design/ServiceContainerTest.cs +++ b/mcs/class/System/Test/System.ComponentModel.Design/ServiceContainerTest.cs @@ -104,7 +104,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.IsNull (parent.GetService (typeof (ICollection)), "#F2"); } -#if NET_2_0 [Test] public void AddService1_Disposed () { @@ -130,7 +129,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.IsNotNull (service, "#C1"); Assert.AreSame (serviceInstance2, service, "#C2"); } -#endif [Test] // AddService (Type, Object) public void AddService1_ServiceInstance_Null () @@ -219,7 +217,6 @@ namespace MonoTests.System.ComponentModel.Design } } -#if NET_2_0 [Test] // AddService (Type, ServiceCreatorCallback) public void AddService2_Disposed () { @@ -243,7 +240,6 @@ namespace MonoTests.System.ComponentModel.Design service = sc.GetService (typeof (Svc)); Assert.IsNotNull (service, "#C"); } -#endif [Test] // AddService (Type, ServiceCreatorCallback) public void AddService2_ServiceType_Null () @@ -300,7 +296,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.AreSame (serviceInstance1, parent.GetService (serviceType1), "#C2"); } -#if NET_2_0 [Test] // AddService (Type, Object, Boolean) public void AddService3_Disposed () { @@ -331,7 +326,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.AreSame (serviceInstance1, sc.GetService (serviceType1), "#B3"); Assert.AreSame (serviceInstance2, sc.GetService (serviceType2), "#B4"); } -#endif [Test] // AddService (Type, Object, Boolean) public void AddService3_ServiceInstance_Null () @@ -482,22 +476,14 @@ namespace MonoTests.System.ComponentModel.Design ServiceContainer sc1 = new ServiceContainer (); Assert.AreSame (sc1, sc1.GetService (typeof (IServiceContainer)), "#A1"); -#if NET_2_0 Assert.AreSame (sc1, sc1.GetService (typeof(ServiceContainer)), "#A2"); -#else - Assert.IsNull (sc1.GetService (typeof (ServiceContainer)), "#A2"); -#endif ServiceContainer sc2 = new ServiceContainer (); sc1.AddService (typeof (IServiceContainer), sc2); sc1.AddService (typeof (ServiceContainer), sc2); Assert.AreSame (sc1, sc1.GetService (typeof (IServiceContainer)), "#B1"); -#if NET_2_0 Assert.AreSame (sc1, sc1.GetService (typeof(ServiceContainer)), "#B2"); -#else - Assert.AreSame (sc2, sc1.GetService (typeof (ServiceContainer)), "#B2"); -#endif } [Test] @@ -617,7 +603,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.IsNull (parent.GetService (serviceType1), "#K2"); } -#if NET_2_0 [Test] // RemoveService (Type) public void RemoveService1_Disposed () { @@ -635,7 +620,6 @@ namespace MonoTests.System.ComponentModel.Design sc.RemoveService (typeof (DateTime)); } -#endif [Test] // RemoveService (Type) public void RemoveService1_ServiceType_Null () @@ -724,7 +708,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.IsNull (parent.GetService (serviceType1), "#H2"); } -#if NET_2_0 [Test] // RemoveService (Type, Boolean) public void RemoveService2_Disposed () { @@ -756,7 +739,6 @@ namespace MonoTests.System.ComponentModel.Design Assert.IsNull (sc.GetService (serviceType1), "#B1"); Assert.IsNull (sc.GetService (serviceType2), "#B2"); } -#endif [Test] // RemoveService (Type, Boolean) public void RemoveService2_ServiceType_Null () @@ -786,4 +768,4 @@ namespace MonoTests.System.ComponentModel.Design } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs b/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs index 1f6e86c5775..0c91937e575 100644 --- a/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/AsyncOperationManagerTest.cs @@ -7,7 +7,6 @@ // Copyright (C) 2007 Novell, Inc.
//
-#if NET_2_0
using System;
using System.Threading;
@@ -62,4 +61,3 @@ namespace MonoTests.System.ComponentModel }
}
-#endif
diff --git a/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs b/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs index 43faa5cc107..57d1822e993 100644 --- a/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/BindingListTest.cs @@ -1,4 +1,3 @@ -#if NET_2_0 using System; using System.ComponentModel; @@ -698,4 +697,3 @@ namespace MonoTests.System.ComponentModel } } -#endif diff --git a/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs index 0c02ae7605f..558ca70e98b 100644 --- a/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/ByteConverterTests.cs @@ -536,7 +536,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -547,7 +546,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/ContainerTest.cs b/mcs/class/System/Test/System.ComponentModel/ContainerTest.cs index 46706fd348e..cbae2e141b5 100644 --- a/mcs/class/System/Test/System.ComponentModel/ContainerTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/ContainerTest.cs @@ -40,7 +40,6 @@ namespace MonoTests.System.ComponentModel return _services.GetService (serviceType); } -#if NET_2_0 public new void RemoveWithoutUnsiting (IComponent component) { base.RemoveWithoutUnsiting (component); @@ -57,7 +56,6 @@ namespace MonoTests.System.ComponentModel return; base.ValidateName (component, name); } -#endif public bool Contains (IComponent component) { @@ -352,7 +350,6 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (1, container2.Components.Count, "#D8"); Assert.AreSame (c5, container2.Components [0], "#D9"); -#if NET_2_0 container.AllowDuplicateNames = true; TestComponent c6 = new TestComponent (); container.Add (c6, "dup"); @@ -362,7 +359,6 @@ namespace MonoTests.System.ComponentModel Assert.IsNotNull (c6.Site, "#E4"); Assert.AreEqual ("dup", c6.Site.Name, "#E5"); Assert.IsFalse (object.ReferenceEquals (c1.Site, c6.Site), "#E6"); -#endif } [Test] @@ -565,7 +561,6 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (1, _container.Components.Count); } -#if NET_2_0 [Test] public void RemoveWithoutUnsiting () { @@ -711,7 +706,6 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (1, container2.Components.Count, "#C8"); Assert.AreSame (compD, container2.Components [0], "#C9"); } -#endif class MyComponent : Component { diff --git a/mcs/class/System/Test/System.ComponentModel/CultureInfoConverterTest.cs b/mcs/class/System/Test/System.ComponentModel/CultureInfoConverterTest.cs index decc8dcdda1..c00738da1b0 100644 --- a/mcs/class/System/Test/System.ComponentModel/CultureInfoConverterTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/CultureInfoConverterTest.cs @@ -96,7 +96,6 @@ namespace MonoTests.System.ComponentModel [Test] public void ConvertFrom_String_InvalidCulture () { -#if NET_2_0 try { converter.ConvertFrom (null, CultureInfo.InvariantCulture, "(default)"); @@ -111,7 +110,6 @@ namespace MonoTests.System.ComponentModel Assert.IsTrue (ex.Message.IndexOf ("(default)") != -1, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } -#endif try { converter.ConvertFrom (null, CultureInfo.InvariantCulture, diff --git a/mcs/class/System/Test/System.ComponentModel/DecimalConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/DecimalConverterTests.cs index 3dc3d92440b..70d8dcd22dd 100644 --- a/mcs/class/System/Test/System.ComponentModel/DecimalConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/DecimalConverterTests.cs @@ -368,7 +368,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -379,7 +378,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/DisplayNameAttributeTests.cs b/mcs/class/System/Test/System.ComponentModel/DisplayNameAttributeTests.cs index 5a247f1286d..68e17075c7e 100644 --- a/mcs/class/System/Test/System.ComponentModel/DisplayNameAttributeTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/DisplayNameAttributeTests.cs @@ -8,7 +8,6 @@ // (c) 2006 Marek Habersack // -#if NET_2_0 using System; using System.ComponentModel; using System.Reflection; @@ -278,4 +277,3 @@ namespace MonoTests.System.ComponentModel } } } -#endif diff --git a/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs index 2c1558a3f87..cec27c0de88 100644 --- a/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/DoubleConverterTests.cs @@ -369,7 +369,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -380,7 +379,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs index 504a30a2682..fd20c0f4910 100644 --- a/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/EnumConverterTests.cs @@ -30,11 +30,7 @@ namespace MonoTests.System.ComponentModel Assert.IsFalse (converter.CanConvertFrom (typeof (int)), "#A4"); Assert.IsTrue (converter.CanConvertFrom (typeof (InstanceDescriptor)), "#A5"); Assert.IsFalse (converter.CanConvertFrom (typeof (string [])), "#A6"); -#if NET_2_0 Assert.IsTrue (converter.CanConvertFrom (typeof (Enum [])), "#A7"); -#else - Assert.IsFalse (converter.CanConvertFrom (typeof (Enum [])), "#A7"); -#endif converter = new EnumConverter (typeof (E2)); Assert.IsTrue (converter.CanConvertFrom (typeof (string)), "#B1"); @@ -43,11 +39,7 @@ namespace MonoTests.System.ComponentModel Assert.IsFalse (converter.CanConvertFrom (typeof (int)), "#B4"); Assert.IsTrue (converter.CanConvertFrom (typeof (InstanceDescriptor)), "#B5"); Assert.IsFalse (converter.CanConvertFrom (typeof (string [])), "#B6"); -#if NET_2_0 Assert.IsTrue (converter.CanConvertFrom (typeof (Enum [])), "#B7"); -#else - Assert.IsFalse (converter.CanConvertFrom (typeof (Enum [])), "#B7"); -#endif } [Test] @@ -60,11 +52,7 @@ namespace MonoTests.System.ComponentModel Assert.IsFalse (converter.CanConvertTo (typeof (int)), "#A4"); Assert.IsTrue (converter.CanConvertTo (typeof (InstanceDescriptor)), "#A5"); Assert.IsFalse (converter.CanConvertTo (typeof (string [])), "#A6"); -#if NET_2_0 Assert.IsTrue (converter.CanConvertTo (typeof (Enum [])), "#A7"); -#else - Assert.IsFalse (converter.CanConvertTo (typeof (Enum [])), "#A7"); -#endif converter = new EnumConverter (typeof (E2)); Assert.IsTrue (converter.CanConvertTo (typeof (string)), "#B1"); @@ -73,11 +61,7 @@ namespace MonoTests.System.ComponentModel Assert.IsFalse (converter.CanConvertTo (typeof (object)), "#B4"); Assert.IsTrue (converter.CanConvertTo (typeof (InstanceDescriptor)), "#B5"); Assert.IsFalse (converter.CanConvertTo (typeof (string [])), "#B6"); -#if NET_2_0 Assert.IsTrue (converter.CanConvertTo (typeof (Enum [])), "#B7"); -#else - Assert.IsFalse (converter.CanConvertTo (typeof (Enum [])), "#B7"); -#endif } [Test] @@ -97,7 +81,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 [Test] public void ConvertFrom_EnumArray () { @@ -132,7 +115,6 @@ namespace MonoTests.System.ComponentModel CultureInfo.InvariantCulture, (Enum []) new Enum [] { E2.Bb, E2.Dd }), "#B5"); } -#endif [Test] public void ConvertFrom_String () @@ -150,7 +132,6 @@ namespace MonoTests.System.ComponentModel try { converter.ConvertFrom (null, CultureInfo.InvariantCulture, string.Empty); Assert.Fail ("#B1"); -#if NET_2_0 } catch (FormatException ex) { // is not a valid value for E Assert.AreEqual (typeof (FormatException), ex.GetType (), "#B2"); @@ -164,19 +145,10 @@ namespace MonoTests.System.ComponentModel Assert.IsNull (inner.InnerException, "#B7"); Assert.IsNotNull (inner.Message, "#B8"); } -#else - } catch (ArgumentException ex) { - // Must specify valid information for parsing in the string - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - } -#endif try { converter.ConvertFrom (null, CultureInfo.InvariantCulture, "YY"); Assert.Fail ("#C1"); -#if NET_2_0 } catch (FormatException ex) { // YY is not a valid value for E Assert.AreEqual (typeof (FormatException), ex.GetType (), "#C2"); @@ -193,16 +165,6 @@ namespace MonoTests.System.ComponentModel Assert.IsTrue (inner.Message.IndexOf ("YY") != -1, "#C10"); Assert.IsNull (inner.ParamName, "#C11"); } -#else - } catch (ArgumentException ex) { - // Requested value YY was not found - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#C2"); - //Assert.IsNull (ex.InnerException, "#C3"); - Assert.IsNotNull (ex.Message, "#C4"); - Assert.IsTrue (ex.Message.IndexOf ("YY") != -1, "#C5"); - Assert.IsNull (ex.ParamName, "#C6"); - } -#endif } [Test] @@ -223,7 +185,6 @@ namespace MonoTests.System.ComponentModel try { converter.ConvertFrom (null, CultureInfo.InvariantCulture, string.Empty); Assert.Fail ("#B1"); -#if NET_2_0 } catch (FormatException ex) { // is not a valid value for E2 Assert.AreEqual (typeof (FormatException), ex.GetType (), "#B2"); @@ -237,19 +198,10 @@ namespace MonoTests.System.ComponentModel Assert.IsNull (inner.InnerException, "#B7"); Assert.IsNotNull (inner.Message, "#B8"); } -#else - } catch (ArgumentException ex) { - // Must specify valid information for parsing in the string - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); - Assert.IsNull (ex.InnerException, "#B3"); - Assert.IsNotNull (ex.Message, "#B4"); - } -#endif try { converter.ConvertFrom (null, CultureInfo.InvariantCulture, "Aa Bb"); Assert.Fail ("#C1"); -#if NET_2_0 } catch (FormatException ex) { // Aa Bb is not a valid value for E2 Assert.AreEqual (typeof (FormatException), ex.GetType (), "#C2"); @@ -265,20 +217,10 @@ namespace MonoTests.System.ComponentModel Assert.IsTrue (inner.Message.IndexOf ("Aa Bb") != -1, "#C10"); Assert.IsNull (inner.ParamName, "#C11"); } -#else - } catch (ArgumentException ex) { - // Requested value Aa Bb was not found - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#C2"); - Assert.IsNotNull (ex.Message, "#C3"); - Assert.IsTrue (ex.Message.IndexOf ("Aa Bb") != -1, "#C4"); - Assert.IsNull (ex.ParamName, "#C5"); - } -#endif try { converter.ConvertFrom (null, CultureInfo.InvariantCulture, "2,"); Assert.Fail ("#D1"); -#if NET_2_0 } catch (FormatException ex) { // 2, is not a valid value for E2 Assert.AreEqual (typeof (FormatException), ex.GetType (), "#D2"); @@ -294,18 +236,8 @@ namespace MonoTests.System.ComponentModel Assert.IsNotNull (inner.Message, "#D9"); Assert.IsFalse (inner.Message.IndexOf ("2,") != -1, "#D10"); } -#else - } catch (ArgumentException ex) { - // Must specify valid information for parsing in the string - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#D2"); - Assert.IsNull (ex.InnerException, "#D3"); - Assert.IsNotNull (ex.Message, "#D4"); - Assert.IsFalse (ex.Message.IndexOf ("2,") != -1, "#D5"); - } -#endif } -#if NET_2_0 [Test] public void ConvertTo_EnumArray () { @@ -488,7 +420,6 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (typeof (E3), enums [0].GetType (), "#H2"); Assert.AreEqual (E3.Aa, enums[0], "#H3"); } -#endif [Test] public void ConvertTo_InstanceDescriptor () diff --git a/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs b/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs index 34b0a182863..6ae957c9a24 100644 --- a/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/EventDescriptorCollectionTests.cs @@ -56,13 +56,8 @@ namespace MonoTests.System.ComponentModel EventDescriptorCollection col = new EventDescriptorCollection ( new EventDescriptor [] { descA, descB, descC, descD, descE, descF }); -#if NET_2_0 Assert.IsNull (col.Find ("heh_\u0061\u030a", false), "#1"); Assert.IsNull (col.Find ("hehe_\u00e5", false), "#2"); -#else - Assert.AreSame (descB, col.Find ("heh_\u0061\u030a", false), "#1"); - Assert.AreSame (descA, col.Find ("hehe_\u00e5", false), "#2"); -#endif Assert.AreSame (descA, col.Find ("hehe_\u0061\u030a", false), "#3"); Assert.AreSame (descB, col.Find ("heh_\u00e5", false), "#4"); Assert.IsNull (col.Find ("foo", false), "#5"); @@ -96,11 +91,7 @@ namespace MonoTests.System.ComponentModel IList list = ((IList) new EventDescriptorCollection (null)); Assert.AreEqual (0, list.Count, "#1"); -#if NET_2_0 Assert.IsFalse (list.IsFixedSize, "#2"); -#else - Assert.IsTrue (list.IsFixedSize, "#2"); -#endif Assert.IsFalse (list.IsReadOnly, "#3"); Assert.IsFalse (list.IsSynchronized, "#4"); Assert.IsNull (list.SyncRoot, "#5"); @@ -139,13 +130,8 @@ namespace MonoTests.System.ComponentModel EventDescriptorCollection col = new EventDescriptorCollection ( new EventDescriptor [] { descA, descB, descC, descD, descE, descF }); -#if NET_2_0 Assert.IsNull (col ["heh_\u0061\u030a"], "#1"); Assert.IsNull (col ["hehe_\u00e5"], "#2"); -#else - Assert.AreSame (descB, col ["heh_\u0061\u030a"], "#1"); - Assert.AreSame (descA, col ["hehe_\u00e5"], "#2"); -#endif Assert.AreSame (descA, col ["hehe_\u0061\u030a"], "#3"); Assert.AreSame (descB, col ["heh_\u00e5"], "#4"); Assert.IsNull (col ["foo"], "#5"); @@ -157,14 +143,12 @@ namespace MonoTests.System.ComponentModel Assert.IsNull (col [(string) null], "#11"); } -#if NET_2_0 public void ReadOnly () { EventDescriptorCollection descriptors = new EventDescriptorCollection ( (EventDescriptor []) null, true); AssertReadOnly (descriptors, "ReadOnly"); } -#endif [Test] // Sort () public void Sort1 () @@ -478,11 +462,7 @@ namespace MonoTests.System.ComponentModel IList list = (IList) descriptors; Assert.IsTrue (((IList) descriptors).IsReadOnly, testCase + "#9"); -#if NET_2_0 Assert.IsTrue (((IList) descriptors).IsFixedSize, testCase + "#10"); -#else - Assert.IsFalse (((IList) descriptors).IsFixedSize, testCase + "#10"); -#endif try { list.Add (desc); diff --git a/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs index 9b7b0dc9408..c9cdf5acdcb 100644 --- a/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/Int16ConverterTests.cs @@ -572,7 +572,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -583,7 +582,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs index a9158d3d9c3..e91504d6f97 100644 --- a/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/Int64ConverterTests.cs @@ -267,7 +267,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -278,7 +277,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/InvalidEnumArgumentExceptionTest.cs b/mcs/class/System/Test/System.ComponentModel/InvalidEnumArgumentExceptionTest.cs index b7e212891af..4934346cbe8 100644 --- a/mcs/class/System/Test/System.ComponentModel/InvalidEnumArgumentExceptionTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/InvalidEnumArgumentExceptionTest.cs @@ -54,7 +54,6 @@ namespace MonoTests.System.ComponentModel // TODO: ctor (SerializationInfo, StreamingContext) -#if NET_2_0 [Test] // ctor (string, Exception) public void Constructor3 () { @@ -79,7 +78,6 @@ namespace MonoTests.System.ComponentModel Assert.IsTrue (iea.Message.IndexOf (typeof (InvalidEnumArgumentException).FullName) != -1, "#C3"); Assert.IsNull (iea.ParamName, "#C4"); } -#endif [Test] // ctor (string, int, System.Type) public void Constructor4 () @@ -92,15 +90,9 @@ namespace MonoTests.System.ComponentModel iea = new InvalidEnumArgumentException ("arg", 667666, enumClass); Assert.IsNull (iea.InnerException, "#A1"); Assert.IsNotNull (iea.Message, "#A2"); -#if NET_2_0 Assert.IsTrue (iea.Message.IndexOf ("'arg'") != -1, "#A3"); Assert.IsTrue (iea.Message.IndexOf ("(" + 667666.ToString (CultureInfo.CurrentCulture) + ")") != -1, "#A4"); Assert.IsTrue (iea.Message.IndexOf ("'" + enumClass.Name + "'") != -1, "#A5"); -#else - Assert.IsTrue (iea.Message.IndexOf ("arg") != -1, "#A3"); - Assert.IsTrue (iea.Message.IndexOf (667666.ToString (CultureInfo.CurrentCulture)) != -1, "#A4"); - Assert.IsTrue (iea.Message.IndexOf (enumClass.Name) != -1, "#A5"); -#endif Assert.IsNotNull (iea.ParamName, "#A6"); Assert.AreEqual ("arg", iea.ParamName, "#A7"); @@ -109,15 +101,9 @@ namespace MonoTests.System.ComponentModel iea = new InvalidEnumArgumentException (string.Empty, 0, enumClass); Assert.IsNull (iea.InnerException, "#B1"); Assert.IsNotNull (iea.Message, "#B2"); -#if NET_2_0 Assert.IsTrue (iea.Message.IndexOf ("''") != -1, "#B3"); Assert.IsTrue (iea.Message.IndexOf ("(" + 0.ToString (CultureInfo.CurrentCulture) + ")") != -1, "#B4"); Assert.IsTrue (iea.Message.IndexOf ("'" + enumClass.Name + "'") != -1, "#B5"); -#else - Assert.IsTrue (iea.Message.IndexOf (" ") != -1, "#B3"); - Assert.IsTrue (iea.Message.IndexOf (0.ToString (CultureInfo.CurrentCulture)) != -1, "#B4"); - Assert.IsTrue (iea.Message.IndexOf (enumClass.Name) != -1, "#B5"); -#endif Assert.IsNotNull (iea.ParamName, "#B6"); Assert.AreEqual (string.Empty, iea.ParamName, "#B7"); @@ -126,15 +112,9 @@ namespace MonoTests.System.ComponentModel iea = new InvalidEnumArgumentException ((string) null, -56776, enumClass); Assert.IsNull (iea.InnerException, "#C1"); Assert.IsNotNull (iea.Message, "#C2"); -#if NET_2_0 Assert.IsTrue (iea.Message.IndexOf ("''") != -1, "#C3"); Assert.IsTrue (iea.Message.IndexOf ("(" + (-56776).ToString (CultureInfo.CurrentCulture) + ")") != -1, "#C4"); Assert.IsTrue (iea.Message.IndexOf ("'" + enumClass.Name + "'") != -1, "#C5"); -#else - Assert.IsTrue (iea.Message.IndexOf (" ") != -1, "#C3"); - Assert.IsTrue (iea.Message.IndexOf ((-56776).ToString (CultureInfo.CurrentCulture)) != -1, "#C4"); - Assert.IsTrue (iea.Message.IndexOf (enumClass.Name) != -1, "#C5"); -#endif Assert.IsNull (iea.ParamName, "#C6"); // The value of argument '' (0) is invalid for Enum type @@ -142,15 +122,9 @@ namespace MonoTests.System.ComponentModel iea = new InvalidEnumArgumentException ((string) null, 0, enumClass); Assert.IsNull (iea.InnerException, "#D1"); Assert.IsNotNull (iea.Message, "#D2"); -#if NET_2_0 Assert.IsTrue (iea.Message.IndexOf ("''") != -1, "#D3"); Assert.IsTrue (iea.Message.IndexOf ("(" + 0.ToString (CultureInfo.CurrentCulture) + ")") != -1, "#D4"); Assert.IsTrue (iea.Message.IndexOf ("'" + enumClass.Name + "'") != -1, "#D5"); -#else - Assert.IsTrue (iea.Message.IndexOf (" ") != -1, "#D3"); - Assert.IsTrue (iea.Message.IndexOf (0.ToString (CultureInfo.CurrentCulture)) != -1, "#D4"); - Assert.IsTrue (iea.Message.IndexOf (enumClass.Name) != -1, "#D5"); -#endif Assert.IsNull (iea.ParamName, "#D6"); } diff --git a/mcs/class/System/Test/System.ComponentModel/ListChangedEventArgsTest.cs b/mcs/class/System/Test/System.ComponentModel/ListChangedEventArgsTest.cs index 450ba3778eb..9299128bcf5 100644 --- a/mcs/class/System/Test/System.ComponentModel/ListChangedEventArgsTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/ListChangedEventArgsTest.cs @@ -45,7 +45,6 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (0, e.OldIndex); } -#if NET_2_0 [Test] public void Ctor_ListChangedType_NewIndex_PropDesc() { @@ -55,6 +54,5 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (2, e.NewIndex); Assert.AreEqual (2, e.OldIndex); } -#endif // NET_2_0 } } diff --git a/mcs/class/System/Test/System.ComponentModel/NullableConverterTest.cs b/mcs/class/System/Test/System.ComponentModel/NullableConverterTest.cs index e1c25fd871e..0a6d191fffd 100644 --- a/mcs/class/System/Test/System.ComponentModel/NullableConverterTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/NullableConverterTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.ComponentModel; @@ -106,4 +105,3 @@ namespace MonoTests.System.ComponentModel } } } -#endif diff --git a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs index 4e635bc451f..8c4730d7bf9 100644 --- a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorCollectionTests.cs @@ -131,11 +131,7 @@ namespace MonoTests.System.ComponentModel IList list = ((IList) new PropertyDescriptorCollection (null)); Assert.AreEqual (0, list.Count, "#1"); -#if NET_2_0 Assert.IsFalse (list.IsFixedSize, "#2"); -#else - Assert.IsTrue (list.IsFixedSize, "#2"); -#endif Assert.IsFalse (list.IsReadOnly, "#3"); Assert.IsFalse (list.IsSynchronized, "#4"); Assert.IsNull (list.SyncRoot, "#5"); @@ -164,11 +160,7 @@ namespace MonoTests.System.ComponentModel IDictionary dictionary = ((IDictionary) new PropertyDescriptorCollection (null)); Assert.AreEqual (0, dictionary.Count, "#1"); -#if NET_2_0 Assert.IsFalse (dictionary.IsFixedSize, "#2"); -#else - Assert.IsTrue (dictionary.IsFixedSize, "#2"); -#endif Assert.IsFalse (dictionary.IsReadOnly, "#3"); Assert.IsFalse (dictionary.IsSynchronized, "#4"); Assert.IsNull (dictionary.SyncRoot, "#5"); @@ -248,13 +240,11 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 public void ReadOnly () { PropertyDescriptorCollection descriptors = new PropertyDescriptorCollection(null, true); AssertReadOnly (descriptors, "ReadOnly"); } -#endif [Test] // Sort () public void Sort1 () @@ -568,11 +558,7 @@ namespace MonoTests.System.ComponentModel IList list = (IList) descriptors; Assert.IsTrue (((IList) descriptors).IsReadOnly, testCase + "#9"); -#if NET_2_0 Assert.IsTrue (((IList) descriptors).IsFixedSize, testCase + "#10"); -#else - Assert.IsFalse (((IList) descriptors).IsFixedSize, testCase + "#10"); -#endif try { list.Add (mockPropertyDescr); @@ -650,11 +636,7 @@ namespace MonoTests.System.ComponentModel IDictionary dictionary = (IDictionary) descriptors; Assert.IsTrue (dictionary.IsReadOnly, testCase + "#21"); -#if NET_2_0 Assert.IsTrue (dictionary.IsFixedSize, testCase + "#22"); -#else - Assert.IsFalse (dictionary.IsFixedSize, testCase + "#22"); -#endif try { dictionary.Add ("test", mockPropertyDescr); diff --git a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs index 25e29b1ff25..53dbd7bb9e5 100644 --- a/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/PropertyDescriptorTests.cs @@ -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; } } @@ -732,11 +730,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 +783,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 +850,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 [Test] public void GetInvocationTarget_Instance_Null () { @@ -969,7 +958,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 +1142,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 +1151,6 @@ namespace MonoTests.System.ComponentModel { return base.GetValueChangedHandler (component); } -#endif } [AttributeUsage (AttributeTargets.Field | AttributeTargets.Property)] diff --git a/mcs/class/System/Test/System.ComponentModel/ReferenceConverterTest.cs b/mcs/class/System/Test/System.ComponentModel/ReferenceConverterTest.cs index c8b742b1e2b..0c9312e2879 100644 --- a/mcs/class/System/Test/System.ComponentModel/ReferenceConverterTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/ReferenceConverterTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections.Generic; @@ -250,4 +249,3 @@ namespace MonoTests.System.ComponentModel } } } -#endif diff --git a/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs index fdd2deadfb0..f4c7ba6579f 100644 --- a/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/SByteConverterTests.cs @@ -266,7 +266,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -277,7 +276,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs index 1529162b52b..980ab436ad1 100644 --- a/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/SingleConverterTests.cs @@ -236,7 +236,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -247,7 +246,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs index cea80ce9033..dd60c8cdcb5 100644 --- a/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/UInt16ConverterTests.cs @@ -246,7 +246,6 @@ namespace MonoTests.System.ComponentModel return base.GetFormat (formatType); } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -257,7 +256,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs index 791a0519eef..cd3cec63566 100644 --- a/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/UInt32ConverterTests.cs @@ -232,7 +232,6 @@ namespace MonoTests.System.ComponentModel return base.GetFormat (formatType); } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -243,7 +242,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs b/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs index ae5c539786b..eb0799f044d 100644 --- a/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs +++ b/mcs/class/System/Test/System.ComponentModel/UInt64ConverterTests.cs @@ -256,7 +256,6 @@ namespace MonoTests.System.ComponentModel } } -#if NET_2_0 // adding this override in 1.x shows different result in .NET (it is ignored). // Some compatibility kids might want to fix this issue. public override NumberFormatInfo NumberFormat { @@ -267,7 +266,6 @@ namespace MonoTests.System.ComponentModel } set { throw new NotSupportedException (); } } -#endif } } } diff --git a/mcs/class/System/Test/System.ComponentModel/Win32ExceptionTest.cs b/mcs/class/System/Test/System.ComponentModel/Win32ExceptionTest.cs index 09101806f2f..27e72be2a1b 100644 --- a/mcs/class/System/Test/System.ComponentModel/Win32ExceptionTest.cs +++ b/mcs/class/System/Test/System.ComponentModel/Win32ExceptionTest.cs @@ -77,7 +77,6 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (int.MaxValue, ex.NativeErrorCode, "#C5"); } -#if NET_2_0 [Test] // ctor (string) public void Constructor2 () { @@ -105,7 +104,6 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (string.Empty, ex.Message, "#C4"); Assert.AreEqual (native_error, ex.NativeErrorCode, "#C5"); } -#endif [Test] // ctor (int, string) public void Constructor3 () @@ -146,7 +144,6 @@ namespace MonoTests.System.ComponentModel // TODO } -#if NET_2_0 [Test] // ctor (string, Exception) public void Constructor5 () { @@ -181,6 +178,5 @@ namespace MonoTests.System.ComponentModel Assert.AreEqual (string.Empty, ex.Message, "#D4"); Assert.AreEqual (native_error, ex.NativeErrorCode, "#D5"); } -#endif } } diff --git a/mcs/class/System/Test/System.Configuration.Provider/ProviderBaseTest.cs b/mcs/class/System/Test/System.Configuration.Provider/ProviderBaseTest.cs index b16004ea241..ef833c94146 100644 --- a/mcs/class/System/Test/System.Configuration.Provider/ProviderBaseTest.cs +++ b/mcs/class/System/Test/System.Configuration.Provider/ProviderBaseTest.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.Text; @@ -76,4 +75,3 @@ namespace MonoTests.System.Configuration.Provider { } -#endif diff --git a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs index 02f80fcfe71..8acf7ad2544 100644 --- a/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs +++ b/mcs/class/System/Test/System.Configuration/ApplicationSettingsBaseTest.cs @@ -29,7 +29,6 @@ //#define SPEW -#if NET_2_0 using System; using System.Text; @@ -471,4 +470,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System/Test/System.Configuration/ConfigXmlDocumentTest.cs b/mcs/class/System/Test/System.Configuration/ConfigXmlDocumentTest.cs index dd5cf915230..bf60640e07e 100644 --- a/mcs/class/System/Test/System.Configuration/ConfigXmlDocumentTest.cs +++ b/mcs/class/System/Test/System.Configuration/ConfigXmlDocumentTest.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.IO; @@ -78,4 +77,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System/Test/System.Configuration/ConfigurationExceptionTest.cs b/mcs/class/System/Test/System.Configuration/ConfigurationExceptionTest.cs index ecf2c5acd66..40feac8c806 100644 --- a/mcs/class/System/Test/System.Configuration/ConfigurationExceptionTest.cs +++ b/mcs/class/System/Test/System.Configuration/ConfigurationExceptionTest.cs @@ -61,11 +61,9 @@ namespace MonoTests.System.Configuration { ConfigurationException ce = new ConfigurationException (); Assert.IsNotNull (ce.BareMessage, "#1"); -#if NET_2_0 Assert.IsTrue (ce.BareMessage.IndexOf ("'" + typeof (ConfigurationException).FullName + "'") != -1, "#2:" + ce.BareMessage); Assert.IsNotNull (ce.Data, "#3"); Assert.AreEqual (0, ce.Data.Count, "#4"); -#endif Assert.IsNull (ce.Filename, "#5"); Assert.IsNull (ce.InnerException, "#6"); Assert.AreEqual (0, ce.Line, "#7"); @@ -81,10 +79,8 @@ namespace MonoTests.System.Configuration msg = "MSG"; ce = new ConfigurationException (msg); Assert.AreSame (msg, ce.BareMessage, "#A1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#A2"); Assert.AreEqual (0, ce.Data.Count, "#A3"); -#endif Assert.IsNull (ce.Filename, "#A4"); Assert.IsNull (ce.InnerException, "#A5"); Assert.AreEqual (0, ce.Line, "#A6"); @@ -93,14 +89,9 @@ namespace MonoTests.System.Configuration msg = null; ce = new ConfigurationException (msg); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#B1"); Assert.IsNotNull (ce.Data, "#B2"); Assert.AreEqual (0, ce.Data.Count, "#B3"); -#else - Assert.IsNotNull (ce.BareMessage, "#B1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#B2"); -#endif Assert.IsNull (ce.Filename, "#B4"); Assert.IsNull (ce.InnerException, "#B5"); Assert.AreEqual (0, ce.Line, "#B6"); @@ -118,10 +109,8 @@ namespace MonoTests.System.Configuration inner = new Exception (); ce = new ConfigurationException (msg, inner); Assert.AreSame (msg, ce.BareMessage, "#A1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#A2"); Assert.AreEqual (0, ce.Data.Count, "#A3"); -#endif Assert.IsNull (ce.Filename, "#A4"); Assert.AreSame (inner, ce.InnerException, "#A5"); Assert.AreEqual (0, ce.Line, "#A6"); @@ -130,14 +119,9 @@ namespace MonoTests.System.Configuration msg = null; inner = null; ce = new ConfigurationException (msg, inner); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#B1"); Assert.IsNotNull (ce.Data, "#B2"); Assert.AreEqual (0, ce.Data.Count, "#B3"); -#else - Assert.IsNotNull (ce.BareMessage, "#B1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#B2"); -#endif Assert.IsNull (ce.Filename, "#B4"); Assert.AreSame (inner, ce.InnerException, "#B5"); Assert.AreEqual (0, ce.Line, "#B6"); @@ -155,10 +139,8 @@ namespace MonoTests.System.Configuration node = new XmlDocument (); ce = new ConfigurationException (msg, node); Assert.AreSame (msg, ce.BareMessage, "#A1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#A2"); Assert.AreEqual (0, ce.Data.Count, "#A3"); -#endif Assert.AreEqual (string.Empty, ce.Filename, "#A4"); Assert.IsNull (ce.InnerException, "#A5"); Assert.AreEqual (0, ce.Line, "#A6"); @@ -167,14 +149,9 @@ namespace MonoTests.System.Configuration msg = null; node = null; ce = new ConfigurationException (msg, node); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#B1"); Assert.IsNotNull (ce.Data, "#B2"); Assert.AreEqual (0, ce.Data.Count, "#B3"); -#else - Assert.IsNotNull (ce.BareMessage, "#B1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#B2"); -#endif Assert.AreEqual (string.Empty, ce.Filename, "#B4"); Assert.IsNull (ce.InnerException, "#B5"); Assert.AreEqual (0, ce.Line, "#B6"); @@ -194,10 +171,8 @@ namespace MonoTests.System.Configuration node = new XmlDocument (); ce = new ConfigurationException (msg, inner, node); Assert.AreSame (msg, ce.BareMessage, "#A1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#A2"); Assert.AreEqual (0, ce.Data.Count, "#A3"); -#endif Assert.AreEqual (string.Empty, ce.Filename, "#A4"); Assert.AreSame (inner, ce.InnerException, "#A5"); Assert.AreEqual (0, ce.Line, "#A6"); @@ -207,14 +182,9 @@ namespace MonoTests.System.Configuration inner = null; node = null; ce = new ConfigurationException (msg, inner, node); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#B1"); Assert.IsNotNull (ce.Data, "#B2"); Assert.AreEqual (0, ce.Data.Count, "#B3"); -#else - Assert.IsNotNull (ce.BareMessage, "#B1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#B2"); -#endif Assert.AreEqual (string.Empty, ce.Filename, "#B4"); Assert.AreSame (inner, ce.InnerException, "#B5"); Assert.AreEqual (0, ce.Line, "#B6"); @@ -234,10 +204,8 @@ namespace MonoTests.System.Configuration line = 7; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#A1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#A2"); Assert.AreEqual (0, ce.Data.Count, "#A3"); -#endif Assert.AreSame (filename, ce.Filename, "#A4"); Assert.IsNull (ce.InnerException, "#A5"); Assert.AreEqual (line, ce.Line, "#A6"); @@ -247,14 +215,9 @@ namespace MonoTests.System.Configuration filename = null; line = 0; ce = new ConfigurationException (msg, filename, line); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#B1"); Assert.IsNotNull (ce.Data, "#B3"); Assert.AreEqual (0, ce.Data.Count, "#B4"); -#else - Assert.IsNotNull (ce.BareMessage, "#B1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#B2"); -#endif Assert.AreSame (filename, ce.Filename, "#B5"); Assert.IsNull (ce.InnerException, "#B6"); Assert.AreEqual (0, ce.Line, "#B7"); @@ -264,14 +227,9 @@ namespace MonoTests.System.Configuration filename = "abc.txt"; line = 5; ce = new ConfigurationException (msg, filename, line); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#C1"); Assert.IsNotNull (ce.Data, "#C2"); Assert.AreEqual (0, ce.Data.Count, "#C3"); -#else - Assert.IsNotNull (ce.BareMessage, "#C1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#C2"); -#endif Assert.AreSame (filename, ce.Filename, "#C4"); Assert.IsNull (ce.InnerException, "#C5"); Assert.AreEqual (5, ce.Line, "#C6"); @@ -282,10 +240,8 @@ namespace MonoTests.System.Configuration line = 5; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#D1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#D2"); Assert.AreEqual (0, ce.Data.Count, "#D3"); -#endif Assert.AreSame (filename, ce.Filename, "#D4"); Assert.IsNull (ce.InnerException, "#D5"); Assert.AreEqual (5, ce.Line, "#D6"); @@ -296,10 +252,8 @@ namespace MonoTests.System.Configuration line = 0; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#E1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#E2"); Assert.AreEqual (0, ce.Data.Count, "#E3"); -#endif Assert.AreSame (filename, ce.Filename, "#E4"); Assert.IsNull (ce.InnerException, "#E5"); Assert.AreEqual (0, ce.Line, "#E6"); @@ -309,14 +263,9 @@ namespace MonoTests.System.Configuration filename = null; line = 4; ce = new ConfigurationException (msg, filename, line); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#F1"); Assert.IsNotNull (ce.Data, "#F2"); Assert.AreEqual (0, ce.Data.Count, "#F3"); -#else - Assert.IsNotNull (ce.BareMessage, "#F1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#F2"); -#endif Assert.AreSame (filename, ce.Filename, "#F4"); Assert.IsNull (ce.InnerException, "#F5"); Assert.AreEqual (4, ce.Line, "#F6"); @@ -327,10 +276,8 @@ namespace MonoTests.System.Configuration line = 0; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#G1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#G2"); Assert.AreEqual (0, ce.Data.Count, "#G3"); -#endif Assert.AreSame (filename, ce.Filename, "#G4"); Assert.IsNull (ce.InnerException, "#G5"); Assert.AreEqual (0, ce.Line, "#G6"); @@ -341,10 +288,8 @@ namespace MonoTests.System.Configuration line = 6; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#H1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#H2"); Assert.AreEqual (0, ce.Data.Count, "#H3"); -#endif Assert.AreSame (filename, ce.Filename, "#H4"); Assert.IsNull (ce.InnerException, "#H5"); Assert.AreEqual (6, ce.Line, "#H6"); @@ -355,10 +300,8 @@ namespace MonoTests.System.Configuration line = 6; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#I1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#I2"); Assert.AreEqual (0, ce.Data.Count, "#I3"); -#endif Assert.AreSame (filename, ce.Filename, "#I4"); Assert.IsNull (ce.InnerException, "#I5"); Assert.AreEqual (6, ce.Line, "#I6"); @@ -369,10 +312,8 @@ namespace MonoTests.System.Configuration line = 4; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#J1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#J2"); Assert.AreEqual (0, ce.Data.Count, "#J3"); -#endif Assert.AreSame (filename, ce.Filename, "#J4"); Assert.IsNull (ce.InnerException, "#J5"); Assert.AreEqual (4, ce.Line, "#J6"); @@ -383,10 +324,8 @@ namespace MonoTests.System.Configuration line = 0; ce = new ConfigurationException (msg, filename, line); Assert.AreSame (msg, ce.BareMessage, "#K1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#K2"); Assert.AreEqual (0, ce.Data.Count, "#K3"); -#endif Assert.AreSame (filename, ce.Filename, "#K4"); Assert.IsNull (ce.InnerException, "#K5"); Assert.AreEqual (0, ce.Line, "#K6"); @@ -408,10 +347,8 @@ namespace MonoTests.System.Configuration line = 7; ce = new ConfigurationException (msg, inner, filename, line); Assert.AreSame (msg, ce.BareMessage, "#A1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#A2"); Assert.AreEqual (0, ce.Data.Count, "#A3"); -#endif Assert.AreSame (filename, ce.Filename, "#A4"); Assert.AreSame (inner, ce.InnerException, "#A5"); Assert.AreEqual (line, ce.Line, "#A6"); @@ -422,14 +359,9 @@ namespace MonoTests.System.Configuration filename = null; line = 0; ce = new ConfigurationException (msg, inner, filename, line); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#B1"); Assert.IsNotNull (ce.Data, "#B2"); Assert.AreEqual (0, ce.Data.Count, "#B3"); -#else - Assert.IsNotNull (ce.BareMessage, "#B1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#B2"); -#endif Assert.AreSame (filename, ce.Filename, "#B4"); Assert.AreSame (inner, ce.InnerException, "#B5"); Assert.AreEqual (0, ce.Line, "#B6"); @@ -440,14 +372,9 @@ namespace MonoTests.System.Configuration filename = null; line = 7; ce = new ConfigurationException (msg, inner, filename, line); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#C1"); Assert.IsNotNull (ce.Data, "#C2"); Assert.AreEqual (0, ce.Data.Count, "#C3"); -#else - Assert.IsNotNull (ce.BareMessage, "#C1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#C2"); -#endif Assert.AreSame (filename, ce.Filename, "#C4"); Assert.AreSame (inner, ce.InnerException, "#C5"); Assert.AreEqual (line, ce.Line, "#C6"); @@ -459,10 +386,8 @@ namespace MonoTests.System.Configuration line = 7; ce = new ConfigurationException (msg, inner, filename, line); Assert.AreSame (msg, ce.BareMessage, "#D1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#D2"); Assert.AreEqual (0, ce.Data.Count, "#D3"); -#endif Assert.AreSame (filename, ce.Filename, "#D4"); Assert.AreSame (inner, ce.InnerException, "#D5"); Assert.AreEqual (line, ce.Line, "#D6"); @@ -474,10 +399,8 @@ namespace MonoTests.System.Configuration line = 7; ce = new ConfigurationException (msg, inner, filename, line); Assert.AreSame (msg, ce.BareMessage, "#E1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#E2"); Assert.AreEqual (0, ce.Data.Count, "#E3"); -#endif Assert.AreSame (filename, ce.Filename, "#E4"); Assert.AreSame (inner, ce.InnerException, "#E5"); Assert.AreEqual (line, ce.Line, "#E6"); @@ -489,10 +412,8 @@ namespace MonoTests.System.Configuration line = 7; ce = new ConfigurationException (msg, inner, filename, line); Assert.AreSame (msg, ce.BareMessage, "#F1"); -#if NET_2_0 Assert.IsNotNull (ce.Data, "#F2"); Assert.AreEqual (0, ce.Data.Count, "#F3"); -#endif Assert.AreSame (filename, ce.Filename, "#F4"); Assert.AreSame (inner, ce.InnerException, "#F5"); Assert.AreEqual (line, ce.Line, "#F6"); @@ -503,14 +424,9 @@ namespace MonoTests.System.Configuration filename = "abc.txt"; line = 7; ce = new ConfigurationException (msg, inner, filename, line); -#if NET_2_0 Assert.AreEqual (new ConfigurationException ().Message, ce.BareMessage, "#G1"); Assert.IsNotNull (ce.Data, "#G2"); Assert.AreEqual (0, ce.Data.Count, "#G3"); -#else - Assert.IsNotNull (ce.BareMessage, "#G1"); - Assert.IsTrue (ce.BareMessage.IndexOf (typeof (ConfigurationException).FullName) != -1, "#G2"); -#endif Assert.AreSame (filename, ce.Filename, "#G4"); Assert.AreSame (inner, ce.InnerException, "#G5"); Assert.AreEqual (line, ce.Line, "#G6"); diff --git a/mcs/class/System/Test/System.Configuration/LocalFileSettingsProviderTest.cs b/mcs/class/System/Test/System.Configuration/LocalFileSettingsProviderTest.cs index 3e4ce9ac72d..29c10e1e208 100644 --- a/mcs/class/System/Test/System.Configuration/LocalFileSettingsProviderTest.cs +++ b/mcs/class/System/Test/System.Configuration/LocalFileSettingsProviderTest.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.Text; @@ -145,4 +144,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System/Test/System.Configuration/SettingElementTest.cs b/mcs/class/System/Test/System.Configuration/SettingElementTest.cs index 2134214e499..d9ac1db69b5 100644 --- a/mcs/class/System/Test/System.Configuration/SettingElementTest.cs +++ b/mcs/class/System/Test/System.Configuration/SettingElementTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Text; @@ -80,4 +79,3 @@ namespace MonoTests.System.Configuration } } -#endif diff --git a/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs b/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs index cba19b160e4..3e986904593 100644 --- a/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs +++ b/mcs/class/System/Test/System.Configuration/SettingsBaseTest.cs @@ -28,7 +28,6 @@ //#define SPEW -#if NET_2_0 using System; using System.Text; @@ -329,4 +328,3 @@ namespace MonoTests.System.Configuration } } -#endif diff --git a/mcs/class/System/Test/System.Configuration/SettingsPropertyCollectionTest.cs b/mcs/class/System/Test/System.Configuration/SettingsPropertyCollectionTest.cs index 584f5e7b2fc..9dbf21dc060 100644 --- a/mcs/class/System/Test/System.Configuration/SettingsPropertyCollectionTest.cs +++ b/mcs/class/System/Test/System.Configuration/SettingsPropertyCollectionTest.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.Text; @@ -159,4 +158,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System/Test/System.Configuration/SettingsPropertyTest.cs b/mcs/class/System/Test/System.Configuration/SettingsPropertyTest.cs index 57bf2d9115c..85a21a1fa2a 100644 --- a/mcs/class/System/Test/System.Configuration/SettingsPropertyTest.cs +++ b/mcs/class/System/Test/System.Configuration/SettingsPropertyTest.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.Text; @@ -143,4 +142,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System/Test/System.Configuration/SettingsPropertyValueCollectionTest.cs b/mcs/class/System/Test/System.Configuration/SettingsPropertyValueCollectionTest.cs index 14ec070fa82..bd6bd70fcb3 100644 --- a/mcs/class/System/Test/System.Configuration/SettingsPropertyValueCollectionTest.cs +++ b/mcs/class/System/Test/System.Configuration/SettingsPropertyValueCollectionTest.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.Text; @@ -165,4 +164,3 @@ namespace MonoTests.System.Configuration { } -#endif diff --git a/mcs/class/System/Test/System.Configuration/SettingsPropertyValueTest.cs b/mcs/class/System/Test/System.Configuration/SettingsPropertyValueTest.cs index 208921d8d73..e954bf725a9 100644 --- a/mcs/class/System/Test/System.Configuration/SettingsPropertyValueTest.cs +++ b/mcs/class/System/Test/System.Configuration/SettingsPropertyValueTest.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.IO; @@ -438,4 +437,3 @@ namespace MonoTests.System.Configuration { } } -#endif diff --git a/mcs/class/System/Test/System.Diagnostics/DelimitedListTraceListenerTest.cs b/mcs/class/System/Test/System.Diagnostics/DelimitedListTraceListenerTest.cs index b2d558ad057..c058d08e4e0 100644 --- a/mcs/class/System/Test/System.Diagnostics/DelimitedListTraceListenerTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/DelimitedListTraceListenerTest.cs @@ -41,7 +41,6 @@ namespace MonoTests.System.Diagnostics [TestFixture] public class DelimitedListTraceListenerTest { -#if NET_2_0 string sample1 = "sample\n"; string sample2 = ";Error;4;;;;;;;;\n"; @@ -134,8 +133,7 @@ namespace MonoTests.System.Diagnostics x.Close (); Assert.AreEqual (sample7, sw.ToString ().Replace ("\r\n", "\n")); } -#endif } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs b/mcs/class/System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs index 8c9049470d7..1a4f138306c 100644 --- a/mcs/class/System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/DiagnosticsConfigurationHandlerTest.cs @@ -92,22 +92,6 @@ namespace MonoTests.System.Diagnostics "<add />", "<add name=\"a\"/>", "<add value=\"b\"/>", -#if !NET_2_0 - // in the 2.0 profile, we currently allow non-integral - // values - // - // MS actually introduced new configuration classes - // for the 2.0 profile and did not modify the original - // classes - // - // Once we add 2.0 configuration classes for - // system.diagnostics, the origina behavior should - // be restored and this test should be enabled again - // for the 2.0 profile - - // non-integral value - "<add name=\"string-value\" value=\"string-value\"/>", -#endif // too many arguments "<add name=\"a\" value=\"b\" extra=\"c\"/>", // wrong casing @@ -247,10 +231,6 @@ namespace MonoTests.System.Diagnostics "<remove/>", "<add/>", "<remove name=\"foo\" extra=\"arg\"/>", -#if NET_2_0 // type is optional (it could indicate a named listener) -#else - "<add name=\"foo\"/>", -#endif "<add type=\"foo\"/>", "<add name=\"foo\" type=\"invalid-type\"/>", }; diff --git a/mcs/class/System/Test/System.Diagnostics/EventLogPermissionAttributeTest.cs b/mcs/class/System/Test/System.Diagnostics/EventLogPermissionAttributeTest.cs index 6324f32375c..5e00f8bb895 100644 --- a/mcs/class/System/Test/System.Diagnostics/EventLogPermissionAttributeTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/EventLogPermissionAttributeTest.cs @@ -48,11 +48,7 @@ namespace MonoTests.System.Diagnostics { Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId");
Assert.IsFalse (a.Unrestricted, "Unrestricted");
Assert.AreEqual (".", a.MachineName, "MachineName");
-#if NET_2_0
Assert.AreEqual (EventLogPermissionAccess.Write, a.PermissionAccess, "PermissionAccess");
-#else
- Assert.AreEqual (EventLogPermissionAccess.Browse, a.PermissionAccess, "PermissionAccess");
-#endif
EventLogPermission sp = (EventLogPermission)a.CreatePermission ();
Assert.IsFalse (sp.IsUnrestricted (), "IsUnrestricted");
}
@@ -134,9 +130,7 @@ namespace MonoTests.System.Diagnostics { case 13:
case 32:
case 92:
-#if NET_2_0
case 133:
-#endif
case 160:
// known invalid chars
break;
@@ -162,12 +156,10 @@ namespace MonoTests.System.Diagnostics { Assert.AreEqual (EventLogPermissionAccess.Instrument, a.PermissionAccess, "Instrument");
a.PermissionAccess = EventLogPermissionAccess.None;
Assert.AreEqual (EventLogPermissionAccess.None, a.PermissionAccess, "None");
-#if NET_2_0
a.PermissionAccess = EventLogPermissionAccess.Administer;
Assert.AreEqual (EventLogPermissionAccess.Administer, a.PermissionAccess, "Administer");
a.PermissionAccess = EventLogPermissionAccess.Write;
Assert.AreEqual (EventLogPermissionAccess.Write, a.PermissionAccess, "Write");
-#endif
}
[Test]
@@ -196,4 +188,4 @@ namespace MonoTests.System.Diagnostics { }
}
-#endif
\ No newline at end of file +#endif
diff --git a/mcs/class/System/Test/System.Diagnostics/EventLogPermissionTest.cs b/mcs/class/System/Test/System.Diagnostics/EventLogPermissionTest.cs index 37bdb0f5076..11eef5b7425 100644 --- a/mcs/class/System/Test/System.Diagnostics/EventLogPermissionTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/EventLogPermissionTest.cs @@ -45,10 +45,8 @@ namespace MonoTests.System.Diagnostics { EventLogPermissionAccess.Browse, EventLogPermissionAccess.Instrument, EventLogPermissionAccess.Audit, -#if NET_2_0 EventLogPermissionAccess.Write, EventLogPermissionAccess.Administer, -#endif }; [Test] @@ -90,9 +88,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void PermissionState_Bad () { PermissionState ps = (PermissionState)77; @@ -235,11 +231,7 @@ namespace MonoTests.System.Diagnostics { public void IsSubset_Null () { EventLogPermission elp = new EventLogPermission (PermissionState.None); -#if NET_2_0 Assert.IsTrue (elp.IsSubsetOf (null), "null"); -#else - Assert.IsFalse (elp.IsSubsetOf (null), "null"); -#endif } [Test] @@ -359,12 +351,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - // Problem inherited from ResourcePermissionBase - [ExpectedException (typeof (NullReferenceException))] -#endif public void FromXml_Null () { EventLogPermission elp = new EventLogPermission (PermissionState.None); @@ -372,9 +359,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTag () { EventLogPermission elp = new EventLogPermission (PermissionState.None); @@ -386,9 +371,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTagCase () { EventLogPermission elp = new EventLogPermission (PermissionState.None); diff --git a/mcs/class/System/Test/System.Diagnostics/EventLogTest.cs b/mcs/class/System/Test/System.Diagnostics/EventLogTest.cs index 5c3d08bf5c4..706bfcdac0c 100644 --- a/mcs/class/System/Test/System.Diagnostics/EventLogTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/EventLogTest.cs @@ -58,10 +58,8 @@ namespace MonoTests.System.Diagnostics [TestFixture] public class EventLogTest { -#if NET_2_0 private string _originalEventLogImpl; private string _eventLogStore; -#endif private const string EVENTLOG_TYPE_VAR = "MONO_EVENTLOG_TYPE"; @@ -70,7 +68,6 @@ namespace MonoTests.System.Diagnostics private const string WIN32_IMPL = "win32"; private const string NULL_IMPL = "null"; -#if NET_2_0 // Environment.SetEnvironmentVariable is only available in 2.0 profile [SetUp] public void SetUp () { @@ -104,7 +101,6 @@ namespace MonoTests.System.Diagnostics if (Directory.Exists (_eventLogStore)) Directory.Delete (_eventLogStore, true); } -#endif [Test] public void Clear () @@ -167,9 +163,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#D6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#D7"); Assert.AreEqual (0, entry.EventID, "#D8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#D9"); -#endif Assert.IsNotNull (entry.MachineName, "#D10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#D11"); Assert.IsNotNull (entry.ReplacementStrings, "#D12"); @@ -188,9 +182,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#E6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#E7"); Assert.AreEqual (0, entry.EventID, "#E8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#E9"); -#endif Assert.IsNotNull (entry.MachineName, "#E10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#E11"); Assert.IsNotNull (entry.ReplacementStrings, "#E12"); @@ -423,7 +415,6 @@ namespace MonoTests.System.Diagnostics } Assert.IsNotNull (eventLog.Log, "#4"); Assert.AreEqual (string.Empty, eventLog.Log, "#5"); -#if NET_2_0 try { string displayName = eventLog.LogDisplayName; Assert.Fail ("#6a: " + displayName); @@ -434,10 +425,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#6c"); Assert.IsNull (ex.InnerException, "#6d"); } -#else - Assert.IsNotNull (eventLog.LogDisplayName, "#6a"); - Assert.AreEqual (string.Empty, eventLog.LogDisplayName, "#6b"); -#endif Assert.IsNotNull (eventLog.MachineName, "#7"); Assert.AreEqual (".", eventLog.MachineName, "#8"); Assert.IsNotNull (eventLog.Source, "#9"); @@ -543,7 +530,6 @@ namespace MonoTests.System.Diagnostics } Assert.IsNotNull (eventLog.Log, "#A4"); Assert.AreEqual (string.Empty, eventLog.Log, "#A5"); -#if NET_2_0 try { string displayName = eventLog.LogDisplayName; Assert.Fail ("#A6a: " + displayName); @@ -554,10 +540,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#A6c"); Assert.IsNull (ex.InnerException, "#A6d"); } -#else - Assert.IsNotNull (eventLog.LogDisplayName, "#A6a"); - Assert.AreEqual (string.Empty, eventLog.LogDisplayName, "#A6b"); -#endif Assert.IsNotNull (eventLog.MachineName, "#A7"); Assert.AreEqual (".", eventLog.MachineName, "#A8"); Assert.IsNotNull (eventLog.Source, "#A9"); @@ -670,7 +652,6 @@ namespace MonoTests.System.Diagnostics } Assert.IsNotNull (eventLog.Log, "#A4"); Assert.AreEqual (string.Empty, eventLog.Log, "#A5"); -#if NET_2_0 try { string displayName = eventLog.LogDisplayName; Assert.Fail ("#A6a: " + displayName); @@ -681,10 +662,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#A6c"); Assert.IsNull (ex.InnerException, "#A6d"); } -#else - Assert.IsNotNull (eventLog.LogDisplayName, "#A6a"); - Assert.AreEqual (string.Empty, eventLog.LogDisplayName, "#A6b"); -#endif Assert.IsNotNull (eventLog.MachineName, "#A7"); Assert.AreEqual (".", eventLog.MachineName, "#A8"); Assert.IsNotNull (eventLog.Source, "#A9"); @@ -708,15 +685,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 // Invalid value '' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#A5"); -#else - // Invalid value for parameter MachineName - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -727,15 +698,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNotNull (ex.Message, "#B3"); -#if NET_2_0 // Invalid value ' \t\n' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("' \t\n'") != -1, "#B4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#B5"); -#else - // Invalid value \t\n for parameter MachineName - Assert.IsTrue (ex.Message.IndexOf (" \t\n ") != -1, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#B5"); -#endif Assert.IsNull (ex.InnerException, "#B6"); Assert.IsNull (ex.ParamName, "#B7"); } @@ -751,13 +716,8 @@ namespace MonoTests.System.Diagnostics // Invalid value '' for parameter 'machineName' Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#A5"); -#else - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -871,7 +831,6 @@ namespace MonoTests.System.Diagnostics } Assert.IsNotNull (eventLog.Log, "#A4"); Assert.AreEqual (string.Empty, eventLog.Log, "#A5"); -#if NET_2_0 try { string displayName = eventLog.LogDisplayName; Assert.Fail ("#A6a: " + displayName); @@ -882,10 +841,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#A6c"); Assert.IsNull (ex.InnerException, "#A6d"); } -#else - Assert.IsNotNull (eventLog.LogDisplayName, "#A6a"); - Assert.AreEqual (string.Empty, eventLog.LogDisplayName, "#A6b"); -#endif Assert.IsNotNull (eventLog.MachineName, "#A7"); Assert.AreEqual (".", eventLog.MachineName, "#A8"); Assert.IsNotNull (eventLog.Source, "#A9"); @@ -918,15 +873,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 // Invalid value '' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#A5"); -#else - // Invalid value for parameter MachineName - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -937,15 +886,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNotNull (ex.Message, "#B3"); -#if NET_2_0 // Invalid value ' \t\n' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("' \t\n'") != -1, "#B4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#B5"); -#else - // Invalid value \t\n for parameter MachineName - Assert.IsTrue (ex.Message.IndexOf (" \t\n ") != -1, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#B5"); -#endif Assert.IsNull (ex.InnerException, "#B6"); Assert.IsNull (ex.ParamName, "#B7"); } @@ -961,13 +904,8 @@ namespace MonoTests.System.Diagnostics // Invalid value '' for parameter 'machineName' Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#A5"); -#else - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -1862,15 +1800,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 // Invalid value '' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#A5"); -#else - // Invalid value for parameter machineName - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("machineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -1881,15 +1813,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNotNull (ex.Message, "#B3"); -#if NET_2_0 // Invalid value ' \t\n' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("' \t\n'") != -1, "#B4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#B5"); -#else - // Invalid value \t\n for parameter machineName - Assert.IsTrue (ex.Message.IndexOf (" \t\n ") != -1, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("machineName") != -1, "#B5"); -#endif Assert.IsNull (ex.InnerException, "#B6"); Assert.IsNull (ex.ParamName, "#B7"); } @@ -1905,13 +1831,8 @@ namespace MonoTests.System.Diagnostics // Invalid value '' for parameter 'machineName' Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#A5"); -#else - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("machineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -2018,7 +1939,6 @@ namespace MonoTests.System.Diagnostics EventLog.WriteEntry ("monotempsource", "Entries1"); -#if NET_2_0 try { current = enumerator.Current; Assert.Fail ("#G1: " + current); @@ -2030,15 +1950,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#G3"); Assert.IsNull (ex.InnerException, "#G4"); } -#else - entry = (EventLogEntry) enumerator.Current; - Assert.IsNotNull (entry, "#G1"); - Assert.IsNotNull (entry.Source, "#G2"); - Assert.AreEqual ("monotempsource", entry.Source, "#G3"); - Assert.IsNotNull (entry.ReplacementStrings, "#G4"); - Assert.AreEqual (1, entry.ReplacementStrings.Length, "#G5"); - Assert.AreEqual ("Entries1", entry.ReplacementStrings [0], "#G6"); -#endif Assert.IsFalse (enumerator.MoveNext (), "#H1"); Assert.AreEqual (1, eventLog.Entries.Count, "#H2"); @@ -2054,11 +1965,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#I2"); Assert.IsNotNull (ex.Message, "#I3"); Assert.IsNull (ex.InnerException, "#I4"); -#if NET_2_0 Assert.AreEqual ("", ex.ParamName, "#I5"); -#else - Assert.IsNull (ex.ParamName, "#I5"); -#endif } entries = new EventLogEntry [1]; @@ -2094,21 +2001,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual ("Entries3", entry.ReplacementStrings [0], "#M6"); enumerator.Reset (); -#if NET_2_0 Assert.IsNotNull (enumerator.Current, "#N1"); -#else - try { - current = enumerator.Current; - Assert.Fail ("#N1a: " + current); - } catch (InvalidOperationException ex) { - // No current EventLog entry available, cursor is located - // before the first or after the last element of the - // enumeration - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#N1b"); - Assert.IsNotNull (ex.Message, "#N1c"); - Assert.IsNull (ex.InnerException, "#N1d"); - } -#endif Assert.IsTrue (enumerator.MoveNext (), "#N2"); Assert.IsNotNull (enumerator.Current, "#N3"); Assert.IsTrue (enumerator.MoveNext (), "#N4"); @@ -2133,21 +2026,7 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (enumerator.MoveNext (), "#P1"); Assert.IsNotNull (enumerator.Current, "#P2"); eventLog.Clear (); -#if NET_2_0 Assert.IsNotNull (enumerator.Current, "#P3"); -#else - try { - current = enumerator.Current; - Assert.Fail ("#P3a: " + current); - } catch (InvalidOperationException ex) { - // No current EventLog entry available, cursor is located - // before the first or after the last element of the - // enumeration - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#P3b"); - Assert.IsNotNull (ex.Message, "#P3c"); - Assert.IsNull (ex.InnerException, "#P3d"); - } -#endif Assert.IsFalse (enumerator.MoveNext (), "#P4"); Assert.AreEqual (0, eventLog.Entries.Count, "#P5"); @@ -2487,7 +2366,6 @@ namespace MonoTests.System.Diagnostics EventLog.WriteEntry ("monotempsource", "Entries_Source_DoesNotExist2"); -#if NET_2_0 try { object current = enumerator.Current; Assert.Fail ("#G1: " + current); @@ -2499,15 +2377,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#G3"); Assert.IsNull (ex.InnerException, "#G4"); } -#else - entry = (EventLogEntry) enumerator.Current; - Assert.IsNotNull (entry, "#G1"); - Assert.IsNotNull (entry.Source, "#G2"); - Assert.AreEqual ("monotempsource", entry.Source, "#G3"); - Assert.IsNotNull (entry.ReplacementStrings, "#G4"); - Assert.AreEqual (1, entry.ReplacementStrings.Length, "#G5"); - Assert.AreEqual ("Entries_Source_DoesNotExist2", entry.ReplacementStrings [0], "#G6"); -#endif Assert.IsFalse (enumerator.MoveNext (), "#H1"); Assert.AreEqual (2, eventLog.Entries.Count, "#H2"); @@ -2522,11 +2391,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#I2"); Assert.IsNotNull (ex.Message, "#I3"); Assert.IsNull (ex.InnerException, "#I4"); -#if NET_2_0 Assert.AreEqual (string.Empty, ex.ParamName, "#I5"); -#else - Assert.IsNull (ex.ParamName, "#I5"); -#endif } entries = new EventLogEntry [2]; @@ -2559,21 +2424,7 @@ namespace MonoTests.System.Diagnostics enumerator.Reset (); Assert.IsTrue (enumerator.MoveNext (), "#M2"); eventLog.Clear (); -#if NET_2_0 Assert.IsNotNull (enumerator.Current, "#M3"); -#else - try { - object current = enumerator.Current; - Assert.Fail ("#M3a: " + current); - } catch (InvalidOperationException ex) { - // No current EventLog entry available, cursor is located - // before the first or after the last element of the - // enumeration - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#M3b"); - Assert.IsNotNull (ex.Message, "#M3c"); - Assert.IsNull (ex.InnerException, "#M3d"); - } -#endif Assert.IsFalse (enumerator.MoveNext (), "#M4"); try { @@ -2663,7 +2514,6 @@ namespace MonoTests.System.Diagnostics EventLog.WriteEntry ("monotempsource", "Entries_Source_Empty2"); -#if NET_2_0 try { object current = enumerator.Current; Assert.Fail ("#G1: " + current); @@ -2675,15 +2525,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#G3"); Assert.IsNull (ex.InnerException, "#G4"); } -#else - entry = (EventLogEntry) enumerator.Current; - Assert.IsNotNull (entry, "#G1"); - Assert.IsNotNull (entry.Source, "#G2"); - Assert.AreEqual ("monotempsource", entry.Source, "#G3"); - Assert.IsNotNull (entry.ReplacementStrings, "#G4"); - Assert.AreEqual (1, entry.ReplacementStrings.Length, "#G5"); - Assert.AreEqual ("Entries_Source_Empty2", entry.ReplacementStrings [0], "#G6"); -#endif Assert.IsFalse (enumerator.MoveNext (), "#H1"); Assert.AreEqual (2, eventLog.Entries.Count, "#H2"); @@ -2698,11 +2539,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#I2"); Assert.IsNotNull (ex.Message, "#I3"); Assert.IsNull (ex.InnerException, "#I4"); -#if NET_2_0 Assert.AreEqual ("", ex.ParamName, "#I5"); -#else - Assert.IsNull (ex.ParamName, "#I5"); -#endif } entries = new EventLogEntry [2]; @@ -2735,21 +2572,7 @@ namespace MonoTests.System.Diagnostics enumerator.Reset (); Assert.IsTrue (enumerator.MoveNext (), "#M2"); eventLog.Clear (); -#if NET_2_0 Assert.IsNotNull (enumerator.Current, "#M3"); -#else - try { - object current = enumerator.Current; - Assert.Fail ("#M3a: " + current); - } catch (InvalidOperationException ex) { - // No current EventLog entry available, cursor is located - // before the first or after the last element of the - // enumeration - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#M3b"); - Assert.IsNotNull (ex.Message, "#M3c"); - Assert.IsNull (ex.InnerException, "#M3d"); - } -#endif Assert.IsFalse (enumerator.MoveNext (), "#M4"); try { @@ -2851,7 +2674,6 @@ namespace MonoTests.System.Diagnostics EventLog.WriteEntry ("monotempsource", "Entries_Source_Null2"); -#if NET_2_0 try { object current = enumerator.Current; Assert.Fail ("#G1: " + current); @@ -2863,15 +2685,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNotNull (ex.Message, "#G3"); Assert.IsNull (ex.InnerException, "#G4"); } -#else - entry = (EventLogEntry) enumerator.Current; - Assert.IsNotNull (entry, "#G1"); - Assert.IsNotNull (entry.Source, "#G2"); - Assert.AreEqual ("monotempsource", entry.Source, "#G3"); - Assert.IsNotNull (entry.ReplacementStrings, "#G4"); - Assert.AreEqual (1, entry.ReplacementStrings.Length, "#G5"); - Assert.AreEqual ("Entries_Source_Null2", entry.ReplacementStrings [0], "#G6"); -#endif Assert.IsFalse (enumerator.MoveNext (), "#H1"); Assert.AreEqual (2, eventLog.Entries.Count, "#H2"); @@ -2886,11 +2699,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#I2"); Assert.IsNotNull (ex.Message, "#I3"); Assert.IsNull (ex.InnerException, "#I4"); -#if NET_2_0 Assert.AreEqual ("", ex.ParamName, "#I5"); -#else - Assert.IsNull (ex.ParamName, "#I5"); -#endif } entries = new EventLogEntry [2]; @@ -2923,21 +2732,7 @@ namespace MonoTests.System.Diagnostics enumerator.Reset (); Assert.IsTrue (enumerator.MoveNext (), "#M2"); eventLog.Clear (); -#if NET_2_0 Assert.IsNotNull (enumerator.Current, "#M3"); -#else - try { - object current = enumerator.Current; - Assert.Fail ("#M3a: " + current); - } catch (InvalidOperationException ex) { - // No current EventLog entry available, cursor is located - // before the first or after the last element of the - // enumeration - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#M3b"); - Assert.IsNotNull (ex.Message, "#M3c"); - Assert.IsNull (ex.InnerException, "#M3d"); - } -#endif Assert.IsFalse (enumerator.MoveNext (), "#M4"); try { @@ -3272,15 +3067,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 // Invalid value '' for parameter 'MachineName' Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'MachineName'") != -1, "#A5"); -#else - // Invalid value for parameter MachineName - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -3291,15 +3080,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNotNull (ex.Message, "#B3"); -#if NET_2_0 // Invalid value ' \t\n' for parameter 'MachineName' Assert.IsTrue (ex.Message.IndexOf ("' \t\n'") != -1, "#B4"); Assert.IsTrue (ex.Message.IndexOf ("'MachineName'") != -1, "#B5"); -#else - // Invalid value \t\n for parameter MachineName - Assert.IsTrue (ex.Message.IndexOf (" \t\n ") != -1, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#B5"); -#endif Assert.IsNull (ex.InnerException, "#B6"); Assert.IsNull (ex.ParamName, "#B7"); } @@ -3315,13 +3098,8 @@ namespace MonoTests.System.Diagnostics // Invalid value '' for parameter 'MachineName' Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'MachineName'") != -1, "#A5"); -#else - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("MachineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -3624,15 +3402,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); -#if NET_2_0 // Invalid value '' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#A4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#A5"); -#else - // Invalid value '' for parameter machineName - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#A4"); - Assert.IsTrue (ex.Message.IndexOf ("machineName") != -1, "#A5"); -#endif Assert.IsNull (ex.InnerException, "#A6"); Assert.IsNull (ex.ParamName, "#A7"); } @@ -3643,15 +3415,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNotNull (ex.Message, "#B3"); -#if NET_2_0 // Invalid value ' \t\n' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("' \t\n'") != -1, "#B4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#B5"); -#else - // Invalid value \t\n for parameter machineName - Assert.IsTrue (ex.Message.IndexOf (" \t\n ") != -1, "#B4"); - Assert.IsTrue (ex.Message.IndexOf ("machineName") != -1, "#B5"); -#endif Assert.IsNull (ex.InnerException, "#B6"); Assert.IsNull (ex.ParamName, "#B7"); } @@ -3666,15 +3432,9 @@ namespace MonoTests.System.Diagnostics } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNotNull (ex.Message, "#3"); -#if NET_2_0 // Invalid value '' for parameter 'machineName' Assert.IsTrue (ex.Message.IndexOf ("''") != -1, "#4"); Assert.IsTrue (ex.Message.IndexOf ("'machineName'") != -1, "#5"); -#else - // Invalid value for parameter machineName - Assert.IsTrue (ex.Message.IndexOf (" ") != -1, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("machineName") != -1, "#5"); -#endif Assert.IsNull (ex.InnerException, "#6"); Assert.IsNull (ex.ParamName, "#7"); } @@ -3726,9 +3486,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -3749,9 +3507,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -3876,9 +3632,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -3927,9 +3681,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -3981,9 +3733,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4041,9 +3791,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4064,9 +3812,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -4204,9 +3950,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4255,9 +3999,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4309,9 +4051,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Warning, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4377,9 +4117,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4401,9 +4139,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -4446,9 +4182,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#A7"); Assert.AreEqual (0, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -4491,9 +4225,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#A7"); Assert.AreEqual (0, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -4542,9 +4274,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4612,9 +4342,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (56, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4635,9 +4363,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -4658,9 +4384,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#D6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#D7"); Assert.AreEqual (ushort.MaxValue, entry.EventID, "#D8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#D9"); -#endif Assert.IsNotNull (entry.MachineName, "#D10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#D11"); Assert.IsNotNull (entry.ReplacementStrings, "#D12"); @@ -4702,15 +4426,9 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#A6"); Assert.IsNull (ex.InnerException, "#A7"); -#if NET_2_0 Assert.IsFalse (EventLog.Exists ("monologtemp"), "#A8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#A9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#else - Assert.IsTrue (EventLog.Exists ("monologtemp"), "#A8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#A9"); - Assert.AreEqual ("monologtemp", EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#endif } finally { if (EventLog.Exists ("monologtemp")) EventLog.Delete ("monologtemp"); @@ -4727,15 +4445,9 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#B6"); Assert.IsNull (ex.InnerException, "#B7"); -#if NET_2_0 Assert.IsFalse (EventLog.Exists ("monologtemp"), "#B8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#B9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#else - Assert.IsTrue (EventLog.Exists ("monologtemp"), "#B8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#B9"); - Assert.AreEqual ("monologtemp", EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#endif } finally { if (EventLog.Exists ("monologtemp")) EventLog.Delete ("monologtemp"); @@ -4886,9 +4598,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#B7"); Assert.AreEqual (888, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4937,9 +4647,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (343, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -4996,9 +4704,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Warning, entry.EntryType, "#B7"); Assert.AreEqual (2, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5065,9 +4771,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5089,9 +4793,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -5134,9 +4836,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#A7"); Assert.AreEqual (0, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -5179,9 +4879,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#A7"); Assert.AreEqual (0, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -5230,9 +4928,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (0, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5308,9 +5004,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (56, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5332,9 +5026,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -5356,9 +5048,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#D6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#D7"); Assert.AreEqual (ushort.MaxValue, entry.EventID, "#D8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#D9"); -#endif Assert.IsNotNull (entry.MachineName, "#D10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#D11"); Assert.IsNotNull (entry.ReplacementStrings, "#D12"); @@ -5400,15 +5090,9 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#A6"); Assert.IsNull (ex.InnerException, "#A7"); -#if NET_2_0 Assert.IsFalse (EventLog.Exists ("monologtemp"), "#A8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#A9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#else - Assert.IsTrue (EventLog.Exists ("monologtemp"), "#A8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#A9"); - Assert.AreEqual ("monologtemp", EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#endif } finally { if (EventLog.Exists ("monologtemp")) EventLog.Delete ("monologtemp"); @@ -5425,15 +5109,9 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#B6"); Assert.IsNull (ex.InnerException, "#B7"); -#if NET_2_0 Assert.IsFalse (EventLog.Exists ("monologtemp"), "#B8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#B9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#else - Assert.IsTrue (EventLog.Exists ("monologtemp"), "#B8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#B9"); - Assert.AreEqual ("monologtemp", EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#endif } finally { if (EventLog.Exists ("monologtemp")) EventLog.Delete ("monologtemp"); @@ -5584,9 +5262,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#B7"); Assert.AreEqual (888, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5635,9 +5311,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (343, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5689,9 +5363,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Warning, entry.EntryType, "#B7"); Assert.AreEqual (2, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5758,9 +5430,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (54, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -5782,9 +5452,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -5807,9 +5475,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#D6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#D7"); Assert.AreEqual (ushort.MaxValue, entry.EventID, "#D8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#D9"); -#endif Assert.IsNotNull (entry.MachineName, "#D10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#D11"); Assert.IsNotNull (entry.ReplacementStrings, "#D12"); @@ -5848,16 +5514,10 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#A6"); Assert.IsNull (ex.InnerException, "#A7"); -#if NET_2_0 if (!applicationLogExists) Assert.IsFalse (EventLog.Exists ("Application"), "#A8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#A9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#else - Assert.IsTrue (EventLog.Exists ("Application"), "#A8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#A9"); - Assert.AreEqual ("Application", EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#endif } finally { if (!applicationLogExists) { if (EventLog.Exists ("Application", ".")) @@ -5880,16 +5540,10 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#B6"); Assert.IsNull (ex.InnerException, "#B7"); -#if NET_2_0 if (!applicationLogExists) Assert.IsFalse (EventLog.Exists ("Application"), "#B8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#B9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#else - Assert.IsTrue (EventLog.Exists ("Application"), "#B8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#B9"); - Assert.AreEqual ("Application", EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#endif } finally { if (!applicationLogExists) { if (EventLog.Exists ("Application", ".")) @@ -5929,9 +5583,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#A7"); Assert.AreEqual (56, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -5975,9 +5627,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#A7"); Assert.AreEqual (76, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -6027,9 +5677,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (89, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6107,9 +5755,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (data, entry.Data, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (56, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6131,9 +5777,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -6155,9 +5799,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#D6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#D7"); Assert.AreEqual (ushort.MaxValue, entry.EventID, "#D8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#D9"); -#endif Assert.IsNotNull (entry.MachineName, "#D10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#D11"); Assert.IsNotNull (entry.ReplacementStrings, "#D12"); @@ -6200,15 +5842,9 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#A6"); Assert.IsNull (ex.InnerException, "#A7"); -#if NET_2_0 Assert.IsFalse (EventLog.Exists ("monologtemp"), "#A8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#A9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#else - Assert.IsTrue (EventLog.Exists ("monologtemp"), "#A8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#A9"); - Assert.AreEqual ("monologtemp", EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#endif } finally { if (EventLog.Exists ("monologtemp")) EventLog.Delete ("monologtemp"); @@ -6226,15 +5862,9 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#B6"); Assert.IsNull (ex.InnerException, "#B7"); -#if NET_2_0 Assert.IsFalse (EventLog.Exists ("monologtemp"), "#B8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#B9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#else - Assert.IsTrue (EventLog.Exists ("monologtemp"), "#B8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#B9"); - Assert.AreEqual ("monologtemp", EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#endif } finally { if (EventLog.Exists ("monologtemp")) EventLog.Delete ("monologtemp"); @@ -6385,9 +6015,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#B7"); Assert.AreEqual (888, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6436,9 +6064,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (343, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6490,9 +6116,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Warning, entry.EntryType, "#B7"); Assert.AreEqual (2, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6559,9 +6183,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (54, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6584,9 +6206,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -6609,9 +6229,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#D6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#D7"); Assert.AreEqual (ushort.MaxValue, entry.EventID, "#D8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#D9"); -#endif Assert.IsNotNull (entry.MachineName, "#D10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#D11"); Assert.IsNotNull (entry.ReplacementStrings, "#D12"); @@ -6650,16 +6268,10 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#A6"); Assert.IsNull (ex.InnerException, "#A7"); -#if NET_2_0 if (!applicationLogExists) Assert.IsFalse (EventLog.Exists ("Application"), "#A8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#A9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#else - Assert.IsTrue (EventLog.Exists ("Application"), "#A8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#A9"); - Assert.AreEqual ("Application", EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#endif } finally { if (!applicationLogExists) { if (EventLog.Exists ("Application", ".")) @@ -6682,16 +6294,10 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#B6"); Assert.IsNull (ex.InnerException, "#B7"); -#if NET_2_0 if (!applicationLogExists) Assert.IsFalse (EventLog.Exists ("Application"), "#B8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#B9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#else - Assert.IsTrue (EventLog.Exists ("Application"), "#B8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#B9"); - Assert.AreEqual ("Application", EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#endif } finally { if (!applicationLogExists) { if (EventLog.Exists ("Application", ".")) @@ -6731,9 +6337,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#A7"); Assert.AreEqual (56, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -6777,9 +6381,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#A7"); Assert.AreEqual (76, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -6829,9 +6431,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (89, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6911,9 +6511,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (data, entry.Data, "#B6"); Assert.AreEqual (EventLogEntryType.Information, entry.EntryType, "#B7"); Assert.AreEqual (54, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -6936,9 +6534,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#C6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#C7"); Assert.AreEqual (0, entry.EventID, "#C8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#C9"); -#endif Assert.IsNotNull (entry.MachineName, "#C10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#C11"); Assert.IsNotNull (entry.ReplacementStrings, "#C12"); @@ -6961,9 +6557,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#D6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#D7"); Assert.AreEqual (ushort.MaxValue, entry.EventID, "#D8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#D9"); -#endif Assert.IsNotNull (entry.MachineName, "#D10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#D11"); Assert.IsNotNull (entry.ReplacementStrings, "#D12"); @@ -7002,16 +6596,10 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#A6"); Assert.IsNull (ex.InnerException, "#A7"); -#if NET_2_0 if (!applicationLogExists) Assert.IsFalse (EventLog.Exists ("Application"), "#A8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#A9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#else - Assert.IsTrue (EventLog.Exists ("Application"), "#A8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#A9"); - Assert.AreEqual ("Application", EventLog.LogNameFromSourceName ("monotempsource", "."), "#A10"); -#endif } finally { if (!applicationLogExists) { if (EventLog.Exists ("Application", ".")) @@ -7034,16 +6622,10 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (ex.Message.IndexOf ("'0'") != -1, "#B5"); Assert.IsTrue (ex.Message.IndexOf ("'65535'") != -1, "#B6"); Assert.IsNull (ex.InnerException, "#B7"); -#if NET_2_0 if (!applicationLogExists) Assert.IsFalse (EventLog.Exists ("Application"), "#B8"); Assert.IsFalse (EventLog.SourceExists ("monotempsource"), "#B9"); Assert.AreEqual (string.Empty, EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#else - Assert.IsTrue (EventLog.Exists ("Application"), "#B8"); - Assert.IsTrue (EventLog.SourceExists ("monotempsource"), "#B9"); - Assert.AreEqual ("Application", EventLog.LogNameFromSourceName ("monotempsource", "."), "#B10"); -#endif } finally { if (!applicationLogExists) { if (EventLog.Exists ("Application", ".")) @@ -7083,9 +6665,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.Error, entry.EntryType, "#A7"); Assert.AreEqual (56, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -7129,9 +6709,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#A6"); Assert.AreEqual (EventLogEntryType.FailureAudit, entry.EntryType, "#A7"); Assert.AreEqual (76, entry.EventID, "#A8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#A9"); -#endif Assert.IsNotNull (entry.MachineName, "#A10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#A11"); Assert.IsNotNull (entry.ReplacementStrings, "#A12"); @@ -7181,9 +6759,7 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (0, entry.Data.Length, "#B6"); Assert.AreEqual (EventLogEntryType.SuccessAudit, entry.EntryType, "#B7"); Assert.AreEqual (89, entry.EventID, "#B8"); -#if NET_2_0 Assert.AreEqual (entry.EventID, entry.InstanceId, "#B9"); -#endif Assert.IsNotNull (entry.MachineName, "#B10"); Assert.AreEqual (Environment.MachineName, entry.MachineName, "#B11"); Assert.IsNotNull (entry.ReplacementStrings, "#B12"); @@ -7228,7 +6804,6 @@ namespace MonoTests.System.Diagnostics 4, 3, new byte [0]); } -#if NET_2_0 [Test] public void WriteEvent1 () { @@ -8121,7 +7696,6 @@ namespace MonoTests.System.Diagnostics EventLog.Delete ("monologtemp"); } } -#endif private static RegistryKey EventLogKey { get { diff --git a/mcs/class/System/Test/System.Diagnostics/FileVersionInfoTest.cs b/mcs/class/System/Test/System.Diagnostics/FileVersionInfoTest.cs index ac3d3bc555e..668e863b5cc 100644 --- a/mcs/class/System/Test/System.Diagnostics/FileVersionInfoTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/FileVersionInfoTest.cs @@ -79,64 +79,33 @@ namespace MonoTests.System.Diagnostics } FileVersionInfo fvi = FileVersionInfo.GetVersionInfo (file); -#if NET_2_0 Assert.IsNull (fvi.Comments, "#1"); Assert.IsNull (fvi.CompanyName, "#2"); -#else - Assert.AreEqual (string.Empty, fvi.Comments, "#1"); - Assert.AreEqual (string.Empty, fvi.CompanyName, "#2"); -#endif Assert.AreEqual (0, fvi.FileBuildPart, "#3"); -#if NET_2_0 Assert.IsNull (fvi.FileDescription, "#4"); -#else - Assert.AreEqual (string.Empty, fvi.FileDescription, "#4"); -#endif Assert.AreEqual (0, fvi.FileMajorPart, "#5"); Assert.AreEqual (0, fvi.FileMinorPart, "#6"); Assert.AreEqual (file, fvi.FileName, "#7"); Assert.AreEqual (0, fvi.FilePrivatePart, "#8"); -#if NET_2_0 Assert.IsNull (fvi.FileVersion, "#9"); Assert.IsNull (fvi.InternalName, "#10"); -#else - Assert.AreEqual (string.Empty, fvi.FileVersion, "#9"); - Assert.AreEqual (string.Empty, fvi.InternalName, "#10"); -#endif Assert.IsFalse (fvi.IsDebug, "#11"); Assert.IsFalse (fvi.IsPatched, "#12"); Assert.IsFalse (fvi.IsPreRelease, "#13"); Assert.IsFalse (fvi.IsPrivateBuild, "#14"); Assert.IsFalse (fvi.IsSpecialBuild, "#15"); -#if NET_2_0 Assert.IsNull (fvi.Language, "#16"); Assert.IsNull (fvi.LegalCopyright, "#17"); Assert.IsNull (fvi.LegalTrademarks, "#18"); Assert.IsNull (fvi.OriginalFilename, "#19"); Assert.IsNull (fvi.PrivateBuild, "#20"); -#else - Assert.AreEqual (string.Empty, fvi.Language, "#16"); - Assert.AreEqual (string.Empty, fvi.LegalCopyright, "#17"); - Assert.AreEqual (string.Empty, fvi.LegalTrademarks, "#18"); - Assert.AreEqual (string.Empty, fvi.OriginalFilename, "#19"); - Assert.AreEqual (string.Empty, fvi.PrivateBuild, "#20"); -#endif Assert.AreEqual (0, fvi.ProductBuildPart, "#21"); Assert.AreEqual (0, fvi.ProductMajorPart, "#22"); Assert.AreEqual (0, fvi.ProductMinorPart, "#23"); -#if NET_2_0 Assert.IsNull (fvi.ProductName, "#24"); -#else - Assert.AreEqual (string.Empty, fvi.ProductName, "#24"); -#endif Assert.AreEqual (0, fvi.ProductPrivatePart, "#25"); -#if NET_2_0 Assert.IsNull (fvi.ProductVersion, "#26"); Assert.IsNull (fvi.SpecialBuild, "#27"); -#else - Assert.AreEqual (string.Empty, fvi.ProductVersion, "#26"); - Assert.AreEqual (string.Empty, fvi.SpecialBuild, "#27"); -#endif } #if !MONOTOUCH @@ -213,64 +182,33 @@ namespace MonoTests.System.Diagnostics string assemblyFile = Path.Combine (tempDir, "lib.dll"); FileVersionInfo fvi = FileVersionInfo.GetVersionInfo (assemblyFile); -#if NET_2_0 Assert.IsNull (fvi.Comments, "#1"); Assert.IsNull (fvi.CompanyName, "#2"); -#else - Assert.AreEqual (string.Empty, fvi.Comments, "#1"); - Assert.AreEqual (string.Empty, fvi.CompanyName, "#2"); -#endif Assert.AreEqual (0, fvi.FileBuildPart, "#3"); -#if NET_2_0 Assert.IsNull (fvi.FileDescription, "#4"); -#else - Assert.AreEqual (string.Empty, fvi.FileDescription, "#4"); -#endif Assert.AreEqual (0, fvi.FileMajorPart, "#5"); Assert.AreEqual (0, fvi.FileMinorPart, "#6"); Assert.AreEqual (assemblyFile, fvi.FileName, "#7"); Assert.AreEqual (0, fvi.FilePrivatePart, "#8"); -#if NET_2_0 Assert.IsNull (fvi.FileVersion, "#9"); Assert.IsNull (fvi.InternalName, "#10"); -#else - Assert.AreEqual (string.Empty, fvi.FileVersion, "#9"); - Assert.AreEqual (string.Empty, fvi.InternalName, "#10"); -#endif Assert.IsFalse (fvi.IsDebug, "#11"); Assert.IsFalse (fvi.IsPatched, "#12"); Assert.IsFalse (fvi.IsPreRelease, "#13"); Assert.IsFalse (fvi.IsPrivateBuild, "#14"); Assert.IsFalse (fvi.IsSpecialBuild, "#15"); -#if NET_2_0 Assert.IsNull (fvi.Language, "#16"); Assert.IsNull (fvi.LegalCopyright, "#17"); Assert.IsNull (fvi.LegalTrademarks, "#18"); Assert.IsNull (fvi.OriginalFilename, "#19"); Assert.IsNull (fvi.PrivateBuild, "#20"); -#else - Assert.AreEqual (string.Empty, fvi.Language, "#16"); - Assert.AreEqual (string.Empty, fvi.LegalCopyright, "#17"); - Assert.AreEqual (string.Empty, fvi.LegalTrademarks, "#18"); - Assert.AreEqual (string.Empty, fvi.OriginalFilename, "#19"); - Assert.AreEqual (string.Empty, fvi.PrivateBuild, "#20"); -#endif Assert.AreEqual (0, fvi.ProductBuildPart, "#21"); Assert.AreEqual (0, fvi.ProductMajorPart, "#22"); Assert.AreEqual (0, fvi.ProductMinorPart, "#23"); -#if NET_2_0 Assert.IsNull (fvi.ProductName, "#24"); -#else - Assert.AreEqual (string.Empty, fvi.ProductName, "#24"); -#endif Assert.AreEqual (0, fvi.ProductPrivatePart, "#25"); -#if NET_2_0 Assert.IsNull (fvi.ProductVersion, "#26"); Assert.IsNull (fvi.SpecialBuild, "#27"); -#else - Assert.AreEqual (string.Empty, fvi.ProductVersion, "#26"); - Assert.AreEqual (string.Empty, fvi.SpecialBuild, "#27"); -#endif } [Test] // DefineUnmanagedResource (String) @@ -777,64 +715,33 @@ namespace MonoTests.System.Diagnostics string assemblyFile = Path.Combine (tempDir, "lib3g.dll"); FileVersionInfo fvi = FileVersionInfo.GetVersionInfo (assemblyFile); -#if NET_2_0 Assert.IsNull (fvi.Comments, "#1"); Assert.IsNull (fvi.CompanyName, "#2"); -#else - Assert.AreEqual (string.Empty, fvi.Comments, "#1"); - Assert.AreEqual (string.Empty, fvi.CompanyName, "#2"); -#endif Assert.AreEqual (0, fvi.FileBuildPart, "#3"); -#if NET_2_0 Assert.IsNull (fvi.FileDescription, "#4"); -#else - Assert.AreEqual (string.Empty, fvi.FileDescription, "#4"); -#endif Assert.AreEqual (0, fvi.FileMajorPart, "#5"); Assert.AreEqual (0, fvi.FileMinorPart, "#6"); Assert.AreEqual (assemblyFile, fvi.FileName, "#7"); Assert.AreEqual (0, fvi.FilePrivatePart, "#8"); -#if NET_2_0 Assert.IsNull (fvi.FileVersion, "#9"); Assert.IsNull (fvi.InternalName, "#10"); -#else - Assert.AreEqual (string.Empty, fvi.FileVersion, "#9"); - Assert.AreEqual (string.Empty, fvi.InternalName, "#10"); -#endif Assert.IsFalse (fvi.IsDebug, "#11"); Assert.IsFalse (fvi.IsPatched, "#12"); Assert.IsFalse (fvi.IsPreRelease, "#13"); Assert.IsFalse (fvi.IsPrivateBuild, "#14"); Assert.IsFalse (fvi.IsSpecialBuild, "#15"); -#if NET_2_0 Assert.IsNull (fvi.Language, "#16"); Assert.IsNull (fvi.LegalCopyright, "#17"); Assert.IsNull (fvi.LegalTrademarks, "#18"); Assert.IsNull (fvi.OriginalFilename, "#19"); Assert.IsNull (fvi.PrivateBuild, "#20"); -#else - Assert.AreEqual (string.Empty, fvi.Language, "#16"); - Assert.AreEqual (string.Empty, fvi.LegalCopyright, "#17"); - Assert.AreEqual (string.Empty, fvi.LegalTrademarks, "#18"); - Assert.AreEqual (string.Empty, fvi.OriginalFilename, "#19"); - Assert.AreEqual (string.Empty, fvi.PrivateBuild, "#20"); -#endif Assert.AreEqual (0, fvi.ProductBuildPart, "#21"); Assert.AreEqual (0, fvi.ProductMajorPart, "#22"); Assert.AreEqual (0, fvi.ProductMinorPart, "#23"); -#if NET_2_0 Assert.IsNull (fvi.ProductName, "#24"); -#else - Assert.AreEqual (string.Empty, fvi.ProductName, "#24"); -#endif Assert.AreEqual (0, fvi.ProductPrivatePart, "#25"); -#if NET_2_0 Assert.IsNull (fvi.ProductVersion, "#26"); Assert.IsNull (fvi.SpecialBuild, "#27"); -#else - Assert.AreEqual (string.Empty, fvi.ProductVersion, "#26"); - Assert.AreEqual (string.Empty, fvi.SpecialBuild, "#27"); -#endif } [Test] // DefineUnmanagedResource (String) @@ -916,64 +823,33 @@ namespace MonoTests.System.Diagnostics string assemblyFile = Path.Combine (tempDir, "lib3h.dll"); FileVersionInfo fvi = FileVersionInfo.GetVersionInfo (assemblyFile); -#if NET_2_0 Assert.IsNull (fvi.Comments, "#1"); Assert.IsNull (fvi.CompanyName, "#2"); -#else - Assert.AreEqual (string.Empty, fvi.Comments, "#1"); - Assert.AreEqual (string.Empty, fvi.CompanyName, "#2"); -#endif Assert.AreEqual (0, fvi.FileBuildPart, "#3"); -#if NET_2_0 Assert.IsNull (fvi.FileDescription, "#4"); -#else - Assert.AreEqual (string.Empty, fvi.FileDescription, "#4"); -#endif Assert.AreEqual (0, fvi.FileMajorPart, "#5"); Assert.AreEqual (0, fvi.FileMinorPart, "#6"); Assert.AreEqual (assemblyFile, fvi.FileName, "#7"); Assert.AreEqual (0, fvi.FilePrivatePart, "#8"); -#if NET_2_0 Assert.IsNull (fvi.FileVersion, "#9"); Assert.IsNull (fvi.InternalName, "#10"); -#else - Assert.AreEqual (string.Empty, fvi.FileVersion, "#9"); - Assert.AreEqual (string.Empty, fvi.InternalName, "#10"); -#endif Assert.IsFalse (fvi.IsDebug, "#11"); Assert.IsFalse (fvi.IsPatched, "#12"); Assert.IsFalse (fvi.IsPreRelease, "#13"); Assert.IsFalse (fvi.IsPrivateBuild, "#14"); Assert.IsFalse (fvi.IsSpecialBuild, "#15"); -#if NET_2_0 Assert.IsNull (fvi.Language, "#16"); Assert.IsNull (fvi.LegalCopyright, "#17"); Assert.IsNull (fvi.LegalTrademarks, "#18"); Assert.IsNull (fvi.OriginalFilename, "#19"); Assert.IsNull (fvi.PrivateBuild, "#20"); -#else - Assert.AreEqual (string.Empty, fvi.Language, "#16"); - Assert.AreEqual (string.Empty, fvi.LegalCopyright, "#17"); - Assert.AreEqual (string.Empty, fvi.LegalTrademarks, "#18"); - Assert.AreEqual (string.Empty, fvi.OriginalFilename, "#19"); - Assert.AreEqual (string.Empty, fvi.PrivateBuild, "#20"); -#endif Assert.AreEqual (0, fvi.ProductBuildPart, "#21"); Assert.AreEqual (0, fvi.ProductMajorPart, "#22"); Assert.AreEqual (0, fvi.ProductMinorPart, "#23"); -#if NET_2_0 Assert.IsNull (fvi.ProductName, "#24"); -#else - Assert.AreEqual (string.Empty, fvi.ProductName, "#24"); -#endif Assert.AreEqual (0, fvi.ProductPrivatePart, "#25"); -#if NET_2_0 Assert.IsNull (fvi.ProductVersion, "#26"); Assert.IsNull (fvi.SpecialBuild, "#27"); -#else - Assert.AreEqual (string.Empty, fvi.ProductVersion, "#26"); - Assert.AreEqual (string.Empty, fvi.SpecialBuild, "#27"); -#endif } [Test] // DefineVersionInfoResource (String, String, String, String, String) @@ -1439,13 +1315,8 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (5, fvi.FileMajorPart, "#5"); Assert.AreEqual (4, fvi.FileMinorPart, "#6"); Assert.AreEqual (assemblyFile, fvi.FileName, "#7"); -#if NET_2_0 Assert.AreEqual (0, fvi.FilePrivatePart, "#8"); Assert.AreEqual ("5.4.7.0", fvi.FileVersion, "#9"); -#else - Assert.AreEqual (65535, fvi.FilePrivatePart, "#8"); - Assert.AreEqual ("5.4.7.65535", fvi.FileVersion, "#9"); -#endif Assert.AreEqual ("lib1g", fvi.InternalName, "#10"); Assert.IsFalse (fvi.IsDebug, "#11"); Assert.IsFalse (fvi.IsPatched, "#12"); @@ -1542,22 +1413,13 @@ namespace MonoTests.System.Diagnostics FileVersionInfo fvi = FileVersionInfo.GetVersionInfo (assemblyFile); Assert.AreEqual ("System Test", fvi.Comments, "#1"); Assert.AreEqual (" ", fvi.CompanyName, "#2"); -#if NET_2_0 Assert.AreEqual (0, fvi.FileBuildPart, "#3"); -#else - Assert.AreEqual (65535, fvi.FileBuildPart, "#3"); -#endif Assert.AreEqual (" ", fvi.FileDescription, "#4"); Assert.AreEqual (5, fvi.FileMajorPart, "#5"); Assert.AreEqual (4, fvi.FileMinorPart, "#6"); Assert.AreEqual (assemblyFile, fvi.FileName, "#7"); -#if NET_2_0 Assert.AreEqual (0, fvi.FilePrivatePart, "#8"); Assert.AreEqual ("5.4.0.0", fvi.FileVersion, "#9"); -#else - Assert.AreEqual (65535, fvi.FilePrivatePart, "#8"); - Assert.AreEqual ("5.4.65535.65535", fvi.FileVersion, "#9"); -#endif Assert.AreEqual ("lib1h", fvi.InternalName, "#10"); Assert.IsFalse (fvi.IsDebug, "#11"); Assert.IsFalse (fvi.IsPatched, "#12"); @@ -2390,13 +2252,8 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (3, fvi.FileMajorPart, "#5"); Assert.AreEqual (5, fvi.FileMinorPart, "#6"); Assert.AreEqual (assemblyFile, fvi.FileName, "#7"); -#if NET_2_0 Assert.AreEqual (0, fvi.FilePrivatePart, "#8"); Assert.AreEqual ("3.5.7.0", fvi.FileVersion, "#9"); -#else - Assert.AreEqual (65535, fvi.FilePrivatePart, "#8"); - Assert.AreEqual ("3.5.7.65535", fvi.FileVersion, "#9"); -#endif Assert.AreEqual ("lib2f", fvi.InternalName, "#10"); Assert.IsFalse (fvi.IsDebug, "#11"); Assert.IsFalse (fvi.IsPatched, "#12"); diff --git a/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionAttributeTest.cs b/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionAttributeTest.cs index 63961fc4556..9739fbe8fc7 100644 --- a/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionAttributeTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionAttributeTest.cs @@ -49,11 +49,7 @@ namespace MonoTests.System.Diagnostics { Assert.IsFalse (a.Unrestricted, "Unrestricted");
Assert.AreEqual (".", a.MachineName, "MachineName");
Assert.AreEqual ("*", a.CategoryName, "CategoryName");
-#if NET_2_0
Assert.AreEqual (PerformanceCounterPermissionAccess.Write, a.PermissionAccess, "PermissionAccess");
-#else
- Assert.AreEqual (PerformanceCounterPermissionAccess.Browse, a.PermissionAccess, "PermissionAccess");
-#endif
PerformanceCounterPermission sp = (PerformanceCounterPermission)a.CreatePermission ();
Assert.IsFalse (sp.IsUnrestricted (), "IsUnrestricted");
}
@@ -151,9 +147,7 @@ namespace MonoTests.System.Diagnostics { case 13:
case 32:
case 92:
-#if NET_2_0
case 133:
-#endif
case 160:
// known invalid chars
break;
@@ -179,12 +173,10 @@ namespace MonoTests.System.Diagnostics { Assert.AreEqual (PerformanceCounterPermissionAccess.Instrument, a.PermissionAccess, "Instrument");
a.PermissionAccess = PerformanceCounterPermissionAccess.None;
Assert.AreEqual (PerformanceCounterPermissionAccess.None, a.PermissionAccess, "None");
-#if NET_2_0
a.PermissionAccess = PerformanceCounterPermissionAccess.Read;
Assert.AreEqual (PerformanceCounterPermissionAccess.Read, a.PermissionAccess, "Read");
a.PermissionAccess = PerformanceCounterPermissionAccess.Write;
Assert.AreEqual (PerformanceCounterPermissionAccess.Write, a.PermissionAccess, "Write");
-#endif
}
[Test]
@@ -213,4 +205,4 @@ namespace MonoTests.System.Diagnostics { }
}
-#endif
\ No newline at end of file +#endif
diff --git a/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionTest.cs b/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionTest.cs index e00a8895979..5ae5a62b495 100644 --- a/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/PerformanceCounterPermissionTest.cs @@ -43,10 +43,8 @@ namespace MonoTests.System.Diagnostics { static PerformanceCounterPermissionAccess[] AllAccess = { PerformanceCounterPermissionAccess.None, PerformanceCounterPermissionAccess.Browse, -#if NET_2_0 PerformanceCounterPermissionAccess.Read, PerformanceCounterPermissionAccess.Write, -#endif PerformanceCounterPermissionAccess.Instrument, PerformanceCounterPermissionAccess.Administer, }; @@ -90,9 +88,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void PermissionState_Bad () { PermissionState ps = (PermissionState)77; @@ -108,11 +104,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void Constructor_MachineName_Null () { PerformanceCounterPermission pcp = new PerformanceCounterPermission (PerformanceCounterPermissionAccess.None, null, String.Empty); @@ -126,9 +118,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void PerformanceCounterPermissionAccesss_Bad () { PerformanceCounterPermissionAccess pcpa = (PerformanceCounterPermissionAccess)Int32.MinValue; @@ -249,11 +239,7 @@ namespace MonoTests.System.Diagnostics { public void IsSubset_Null () { PerformanceCounterPermission pcp = new PerformanceCounterPermission (PermissionState.None); -#if NET_2_0 Assert.IsTrue (pcp.IsSubsetOf (null), "null"); -#else - Assert.IsFalse (pcp.IsSubsetOf (null), "null"); -#endif } [Test] @@ -372,12 +358,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - // Problem inherited from ResourcePermissionBase - [ExpectedException (typeof (NullReferenceException))] -#endif public void FromXml_Null () { PerformanceCounterPermission pcp = new PerformanceCounterPermission (PermissionState.None); @@ -385,9 +366,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTag () { PerformanceCounterPermission pcp = new PerformanceCounterPermission (PermissionState.None); @@ -399,9 +378,7 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTagCase () { PerformanceCounterPermission pcp = new PerformanceCounterPermission (PermissionState.None); diff --git a/mcs/class/System/Test/System.Diagnostics/ProcessStartInfoTest.cs b/mcs/class/System/Test/System.Diagnostics/ProcessStartInfoTest.cs index 1f071375288..53de1f66db4 100644 --- a/mcs/class/System/Test/System.Diagnostics/ProcessStartInfoTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/ProcessStartInfoTest.cs @@ -33,7 +33,6 @@ namespace MonoTests.System.Diagnostics Assert.AreEqual (info.WorkingDirectory, String.Empty, "#6"); } -#if NET_2_0 [Test] public void StandardErrorOutputEncoding () { @@ -61,6 +60,5 @@ namespace MonoTests.System.Diagnostics info.StandardOutputEncoding = Encoding.UTF8; Process.Start (info); } -#endif } } diff --git a/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs b/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs index f5453c5017d..436e0e1252c 100644 --- a/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/ProcessTest.cs @@ -593,7 +593,6 @@ namespace MonoTests.System.Diagnostics } } -#if NET_2_0 [Test] public void Start_UseShellExecuteWithEmptyUserName () { @@ -629,7 +628,6 @@ namespace MonoTests.System.Diagnostics } catch (Win32Exception) { } } -#endif [Test] // Start (string, string) public void Start4_FileName_Null () @@ -724,7 +722,6 @@ namespace MonoTests.System.Diagnostics public int bytesRead = -1; -#if NET_2_0 // Not technically a 2.0 only test, but I use lambdas, so I need gmcs [Test] @@ -827,7 +824,6 @@ namespace MonoTests.System.Diagnostics Assert.IsNull (e.InnerException, "IOE inner exception should be null"); } -#endif [Test] public void Handle_ThrowsOnNotStarted () diff --git a/mcs/class/System/Test/System.Diagnostics/StopwatchTest.cs b/mcs/class/System/Test/System.Diagnostics/StopwatchTest.cs index b7afcd030d4..fef52561430 100644 --- a/mcs/class/System/Test/System.Diagnostics/StopwatchTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/StopwatchTest.cs @@ -6,7 +6,6 @@ // // Copyright (C) 2006 Novell, Inc. // -#if NET_2_0 using System; using System.Diagnostics; using System.Threading; @@ -47,4 +46,3 @@ namespace MonoTests.System.Diagnostics } } } -#endif diff --git a/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs b/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs index 4c52cb109af..9d97fc8b53c 100644 --- a/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/SwitchesTest.cs @@ -48,12 +48,10 @@ namespace MonoTests.System.Diagnostics { } } -#if NET_2_0 public string [] ExposeSupportedAttributes () { return GetSupportedAttributes (); } -#endif public bool Validate () { @@ -146,16 +144,13 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if NET_2_0 [Ignore ("this test depends on 1.x configuration type")] -#endif public void NewSwitch () { Assert.AreEqual ("42", tns.TestValue, "#NS:TestValue"); Assert.IsTrue (tns.Validate(), "#NS:Validate"); } -#if NET_2_0 [Test] public void GetSupportedAttributes () { @@ -198,7 +193,6 @@ namespace MonoTests.System.Diagnostics { Assert.IsEmpty (s.DisplayName); Assert.IsEmpty (s.Description); } -#endif } } diff --git a/mcs/class/System/Test/System.Diagnostics/TraceListenerTest.cs b/mcs/class/System/Test/System.Diagnostics/TraceListenerTest.cs index b4ef528c52b..f3262afd631 100644 --- a/mcs/class/System/Test/System.Diagnostics/TraceListenerTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/TraceListenerTest.cs @@ -41,7 +41,6 @@ namespace MonoTests.System.Diagnostics [TestFixture] public class TraceListenerTest { -#if NET_2_0 [Test] public void GetSupportedAttributes () { @@ -119,15 +118,12 @@ bulldog Transfer: 0 : hoge, relatedActivityId=00000000-0000-0000-0000-0000000000 ", date.ToString ("o"), time); // date and time are in current culture Assert.AreEqual (expected, sw.ToString ().Replace ("\r\n", "\n")); } -#endif class MyTraceListener : TraceListener { -#if NET_2_0 public string [] SupportedAttributes { get { return base.GetSupportedAttributes (); } } -#endif public override void Write (string message) { @@ -140,4 +136,4 @@ bulldog Transfer: 0 : hoge, relatedActivityId=00000000-0000-0000-0000-0000000000 } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System/Test/System.Diagnostics/XmlWriterTraceListenerTest.cs b/mcs/class/System/Test/System.Diagnostics/XmlWriterTraceListenerTest.cs index 0774b68ede4..b543c15f787 100644 --- a/mcs/class/System/Test/System.Diagnostics/XmlWriterTraceListenerTest.cs +++ b/mcs/class/System/Test/System.Diagnostics/XmlWriterTraceListenerTest.cs @@ -42,7 +42,6 @@ namespace MonoTests.System.Diagnostics [TestFixture] public class XmlWriterTraceListenerTest { -#if NET_2_0 string sample1 = @"<E2ETraceEvent xmlns='http://schemas.microsoft.com/2004/06/E2ETraceEvent'><System xmlns='http://schemas.microsoft.com/2004/06/windows/eventlog/system'><EventID>0</EventID><Type>3</Type><SubType Name='Information'>0</SubType><Level>8</Level><TimeCreated SystemTime='2007-04-19T21:18:30.6250000+09:00' /><Source Name='Trace' /><Correlation ActivityID='{00000000-0000-0000-0000-000000000000}' /><Execution ProcessName='zzz' ProcessID='4776' ThreadID='1' /><Channel/><Computer>PC</Computer></System><ApplicationData>sample</ApplicationData></E2ETraceEvent>"; string sample2 = @"<E2ETraceEvent xmlns='http://schemas.microsoft.com/2004/06/E2ETraceEvent'><System xmlns='http://schemas.microsoft.com/2004/06/windows/eventlog/system'><EventID>4</EventID><Type>3</Type><SubType Name='Error'>0</SubType><Level>2</Level><TimeCreated SystemTime='2007-04-19T21:18:30.6250000+09:00' /><Source Name='' /><Correlation ActivityID='{00000000-0000-0000-0000-000000000000}' /><Execution ProcessName='zzz' ProcessID='4776' ThreadID='1' /><Channel/><Computer>PC</Computer></System><ApplicationData></ApplicationData></E2ETraceEvent>"; @@ -154,8 +153,7 @@ namespace MonoTests.System.Diagnostics Assert.IsTrue (sw.ToString ().IndexOf (xml) > 0, "#1"); Assert.IsTrue (sw.ToString ().IndexOf ("</DataItem><DataItem>") > 0, "#2"); } -#endif } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System/Test/System.IO.Compression/DeflateStreamCas.cs b/mcs/class/System/Test/System.IO.Compression/DeflateStreamCas.cs index 1497dfe3577..4482a36ec5c 100644 --- a/mcs/class/System/Test/System.IO.Compression/DeflateStreamCas.cs +++ b/mcs/class/System/Test/System.IO.Compression/DeflateStreamCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -139,4 +138,3 @@ namespace MonoCasTests.System.IO.Compression { } } -#endif diff --git a/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs b/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs index fb26433f47d..984d13ca93d 100644 --- a/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs +++ b/mcs/class/System/Test/System.IO.Compression/DeflateStreamTest.cs @@ -8,7 +8,6 @@ // (C) 2004 Novell, Inc. <http://www.novell.com> // -#if NET_2_0 using NUnit.Framework; using System; @@ -366,5 +365,4 @@ namespace MonoTests.System.IO.Compression } } -#endif diff --git a/mcs/class/System/Test/System.IO.Compression/GZipStreamCas.cs b/mcs/class/System/Test/System.IO.Compression/GZipStreamCas.cs index 8fd100584a0..386d71636aa 100644 --- a/mcs/class/System/Test/System.IO.Compression/GZipStreamCas.cs +++ b/mcs/class/System/Test/System.IO.Compression/GZipStreamCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -139,4 +138,3 @@ namespace MonoCasTests.System.IO.Compression { } } -#endif diff --git a/mcs/class/System/Test/System.Media/SoundPlayerTest.cs b/mcs/class/System/Test/System.Media/SoundPlayerTest.cs index e8e7d6a29d1..d9402bfaa4c 100644 --- a/mcs/class/System/Test/System.Media/SoundPlayerTest.cs +++ b/mcs/class/System/Test/System.Media/SoundPlayerTest.cs @@ -7,7 +7,6 @@ // (C) 2007 Gert Driesen // -#if NET_2_0 using System; using System.IO; @@ -104,4 +103,3 @@ namespace MonoTests.System.Media } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/AlternateViewCollectionTest.cs b/mcs/class/System/Test/System.Net.Mail/AlternateViewCollectionTest.cs index 516114517dd..d336bb75538 100644 --- a/mcs/class/System/Test/System.Net.Mail/AlternateViewCollectionTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/AlternateViewCollectionTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -49,4 +48,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/AlternateViewTest.cs b/mcs/class/System/Test/System.Net.Mail/AlternateViewTest.cs index 5fe2745c861..64e6efa61be 100644 --- a/mcs/class/System/Test/System.Net.Mail/AlternateViewTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/AlternateViewTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -81,4 +80,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/AttachmentCollectionTest.cs b/mcs/class/System/Test/System.Net.Mail/AttachmentCollectionTest.cs index f34fcee7b67..0b9f1cbb764 100644 --- a/mcs/class/System/Test/System.Net.Mail/AttachmentCollectionTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/AttachmentCollectionTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -49,4 +48,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/AttachmentTest.cs b/mcs/class/System/Test/System.Net.Mail/AttachmentTest.cs index 01fb4760c8b..00ddf63fa95 100644 --- a/mcs/class/System/Test/System.Net.Mail/AttachmentTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/AttachmentTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -98,4 +97,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/LinkedResourceCollectionTest.cs b/mcs/class/System/Test/System.Net.Mail/LinkedResourceCollectionTest.cs index c091fcbcf91..59743cca73e 100644 --- a/mcs/class/System/Test/System.Net.Mail/LinkedResourceCollectionTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/LinkedResourceCollectionTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -49,4 +48,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/LinkedResourceTest.cs b/mcs/class/System/Test/System.Net.Mail/LinkedResourceTest.cs index da36315326e..01ccf55f7b5 100644 --- a/mcs/class/System/Test/System.Net.Mail/LinkedResourceTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/LinkedResourceTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -49,4 +48,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/MailAddressCollectionTest.cs b/mcs/class/System/Test/System.Net.Mail/MailAddressCollectionTest.cs index cada8ba0853..d30f7fd91b2 100644 --- a/mcs/class/System/Test/System.Net.Mail/MailAddressCollectionTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/MailAddressCollectionTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -49,4 +48,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/MailMessageTest.cs b/mcs/class/System/Test/System.Net.Mail/MailMessageTest.cs index 62678501c84..08e679b2a81 100644 --- a/mcs/class/System/Test/System.Net.Mail/MailMessageTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/MailMessageTest.cs @@ -6,7 +6,6 @@ // // (C) 2005, 2006 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -165,4 +164,3 @@ namespace MonoTests.System.Net.Mail } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs b/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs index 250236643f5..0d1d124835d 100644 --- a/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/SmtpClientTest.cs @@ -6,7 +6,6 @@ // // (C) 2006 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -392,4 +391,3 @@ namespace MonoTests.System.Net.Mail } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mail/SmtpExceptionTest.cs b/mcs/class/System/Test/System.Net.Mail/SmtpExceptionTest.cs index 371726cdc00..40c11663fab 100644 --- a/mcs/class/System/Test/System.Net.Mail/SmtpExceptionTest.cs +++ b/mcs/class/System/Test/System.Net.Mail/SmtpExceptionTest.cs @@ -7,7 +7,6 @@ // (C) 2008 Gert Driesen // -#if NET_2_0 using System; using System.Collections; @@ -316,4 +315,3 @@ namespace MonoTests.System.Net.Mail { } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mime/ContentDispositionTest.cs b/mcs/class/System/Test/System.Net.Mime/ContentDispositionTest.cs index e596b77c428..f215c791215 100644 --- a/mcs/class/System/Test/System.Net.Mime/ContentDispositionTest.cs +++ b/mcs/class/System/Test/System.Net.Mime/ContentDispositionTest.cs @@ -7,7 +7,6 @@ // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; @@ -149,4 +148,3 @@ namespace MonoTests.System.Net.Mime } } } -#endif diff --git a/mcs/class/System/Test/System.Net.Mime/ContentTypeTest.cs b/mcs/class/System/Test/System.Net.Mime/ContentTypeTest.cs index df886e93a45..30062d497d4 100644 --- a/mcs/class/System/Test/System.Net.Mime/ContentTypeTest.cs +++ b/mcs/class/System/Test/System.Net.Mime/ContentTypeTest.cs @@ -6,7 +6,6 @@ // // (C) 2005 John Luke // -#if NET_2_0 using NUnit.Framework; using System; using System.Net.Mime; @@ -171,4 +170,3 @@ namespace MonoTests.System.Net.Mime } } } -#endif diff --git a/mcs/class/System/Test/System.Net.NetworkInformation/PhysicalAddressTest.cs b/mcs/class/System/Test/System.Net.NetworkInformation/PhysicalAddressTest.cs index 157a30dd152..f02ba02ca5c 100644 --- a/mcs/class/System/Test/System.Net.NetworkInformation/PhysicalAddressTest.cs +++ b/mcs/class/System/Test/System.Net.NetworkInformation/PhysicalAddressTest.cs @@ -1,6 +1,5 @@ using NUnit.Framework; using System; -#if NET_2_0 using System.Net.NetworkInformation; namespace MonoTests.System.Net.NetworkInformation @@ -133,4 +132,3 @@ namespace MonoTests.System.Net.NetworkInformation } } -#endif diff --git a/mcs/class/System/Test/System.Net.Sockets/MulticastOptionTest.cs b/mcs/class/System/Test/System.Net.Sockets/MulticastOptionTest.cs index 684dd391f94..6c3bc98f91b 100644 --- a/mcs/class/System/Test/System.Net.Sockets/MulticastOptionTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/MulticastOptionTest.cs @@ -26,17 +26,13 @@ namespace MonoTests.System.Net.Sockets group = IPAddress.Parse ("239.255.255.250"); option = new MulticastOption (group); Assert.AreSame (group, option.Group, "#A:Group"); -#if NET_2_0 Assert.AreEqual (0, option.InterfaceIndex, "#A:InterfaceIndex"); -#endif Assert.AreEqual (IPAddress.Any, option.LocalAddress, "#A:LocalAddress"); group = IPAddress.Parse ("ff02::1"); option = new MulticastOption (group); Assert.AreSame (group, option.Group, "#B:Group"); -#if NET_2_0 Assert.AreEqual (0, option.InterfaceIndex, "#B:InterfaceIndex"); -#endif Assert.AreEqual (IPAddress.Any, option.LocalAddress, "#B:LocalAddress"); } @@ -65,18 +61,14 @@ namespace MonoTests.System.Net.Sockets mcint = IPAddress.Any; option = new MulticastOption (group, mcint); Assert.AreSame (group, option.Group, "#A:Group"); -#if NET_2_0 Assert.AreEqual (0, option.InterfaceIndex, "#A:InterfaceIndex"); -#endif Assert.AreEqual (mcint, option.LocalAddress, "#A:LocalAddress"); group = IPAddress.Parse ("ff02::1"); mcint = IPAddress.IPv6Any; option = new MulticastOption (group, mcint); Assert.AreSame (group, option.Group, "#B:Group"); -#if NET_2_0 Assert.AreEqual (0, option.InterfaceIndex, "#B:InterfaceIndex"); -#endif Assert.AreEqual (mcint, option.LocalAddress, "#B:LocalAddress"); } @@ -114,7 +106,6 @@ namespace MonoTests.System.Net.Sockets } } -#if NET_2_0 [Test] // .ctor (IPAddress, Int32) public void Constructor3 () { @@ -208,7 +199,6 @@ namespace MonoTests.System.Net.Sockets Assert.AreEqual ("interfaceIndex", ex.ParamName, "#B5"); } } -#endif [Test] public void Group () @@ -217,11 +207,7 @@ namespace MonoTests.System.Net.Sockets IPAddress local; MulticastOption option; -#if NET_2_0 local = Dns.GetHostEntry (string.Empty).AddressList [0]; -#else - local = IPAddress.Loopback; -#endif group = IPAddress.Parse ("239.255.255.250"); option = new MulticastOption (group, local); group = IPAddress.Parse ("224.0.0.23"); @@ -239,17 +225,14 @@ namespace MonoTests.System.Net.Sockets option.Group = null; Assert.IsNull (option.Group, "#D1"); Assert.AreSame (local, option.LocalAddress, "#D2"); -#if NET_2_0 option = new MulticastOption (group, 5); group = IPAddress.Parse ("224.0.0.23"); option.Group = group; Assert.AreSame (group, option.Group, "#E1"); Assert.AreEqual (5, option.InterfaceIndex, "#E2"); Assert.IsNull (option.LocalAddress, "#E3"); -#endif } -#if NET_2_0 [Test] public void InterfaceIndex () { @@ -311,7 +294,6 @@ namespace MonoTests.System.Net.Sockets // ensure original value was retained Assert.AreEqual (10, option.InterfaceIndex, "#C"); } -#endif [Test] public void LocalAddress () @@ -320,45 +302,29 @@ namespace MonoTests.System.Net.Sockets IPAddress local; MulticastOption option; -#if NET_2_0 local = Dns.GetHostEntry (string.Empty).AddressList [0]; -#else - local = IPAddress.Loopback; -#endif group = IPAddress.Parse ("239.255.255.250"); option = new MulticastOption (group, local); local = IPAddress.Loopback; option.LocalAddress = local; Assert.AreSame (group, option.Group, "#A1"); -#if NET_2_0 Assert.AreEqual (0, option.InterfaceIndex, "#A2"); -#endif Assert.AreSame (local, option.LocalAddress, "#A3"); -#if NET_2_0 local = Dns.GetHostEntry (string.Empty).AddressList [0]; -#else - local = IPAddress.Loopback; -#endif option.LocalAddress = local; Assert.AreSame (group, option.Group, "#B1"); -#if NET_2_0 Assert.AreEqual (0, option.InterfaceIndex, "#B2"); -#endif Assert.AreSame (local, option.LocalAddress, "#B3"); option.LocalAddress = null; Assert.AreSame (group, option.Group, "#C1"); -#if NET_2_0 Assert.AreEqual (0, option.InterfaceIndex, "#C2"); -#endif Assert.IsNull (option.LocalAddress, "#C3"); -#if NET_2_0 option = new MulticastOption (group, 5); local = IPAddress.Loopback; option.LocalAddress = local; Assert.AreSame (group, option.Group, "#D1"); Assert.AreEqual (0, option.InterfaceIndex, "#D2"); Assert.AreSame (local, option.LocalAddress, "#D3"); -#endif } } } diff --git a/mcs/class/System/Test/System.Net.Sockets/NetworkStreamTest.cs b/mcs/class/System/Test/System.Net.Sockets/NetworkStreamTest.cs index c5fe18f6acb..9c3765e2d5b 100644 --- a/mcs/class/System/Test/System.Net.Sockets/NetworkStreamTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/NetworkStreamTest.cs @@ -18,7 +18,6 @@ namespace MonoTests.System.Net.Sockets [TestFixture] public class NetworkStreamTest { -#if NET_2_0 [Test] // See bug #371923 [ExpectedException(typeof(IOException))] @@ -71,6 +70,5 @@ namespace MonoTests.System.Net.Sockets listen.Close (); } } -#endif } } diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketAsyncEventArgsTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketAsyncEventArgsTest.cs index 6cd14207c99..f0c29764ae9 100644 --- a/mcs/class/System/Test/System.Net.Sockets/SocketAsyncEventArgsTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/SocketAsyncEventArgsTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections.Generic; @@ -251,5 +250,4 @@ namespace MonoTests.System.Net.Sockets { } } -#endif diff --git a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs index 07e31a1908c..697830b3fd8 100755 --- a/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/SocketTest.cs @@ -16,9 +16,7 @@ using System.Net.Sockets; using NUnit.Framework; using System.IO; -#if NET_2_0 using System.Collections.Generic; -#endif namespace MonoTests.System.Net.Sockets { @@ -71,13 +69,8 @@ namespace MonoTests.System.Net.Sockets } Assert.Fail ("#1"); } catch (SocketException ex) { -#if !NET_2_0 - // invalid argument - int expectedError = 10022; -#else // address incompatible with protocol int expectedError = 10047; -#endif Assert.AreEqual (expectedError, ex.ErrorCode, "#2"); } @@ -206,9 +199,6 @@ namespace MonoTests.System.Net.Sockets } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif public void SetSocketOptionBoolean () { IPEndPoint ep = new IPEndPoint (IPAddress.Loopback, 1); @@ -428,11 +418,7 @@ namespace MonoTests.System.Net.Sockets Assert.AreEqual (hashcodeA, hashcodeB, "#1"); client.Close (); int hashcodeC = client.GetHashCode (); -#if NET_2_0 Assert.AreEqual (hashcodeB, hashcodeC, "#2"); -#else - Assert.IsFalse (hashcodeB == hashcodeC, "#2"); -#endif server.Close (); } @@ -482,7 +468,6 @@ namespace MonoTests.System.Net.Sockets } -#if NET_2_0 [Test] public void SocketInformationCtor () { @@ -2654,7 +2639,6 @@ namespace MonoTests.System.Net.Sockets sock.Close (); } } -#endif static Socket CWRSocket; static bool CWRReceiving = true; @@ -2882,7 +2866,6 @@ namespace MonoTests.System.Net.Sockets } } -#if NET_2_0 [Test] // Receive (Byte [], Int32, Int32, SocketFlags, out SocketError) public void Receive5_Buffer_Null () { @@ -3042,7 +3025,6 @@ namespace MonoTests.System.Net.Sockets s.Close (); } } -#endif [Test] // ReceiveFrom (Byte [], ref EndPoint) public void ReceiveFrom1_Buffer_Null () @@ -3477,7 +3459,6 @@ namespace MonoTests.System.Net.Sockets s.Close (); } -#if NET_2_0 [Test] [Category ("NotOnMac")] public void ConnectedProperty () @@ -3504,7 +3485,6 @@ namespace MonoTests.System.Net.Sockets server.Close (); } } -#endif [Test] // GetSocketOption (SocketOptionLevel, SocketOptionName) public void GetSocketOption1_Socket_Closed () @@ -3539,9 +3519,7 @@ namespace MonoTests.System.Net.Sockets Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10014, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.Fault, ex.SocketErrorCode, "#7"); -#endif } } @@ -3606,9 +3584,7 @@ namespace MonoTests.System.Net.Sockets Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10014, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.Fault, ex.SocketErrorCode, "#7"); -#endif } } } @@ -3629,9 +3605,7 @@ namespace MonoTests.System.Net.Sockets Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10014, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.Fault, ex.SocketErrorCode, "#7"); -#endif } } } @@ -3704,14 +3678,9 @@ namespace MonoTests.System.Net.Sockets Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 // The specified value is not a valid 'MulticastOption' Assert.IsTrue (ex.Message.IndexOf ("'MulticastOption'") != -1, "#5:" + ex.Message); Assert.AreEqual ("optionValue", ex.ParamName, "#6"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#5"); - Assert.IsNull (ex.ParamName, "#6"); -#endif } } } @@ -3746,9 +3715,7 @@ namespace MonoTests.System.Net.Sockets Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10022, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.InvalidArgument, ex.SocketErrorCode, "#7"); -#endif } finally { s.Close (); } @@ -3757,11 +3724,7 @@ namespace MonoTests.System.Net.Sockets [Test] // SetSocketOption (SocketOptionLevel, SocketOptionName, Object) public void SetSocketOption3_AddMembershipIPv6_IPv6MulticastOption () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); IPAddress mcast_addr = IPAddress.Parse ("ff02::1"); @@ -3776,11 +3739,7 @@ namespace MonoTests.System.Net.Sockets [Test] // SetSocketOption (SocketOptionLevel, SocketOptionName, Object) public void SetSocketOption3_AddMembershipIPv6_MulticastOption () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); IPAddress mcast_addr = IPAddress.Parse ("ff02::1"); @@ -3795,14 +3754,9 @@ namespace MonoTests.System.Net.Sockets Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 // The specified value is not a valid 'IPv6MulticastOption' Assert.IsTrue (ex.Message.IndexOf ("'IPv6MulticastOption'") != -1, "#5:" + ex.Message); Assert.AreEqual ("optionValue", ex.ParamName, "#6"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#5"); - Assert.IsNull (ex.ParamName, "#6"); -#endif } } } @@ -3825,9 +3779,7 @@ namespace MonoTests.System.Net.Sockets Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10022, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.InvalidArgument, ex.SocketErrorCode, "#7"); -#endif } finally { s.Close (); } @@ -3845,13 +3797,8 @@ namespace MonoTests.System.Net.Sockets // The specified value is not valid Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); -#if NET_2_0 Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("optionValue", ex.ParamName, "#5"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); -#endif } } } @@ -3868,13 +3815,8 @@ namespace MonoTests.System.Net.Sockets // The specified value is not valid Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); -#if NET_2_0 Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("optionValue", ex.ParamName, "#5"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); -#endif } } } @@ -3890,14 +3832,9 @@ namespace MonoTests.System.Net.Sockets } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); -#if NET_2_0 // The specified value is not valid Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("optionValue", ex.ParamName, "#5"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); -#endif } } } @@ -3913,14 +3850,9 @@ namespace MonoTests.System.Net.Sockets } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); -#if NET_2_0 // The specified value is not valid Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("optionValue", ex.ParamName, "#5"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); -#endif } } } @@ -3936,14 +3868,9 @@ namespace MonoTests.System.Net.Sockets } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); -#if NET_2_0 // The specified value is not valid Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("optionValue", ex.ParamName, "#5"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#4"); - Assert.IsNull (ex.ParamName, "#5"); -#endif } } } @@ -3980,14 +3907,9 @@ namespace MonoTests.System.Net.Sockets Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 // The specified value is not a valid 'MulticastOption' Assert.IsTrue (ex.Message.IndexOf ("'MulticastOption'") != -1, "#5:" + ex.Message); Assert.AreEqual ("optionValue", ex.ParamName, "#6"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#5"); - Assert.IsNull (ex.ParamName, "#6"); -#endif } } } @@ -4026,9 +3948,7 @@ namespace MonoTests.System.Net.Sockets Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10022, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.InvalidArgument, ex.SocketErrorCode, "#7"); -#endif } finally { s.Close (); } @@ -4037,11 +3957,7 @@ namespace MonoTests.System.Net.Sockets [Test] // SetSocketOption (SocketOptionLevel, SocketOptionName, Object) public void SetSocketOption3_DropMembershipIPv6_IPv6MulticastOption () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); using (Socket s = new Socket (AddressFamily.InterNetworkV6, SocketType.Dgram, ProtocolType.Udp)) { @@ -4059,11 +3975,7 @@ namespace MonoTests.System.Net.Sockets [Test] // SetSocketOption (SocketOptionLevel, SocketOptionName, Object) public void SetSocketOption3_DropMembershipIPv6_MulticastOption () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); IPAddress mcast_addr = IPAddress.Parse ("ff02::1"); @@ -4080,14 +3992,9 @@ namespace MonoTests.System.Net.Sockets Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 // The specified value is not a valid 'IPv6MulticastOption' Assert.IsTrue (ex.Message.IndexOf ("'IPv6MulticastOption'") != -1, "#5:" + ex.Message); Assert.AreEqual ("optionValue", ex.ParamName, "#6"); -#else - Assert.AreEqual ("optionValue", ex.Message, "#5"); - Assert.IsNull (ex.ParamName, "#6"); -#endif } } } @@ -4110,9 +4017,7 @@ namespace MonoTests.System.Net.Sockets Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10022, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.InvalidArgument, ex.SocketErrorCode, "#7"); -#endif } finally { s.Close (); } diff --git a/mcs/class/System/Test/System.Net.Sockets/TcpClientCas.cs b/mcs/class/System/Test/System.Net.Sockets/TcpClientCas.cs index e245fcd5b06..b9f4de54400 100644 --- a/mcs/class/System/Test/System.Net.Sockets/TcpClientCas.cs +++ b/mcs/class/System/Test/System.Net.Sockets/TcpClientCas.cs @@ -50,7 +50,6 @@ namespace MonoCasTests.System.Net.Sockets { } // async tests (for stack propagation) -#if NET_2_0 /* Oops - not yet implemented in Mono private void ConnectCallback (IAsyncResult ar) { @@ -117,6 +116,5 @@ namespace MonoCasTests.System.Net.Sockets { Assert.IsNull (message, message); } */ -#endif } } diff --git a/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs index 1915c3c39e9..a02e150915b 100644 --- a/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/TcpClientTest.cs @@ -82,13 +82,10 @@ namespace MonoTests.System.Net.Sockets TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765); NetworkStream ns = tcpClient.GetStream (); Assert.IsNotNull (ns, "#A1"); -#if NET_2_0 Assert.AreEqual (0, tcpClient.Available, "#A2"); Assert.IsTrue (tcpClient.Connected, "#A3"); // Assert.IsFalse (tcpClient.ExclusiveAddressUse, "#A4"); -#endif tcpClient.Close (); -#if NET_2_0 Assert.IsNotNull (tcpClient.Client, "#A5"); try { int available = tcpClient.Available; @@ -104,20 +101,16 @@ namespace MonoTests.System.Net.Sockets } catch (ObjectDisposedException) { } */ -#endif } using (SocketResponder sr = new SocketResponder (localEP, new SocketRequestHandler (CloseRequestHandler))) { sr.Start (); TcpClient tcpClient = new TcpClient (IPAddress.Loopback.ToString (), 8765); -#if NET_2_0 Assert.AreEqual (0, tcpClient.Available, "#B1"); Assert.IsTrue (tcpClient.Connected, "#B2"); // Assert.IsFalse (tcpClient.ExclusiveAddressUse, "#B3"); -#endif tcpClient.Close (); -#if NET_2_0 Assert.IsNull (tcpClient.Client, "#B4"); try { int available = tcpClient.Available; @@ -137,7 +130,6 @@ namespace MonoTests.System.Net.Sockets } catch (NullReferenceException) { } */ -#endif } } @@ -146,7 +138,6 @@ namespace MonoTests.System.Net.Sockets return new byte [0]; } -#if NET_2_0 [Test] [ExpectedException (typeof(ArgumentNullException))] public void ConnectMultiNull () @@ -192,6 +183,5 @@ namespace MonoTests.System.Net.Sockets Assert.Fail ("ConnectMultiRefused #3"); } } -#endif } } diff --git a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs index 208b9482b89..37e5969b139 100644 --- a/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/TcpListenerTest.cs @@ -168,7 +168,6 @@ namespace MonoTests.System.Net.Sockets Assert.IsTrue (sock != listener.GetSocket (), "#08"); } -#if NET_2_0 [Test] public void StartListenMoreThan5 () { @@ -189,6 +188,5 @@ namespace MonoTests.System.Net.Sockets listen.Start (65536); listen.Stop (); } -#endif } } diff --git a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs index 51c3ac795b5..6dd0b0c1531 100644 --- a/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs +++ b/mcs/class/System/Test/System.Net.Sockets/UdpClientTest.cs @@ -26,21 +26,17 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "Client:AddressFamily"); Assert.IsFalse (s.Connected, "Client:Connected"); -#if NET_2_0 Assert.IsFalse (s.IsBound, "#A:Client:IsBound"); -#endif Assert.IsNull (s.LocalEndPoint, "Client:LocalEndPoint"); Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "Client:ProtocolType"); Assert.IsNull (s.RemoteEndPoint, "Client:RemoteEndPoint"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "Client:SocketType"); Assert.IsFalse (client.Active, "Active"); -#if NET_2_0 Assert.IsFalse (client.DontFragment, "DontFragment"); Assert.IsFalse (client.EnableBroadcast, "EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "Ttl"); -#endif client.Close (); } @@ -55,27 +51,19 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#A:Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "#A:Client:AddressFamily"); Assert.IsFalse (s.Connected, "#A:Client:Connected"); -#if NET_2_0 Assert.IsFalse (s.IsBound, "#A:Client:IsBound"); -#endif Assert.IsNull (s.LocalEndPoint, "#A:Client:LocalEndPoint"); Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#A:Client:ProtocolType"); Assert.IsNull (s.RemoteEndPoint, "#A:Client:RemoteEndPoint"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#A:Client:SocketType"); Assert.IsFalse (client.Active, "#A:Active"); -#if NET_2_0 //Assert.IsFalse (client.DontFragment, "#A:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#A:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#A:ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "#A:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#A:Ttl"); -#endif -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); client = new MyUdpClient (AddressFamily.InterNetworkV6); @@ -83,21 +71,17 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#B:Client"); Assert.AreEqual (AddressFamily.InterNetworkV6, s.AddressFamily, "#B:Client:AddressFamily"); Assert.IsFalse (s.Connected, "#B:Client:Connected"); -#if NET_2_0 Assert.IsFalse (s.IsBound, "#A:Client:IsBound"); -#endif Assert.IsNull (s.LocalEndPoint, "#B:Client:LocalEndPoint"); Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#B:Client:ProtocolType"); Assert.IsNull (s.RemoteEndPoint, "#B:Client:RemoteEndPoint"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#B:Client:SocketType"); Assert.IsFalse (client.Active, "#B:Active"); -#if NET_2_0 //Assert.IsFalse (client.DontFragment, "#B:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#B:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#B:ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "#B:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#B:Ttl"); -#endif client.Close (); } @@ -110,15 +94,10 @@ namespace MonoTests.System.Net.Sockets { } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); -#if NET_2_0 // 'UDP' Client can only accept InterNetwork or InterNetworkV6 // addresses Assert.IsNotNull (ex.Message, "#A4"); Assert.AreEqual ("family", ex.ParamName, "#A5"); -#else - Assert.AreEqual ("family", ex.Message, "#A4"); - Assert.IsNull (ex.ParamName, "#A5"); -#endif } try { @@ -127,13 +106,8 @@ namespace MonoTests.System.Net.Sockets { } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); -#if NET_2_0 Assert.IsNotNull (ex.Message, "#B4"); Assert.AreEqual ("family", ex.ParamName, "#B5"); -#else - Assert.AreEqual ("family", ex.Message, "#B4"); - Assert.IsNull (ex.ParamName, "#B5"); -#endif } } @@ -149,19 +123,15 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#A:Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "#A:Client:AddressFamily"); Assert.IsFalse (s.Connected, "#A:Client:Connected"); - #if NET_2_0 Assert.IsTrue (s.IsBound, "#A:Client:IsBound"); - #endif Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#A:Client:ProtocolType"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#A:Client:SocketType"); Assert.IsFalse (client.Active, "#A:Active"); - #if NET_2_0 Assert.IsFalse (client.DontFragment, "#A:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#A:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#A:ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "#A:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#A:Ttl"); - #endif localEP = s.LocalEndPoint as IPEndPoint; Assert.IsNotNull (localEP, "#A:Client:LocalEndpoint"); Assert.AreEqual (IPAddress.Any, localEP.Address, "#A:Client:LocalEndPoint/Address"); @@ -173,19 +143,15 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#B:Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "#B:Client:AddressFamily"); Assert.IsFalse (s.Connected, "#B:Client:Connected"); - #if NET_2_0 Assert.IsTrue (s.IsBound, "#B:Client:IsBound"); - #endif Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#B:Client:ProtocolType"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#B:Client:SocketType"); Assert.IsFalse (client.Active, "#B:Active"); - #if NET_2_0 Assert.IsFalse (client.DontFragment, "#B:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#B:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#B:ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "#B:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#B:Ttl"); - #endif localEP = s.LocalEndPoint as IPEndPoint; Assert.IsNotNull (localEP, "#B:Client:LocalEndpoint"); Assert.AreEqual (IPAddress.Any, localEP.Address, "#B:Client:LocalEndPoint/Address"); @@ -234,19 +200,15 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#A:Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "#A:Client:AddressFamily"); Assert.IsFalse (s.Connected, "#A:Client:Connected"); -#if NET_2_0 Assert.IsTrue (s.IsBound, "#A:Client:IsBound"); -#endif Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#A:Client:ProtocolType"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#A:Client:SocketType"); Assert.IsFalse (client.Active, "#A:Active"); -#if NET_2_0 Assert.IsFalse (client.DontFragment, "#A:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#A:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#A:ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "#A:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#A:Ttl"); -#endif localEP = s.LocalEndPoint as IPEndPoint; Assert.IsNotNull (localEP, "#A:Client:LocalEndpoint"); Assert.IsFalse (object.ReferenceEquals (clientEP, localEP), "#A:Client:LocalEndPoint/ReferenceEquality"); @@ -282,30 +244,22 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#A:Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "#A:Client:AddressFamily"); Assert.IsFalse (s.Connected, "#A:Client:Connected"); -#if NET_2_0 Assert.IsTrue (s.IsBound, "#A:Client:IsBound"); -#endif Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#A:Client:ProtocolType"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#A:Client:SocketType"); Assert.IsFalse (client.Active, "#A:Active"); -#if NET_2_0 //Assert.IsFalse (client.DontFragment, "#A:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#A:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#A:ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "#A:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#A:Ttl"); -#endif localEP = s.LocalEndPoint as IPEndPoint; Assert.IsNotNull (localEP, "#A:Client:LocalEndpoint"); Assert.AreEqual (IPAddress.Any, localEP.Address, "#A:Client:LocalEndPoint/Address"); Assert.AreEqual (AddressFamily.InterNetwork, localEP.AddressFamily, "#A:Client:LocalEndPoint/AddressFamily"); } -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); using (MyUdpClient client = new MyUdpClient (IPEndPoint.MaxPort, AddressFamily.InterNetworkV6)) @@ -314,19 +268,15 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#B:Client"); Assert.AreEqual (AddressFamily.InterNetworkV6, s.AddressFamily, "#B:Client:AddressFamily"); Assert.IsFalse (s.Connected, "#B:Client:Connected"); -#if NET_2_0 Assert.IsTrue (s.IsBound, "#B:Client:IsBound"); -#endif Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#B:Client:ProtocolType"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#B:Client:SocketType"); Assert.IsFalse (client.Active, "#B:Active"); -#if NET_2_0 //Assert.IsFalse (client.DontFragment, "#B:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#B:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#B:ExclusiveAddressUse"); Assert.IsTrue (client.MulticastLoopback, "#B:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#B:Ttl"); -#endif localEP = s.LocalEndPoint as IPEndPoint; Assert.IsNotNull (localEP, "#B:Client:LocalEndpoint"); Assert.AreEqual (IPAddress.IPv6Any, localEP.Address, "#B:Client:LocalEndPoint/Address"); @@ -345,15 +295,10 @@ namespace MonoTests.System.Net.Sockets { // family Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#A2"); Assert.IsNull (ex.InnerException, "#A3"); -#if NET_2_0 // 'UDP' Client can only accept InterNetwork or InterNetworkV6 // addresses Assert.IsNotNull (ex.Message, "#A4"); Assert.AreEqual ("family", ex.ParamName, "#A5"); -#else - Assert.AreEqual ("family", ex.Message, "#A4"); - Assert.IsNull (ex.ParamName, "#A5"); -#endif } try { @@ -363,15 +308,10 @@ namespace MonoTests.System.Net.Sockets { // family Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#B2"); Assert.IsNull (ex.InnerException, "#B3"); -#if NET_2_0 // 'UDP' Client can only accept InterNetwork or InterNetworkV6 // addresses Assert.IsNotNull (ex.Message, "#B4"); Assert.AreEqual ("family", ex.ParamName, "#B5"); -#else - Assert.AreEqual ("family", ex.Message, "#B4"); - Assert.IsNull (ex.ParamName, "#B5"); -#endif } } @@ -415,19 +355,15 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#A:Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "#A:Client:AddressFamily"); Assert.IsTrue (s.Connected, "#A:Client:Connected"); -#if NET_2_0 Assert.IsTrue (s.IsBound, "#A:Client:IsBound"); -#endif Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#A:Client:ProtocolType"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#A:Client:SocketType"); Assert.IsTrue (client.Active, "#A:Active"); -#if NET_2_0 Assert.IsFalse (client.DontFragment, "#A:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#A:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#A:ExclusiveAddressUse"); //Assert.IsFalse (client.MulticastLoopback, "#A:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#A:Ttl"); -#endif localEP = s.LocalEndPoint as IPEndPoint; Assert.IsNotNull (localEP, "#A:Client:LocalEndpoint"); Assert.AreEqual (IPAddress.Loopback, localEP.Address, "#A:Client:LocalEndPoint/Address"); @@ -439,19 +375,15 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNotNull (s, "#B:Client"); Assert.AreEqual (AddressFamily.InterNetwork, s.AddressFamily, "#B:Client:AddressFamily"); Assert.IsTrue (s.Connected, "#B:Client:Connected"); -#if NET_2_0 Assert.IsTrue (s.IsBound, "#B:Client:IsBound"); -#endif Assert.AreEqual (ProtocolType.Udp, s.ProtocolType, "#B:Client:ProtocolType"); Assert.AreEqual (SocketType.Dgram, s.SocketType, "#B:Client:SocketType"); Assert.IsTrue (client.Active, "#B:Active"); -#if NET_2_0 Assert.IsFalse (client.DontFragment, "#B:DontFragment"); Assert.IsFalse (client.EnableBroadcast, "#B:EnableBroadcast"); //Assert.IsFalse (client.ExclusiveAddressUse, "#B:ExclusiveAddressUse"); //Assert.IsFalse (client.MulticastLoopback, "#B:MulticastLoopback"); //Assert.AreEqual (32, client.Ttl, "#B:Ttl"); -#endif localEP = s.LocalEndPoint as IPEndPoint; Assert.IsNotNull (localEP, "#B:Client:LocalEndpoint"); Assert.AreEqual (IPAddress.Loopback, localEP.Address, "#B:Client:LocalEndPoint/Address"); @@ -525,11 +457,7 @@ namespace MonoTests.System.Net.Sockets { [Test] // JoinMulticastGroup (IPAddress) public void JoinMulticastGroup1_IPv6 () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); IPAddress mcast_addr = IPAddress.Parse ("ff02::1"); @@ -546,20 +474,12 @@ namespace MonoTests.System.Net.Sockets { try { client.JoinMulticastGroup ((IPAddress) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); Assert.AreEqual ("multicastAddr", ex.ParamName, "#5"); } -#else - } catch (NullReferenceException ex) { - Assert.AreEqual (typeof (NullReferenceException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - } -#endif } } @@ -599,9 +519,7 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10022, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.InvalidArgument, ex.SocketErrorCode, "#7"); -#endif } finally { client.Close (); } @@ -624,9 +542,7 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10045, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.OperationNotSupported, ex.SocketErrorCode, "#7"); -#endif } } } @@ -634,11 +550,7 @@ namespace MonoTests.System.Net.Sockets { [Test] // JoinMulticastGroup (In32, IPAddress) public void JoinMulticastGroup2_IPv6 () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); IPAddress mcast_addr = IPAddress.Parse ("ff02::1"); @@ -667,11 +579,7 @@ namespace MonoTests.System.Net.Sockets { [Test] // JoinMulticastGroup (Int32, IPAddress) public void JoinMulticastGroup2_Socket_Closed () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); IPAddress mcast_addr = null; @@ -707,9 +615,7 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10022, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.InvalidArgument, ex.SocketErrorCode, "#7"); -#endif } finally { client.Close (); } @@ -732,11 +638,7 @@ namespace MonoTests.System.Net.Sockets { [Test] // JoinMulticastGroup (IPAddress, Int32) public void JoinMulticastGroup3_IPv6 () { -#if NET_2_0 if (!Socket.OSSupportsIPv6) -#else - if (!Socket.SupportsIPv6) -#endif Assert.Ignore ("IPv6 not enabled."); IPAddress mcast_addr = IPAddress.Parse ("ff02::1"); @@ -802,15 +704,12 @@ namespace MonoTests.System.Net.Sockets { Assert.IsNull (ex.InnerException, "#4"); Assert.IsNotNull (ex.Message, "#5"); Assert.AreEqual (10022, ex.NativeErrorCode, "#6"); -#if NET_2_0 Assert.AreEqual (SocketError.InvalidArgument, ex.SocketErrorCode, "#7"); -#endif } finally { client.Close (); } } -#if NET_2_0 [Test] // JoinMulticastGroup (IPAddress, IPAddress) public void JoinMulticastGroup4_IPv4 () { @@ -1160,7 +1059,6 @@ namespace MonoTests.System.Net.Sockets { } /* No test for Ttl default as it is platform dependent */ -#endif class MyUdpClient : UdpClient { diff --git a/mcs/class/System/Test/System.Net/CookieTest.cs b/mcs/class/System/Test/System.Net/CookieTest.cs index b84dedb2aab..f627f6a28d2 100644 --- a/mcs/class/System/Test/System.Net/CookieTest.cs +++ b/mcs/class/System/Test/System.Net/CookieTest.cs @@ -32,9 +32,7 @@ namespace MonoTests.System.Net Assert.IsFalse (c.Discard, "#A7"); Assert.IsFalse (c.Expired, "#A8"); Assert.AreEqual (DateTime.MinValue, c.Expires, "#A9"); -#if NET_2_0 Assert.IsFalse (c.HttpOnly, "#A10"); -#endif Assert.AreEqual (string.Empty, c.Path, "#A11"); Assert.IsFalse (c.Secure, "#A12"); Assert.AreEqual (0, c.Version, "#A13"); diff --git a/mcs/class/System/Test/System.Net/CredentialCacheTest.cs b/mcs/class/System/Test/System.Net/CredentialCacheTest.cs index a1d5f79c11a..58cbeef5725 100644 --- a/mcs/class/System/Test/System.Net/CredentialCacheTest.cs +++ b/mcs/class/System/Test/System.Net/CredentialCacheTest.cs @@ -99,7 +99,6 @@ public class CredentialCacheTest Console.WriteLine (e.Current.GetType () + " : " + e.Current.ToString ());
}
*/
-#if NET_2_0
result = c.GetCredential ("www.ximian.com", 80, "Basic");
Assert.IsTrue (result == null, "#18");
@@ -117,7 +116,6 @@ public class CredentialCacheTest c.Add ("www.contoso.com", 80, "Basic", cred5);
result = c.GetCredential (new Uri("http://www.contoso.com"), "Basic");
Assert.IsTrue (result == null, "#21");
-#endif
}
}
diff --git a/mcs/class/System/Test/System.Net/DnsCas.cs b/mcs/class/System/Test/System.Net/DnsCas.cs index b532428fd53..d984553e17b 100644 --- a/mcs/class/System/Test/System.Net/DnsCas.cs +++ b/mcs/class/System/Test/System.Net/DnsCas.cs @@ -112,13 +112,9 @@ namespace MonoCasTests.System.Net { [Test] [DnsPermission (SecurityAction.Deny, Unrestricted = true)] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] // so it's not a declarative attribute on the method as the // null check is done before throwing the SecurityException -#else - [ExpectedException (typeof (SecurityException))] -#endif public void Deny_GetHostByName_Null () { Dns.GetHostByName (null); @@ -151,7 +147,6 @@ namespace MonoCasTests.System.Net { Dns.Resolve (null); } -#if NET_2_0 // TODO: New 2.0 methods aren't yet implemented in Mono /* [Test] @@ -218,7 +213,6 @@ namespace MonoCasTests.System.Net { Dns.GetHostAddresses (null); } */ -#endif // ensure that only DnsPermission is required to call the methods @@ -277,7 +271,6 @@ namespace MonoCasTests.System.Net { Dns.Resolve (null); } -#if NET_2_0 // TODO: New 2.0 methods aren't yet implemented in Mono /* [Test] @@ -344,7 +337,6 @@ namespace MonoCasTests.System.Net { Dns.GetHostAddresses (null); } */ -#endif // async tests (for stack propagation) @@ -415,7 +407,6 @@ namespace MonoCasTests.System.Net { Assert.IsNull (message, message); } -#if NET_2_0 // TODO: New 2.0 methods aren't yet implemented in Mono /* [DnsPermission (SecurityAction.Deny, Unrestricted = true)] @@ -500,7 +491,6 @@ namespace MonoCasTests.System.Net { Assert.IsNull (message, message); } */ -#endif } } diff --git a/mcs/class/System/Test/System.Net/DnsTest.cs b/mcs/class/System/Test/System.Net/DnsTest.cs index 2ce8e8447bf..ef55ed36a6c 100644 --- a/mcs/class/System/Test/System.Net/DnsTest.cs +++ b/mcs/class/System/Test/System.Net/DnsTest.cs @@ -72,7 +72,6 @@ namespace MonoTests.System.Net SubTestValidIPHostEntry (h);
}
-#if NET_2_0
[Test]
public void BeginGetHostAddresses_HostNameOrAddress_Null ()
{
@@ -179,7 +178,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("hostNameOrAddress", ex.ParamName, "#B5");
}
}
-#endif
[Test]
public void GetHostName ()
diff --git a/mcs/class/System/Test/System.Net/FileWebRequestTest.cs b/mcs/class/System/Test/System.Net/FileWebRequestTest.cs index d5314d9caad..9fa30a6c539 100644 --- a/mcs/class/System/Test/System.Net/FileWebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/FileWebRequestTest.cs @@ -354,17 +354,9 @@ namespace MonoTests.System.Net } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNotNull (ex.Message, "#3"); -#if NET_2_0 Assert.IsFalse (ex.Message == "value", "#4"); -#else - Assert.AreEqual ("value", ex.Message, "#4"); -#endif -#if NET_2_0 Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("value", ex.ParamName, "#6"); -#else - Assert.IsNull (ex.ParamName, "#5"); -#endif Assert.IsNull (ex.InnerException, "#7"); } } @@ -420,7 +412,6 @@ namespace MonoTests.System.Net try { fsA = req.GetRequestStream () as FileStream; Assert.IsNotNull (fsA, "#A1"); -#if NET_2_0 try { req.GetRequestStream (); Assert.Fail ("#A2"); @@ -435,11 +426,6 @@ namespace MonoTests.System.Net // Cannot re-call BeginGetRequestStream/BeginGetResponse // while a previous call is still in progress. } -#else - fsB = req.GetRequestStream () as FileStream; - Assert.IsNotNull (fsB, "#A2"); - Assert.AreSame (fsA, fsB, "#A3"); -#endif } finally { if (fsA != null) fsA.Close (); @@ -454,7 +440,6 @@ namespace MonoTests.System.Net fsA = req.GetRequestStream () as FileStream; Assert.IsNotNull (fsA, "#B1"); fsA.Close (); -#if NET_2_0 try { req.GetRequestStream (); Assert.Fail ("#B2"); @@ -469,11 +454,6 @@ namespace MonoTests.System.Net // Cannot re-call BeginGetRequestStream/BeginGetResponse // while a previous call is still in progress. } -#else - fsB = req.GetRequestStream () as FileStream; - Assert.IsNotNull (fsB, "#B2"); - Assert.AreSame (fsA, fsB, "#B3"); -#endif } finally { if (fsA != null) fsA.Close (); @@ -508,13 +488,10 @@ namespace MonoTests.System.Net Assert.IsNotNull (s, "#1:" + method); Assert.IsFalse (s.CanRead, "#2:" + method); Assert.IsTrue (s.CanSeek, "#3:" + method); -#if NET_2_0 Assert.IsFalse (s.CanTimeout, "#4:" + method); -#endif Assert.IsTrue (s.CanWrite, "#5:" + method); Assert.AreEqual (0, s.Length, "#6:" + method); Assert.AreEqual (0, s.Position, "#7:" + method); -#if NET_2_0 try { int i = s.ReadTimeout; Assert.Fail ("#8:" + method + "=>" + i); @@ -525,7 +502,6 @@ namespace MonoTests.System.Net Assert.Fail ("#9:" + method + "=>" + i); } catch (InvalidOperationException) { } -#endif } } } @@ -623,11 +599,7 @@ namespace MonoTests.System.Net } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNotNull (ex.Message, "#3"); -#if NET_2_0 Assert.AreEqual ("value", ex.ParamName, "#4"); -#else - Assert.IsNull (ex.ParamName, "#4"); -#endif Assert.IsNull (ex.InnerException, "#5"); } } @@ -642,11 +614,7 @@ namespace MonoTests.System.Net } catch (ArgumentException ex) { Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); Assert.IsNotNull (ex.Message, "#3"); -#if NET_2_0 Assert.AreEqual ("value", ex.ParamName, "#4"); -#else - Assert.IsNull (ex.ParamName, "#4"); -#endif Assert.IsNull (ex.InnerException, "#5"); } } @@ -702,11 +670,7 @@ namespace MonoTests.System.Net Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#3"); Assert.IsNotNull (ex.Message, "#4"); Assert.IsNotNull (ex.ParamName, "#5"); -#if NET_2_0 Assert.IsFalse (ex.ParamName == "value", "#6"); -#else - Assert.AreEqual ("value", ex.ParamName, "#6"); -#endif Assert.IsNull (ex.InnerException, "#7"); } } @@ -776,11 +740,7 @@ namespace MonoTests.System.Net case 8: Assert.AreEqual ("preauthenticate", entry.Name, "#B4:" + i); Assert.AreEqual (typeof (bool), entry.ObjectType, "#B5:" + i); -#if NET_2_0 Assert.AreEqual (false, entry.Value, "#B6:" + i); -#else - Assert.AreEqual (true, entry.Value, "#B6:" + i); -#endif break; } i++; @@ -828,11 +788,7 @@ namespace MonoTests.System.Net Assert.AreEqual ("image/png", req.ContentType, "#A3"); Assert.IsNull (req.Credentials, "#A4"); Assert.AreEqual ("PUT", req.Method, "#A5"); -#if NET_2_0 Assert.IsFalse (req.PreAuthenticate, "#A6"); -#else - Assert.IsTrue (req.PreAuthenticate, "#A6"); -#endif Assert.AreEqual ("file://test.txt/", req.RequestUri.AbsoluteUri, "#A7"); Assert.AreEqual (20, req.Timeout, "#A8"); @@ -877,7 +833,6 @@ namespace MonoTests.System.Net } private static readonly byte [] _serialized = new byte [] { -#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, 0x49, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2c, 0x20, 0x56, 0x65, @@ -949,77 +904,6 @@ namespace MonoTests.System.Net 0x00, 0x00, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x18, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x78, 0x69, 0x6d, 0x69, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x0b -#else - 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02, 0x00, 0x00, 0x00, - 0x4c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 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, 0x19, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2e, 0x4e, 0x65, 0x74, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x57, - 0x65, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x09, 0x00, - 0x00, 0x00, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x05, - 0x70, 0x72, 0x6f, 0x78, 0x79, 0x03, 0x75, 0x72, 0x69, 0x13, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x47, 0x72, - 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x06, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, - 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x07, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x0a, 0x66, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x0f, 0x70, 0x72, 0x65, 0x61, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x04, 0x04, 0x04, - 0x01, 0x01, 0x00, 0x00, 0x03, 0x00, 0x1e, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x2e, 0x4e, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x02, 0x00, 0x00, 0x00, 0x13, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x4e, 0x65, 0x74, 0x2e, 0x57, 0x65, - 0x62, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x02, 0x00, 0x00, 0x00, 0x0a, - 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x55, 0x72, 0x69, 0x02, - 0x00, 0x00, 0x00, 0x09, 0x08, 0x14, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2e, 0x49, 0x4f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x01, 0x02, 0x00, 0x00, 0x00, 0x09, 0x03, - 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, 0x00, 0x09, 0x05, 0x00, - 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x03, 0x43, 0x47, 0x4e, - 0x06, 0x07, 0x00, 0x00, 0x00, 0x03, 0x50, 0x55, 0x54, 0x0a, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, - 0xf8, 0xff, 0xff, 0xff, 0x14, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x49, 0x4f, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x41, 0x63, 0x63, - 0x65, 0x73, 0x73, 0x01, 0x00, 0x00, 0x00, 0x07, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x5f, 0x5f, 0x00, 0x08, 0x01, 0x00, 0x00, 0x00, 0x01, - 0x05, 0x03, 0x00, 0x00, 0x00, 0x1e, 0x53, 0x79, 0x73, 0x74, 0x65, - 0x6d, 0x2e, 0x4e, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x43, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, - 0x69, 0x6f, 0x6e, 0x05, 0x00, 0x00, 0x00, 0x05, 0x43, 0x6f, 0x75, - 0x6e, 0x74, 0x01, 0x30, 0x01, 0x32, 0x01, 0x31, 0x01, 0x33, 0x00, - 0x01, 0x01, 0x01, 0x01, 0x08, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, - 0x00, 0x00, 0x06, 0x09, 0x00, 0x00, 0x00, 0x0c, 0x43, 0x6f, 0x6e, - 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x06, 0x0a, - 0x00, 0x00, 0x00, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, - 0x6e, 0x67, 0x06, 0x0b, 0x00, 0x00, 0x00, 0x0b, 0x44, 0x69, 0x73, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x06, 0x0c, 0x00, - 0x00, 0x00, 0x06, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x05, 0x04, - 0x00, 0x00, 0x00, 0x13, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, - 0x4e, 0x65, 0x74, 0x2e, 0x57, 0x65, 0x62, 0x50, 0x72, 0x6f, 0x78, - 0x79, 0x03, 0x00, 0x00, 0x00, 0x0e, 0x5f, 0x42, 0x79, 0x70, 0x61, - 0x73, 0x73, 0x4f, 0x6e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x0d, 0x5f, - 0x50, 0x72, 0x6f, 0x78, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x0b, 0x5f, 0x42, 0x79, 0x70, 0x61, 0x73, 0x73, 0x4c, 0x69, - 0x73, 0x74, 0x00, 0x04, 0x02, 0x01, 0x0a, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6d, 0x2e, 0x55, 0x72, 0x69, 0x02, 0x00, 0x00, 0x00, 0x02, - 0x00, 0x00, 0x00, 0x00, 0x09, 0x0d, 0x00, 0x00, 0x00, 0x0a, 0x05, - 0x05, 0x00, 0x00, 0x00, 0x0a, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x2e, 0x55, 0x72, 0x69, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x41, 0x62, - 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x55, 0x72, 0x69, 0x01, 0x02, - 0x00, 0x00, 0x00, 0x06, 0x0e, 0x00, 0x00, 0x00, 0x10, 0x66, 0x69, - 0x6c, 0x65, 0x3a, 0x2f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x2e, 0x74, - 0x78, 0x74, 0x2f, 0x01, 0x0d, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, - 0x00, 0x06, 0x0f, 0x00, 0x00, 0x00, 0x18, 0x68, 0x74, 0x74, 0x70, - 0x3a, 0x2f, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x78, 0x69, - 0x6d, 0x69, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x0b -#endif }; } } diff --git a/mcs/class/System/Test/System.Net/FileWebResponseTest.cs b/mcs/class/System/Test/System.Net/FileWebResponseTest.cs index a29c3f9af97..bf0a9568084 100644 --- a/mcs/class/System/Test/System.Net/FileWebResponseTest.cs +++ b/mcs/class/System/Test/System.Net/FileWebResponseTest.cs @@ -122,13 +122,10 @@ namespace MonoTests.System.Net Assert.IsNotNull (fsA, "#A1"); Assert.IsTrue (fsA.CanRead, "#A2"); Assert.IsTrue (fsA.CanSeek, "#A3"); -#if NET_2_0 Assert.IsFalse (fsA.CanTimeout, "#A4"); -#endif Assert.IsFalse (fsA.CanWrite, "#A5"); Assert.AreEqual (3, fsA.Length, "#A6"); Assert.AreEqual (0, fsA.Position, "#A7"); -#if NET_2_0 try { int i = fsA.ReadTimeout; Assert.Fail ("#A8:" + i); @@ -139,20 +136,16 @@ namespace MonoTests.System.Net Assert.Fail ("#A9:" + i); } catch (InvalidOperationException) { } -#endif respB = (FileWebResponse) req.GetResponse (); fsB = respB.GetResponseStream () as FileStream; Assert.IsNotNull (fsB, "#B1"); Assert.IsTrue (fsB.CanRead, "#B2"); Assert.IsTrue (fsB.CanSeek, "#B3"); -#if NET_2_0 Assert.IsFalse (fsB.CanTimeout, "#B4"); -#endif Assert.IsFalse (fsB.CanWrite, "#B5"); Assert.AreEqual (3, fsB.Length, "#B6"); Assert.AreEqual (0, fsB.Position, "#B7"); -#if NET_2_0 try { int i = fsB.ReadTimeout; Assert.Fail ("#B8:" + i); @@ -163,7 +156,6 @@ namespace MonoTests.System.Net Assert.Fail ("#B9:" + i); } catch (InvalidOperationException) { } -#endif } finally { if (respA != null) respA.Close (); diff --git a/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs b/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs index 2fc05090ef4..1aced67de65 100644 --- a/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/FtpWebRequestTest.cs @@ -7,7 +7,6 @@ // // Copyright (c) 2006,2007,2008 Novell, Inc. (http://www.novell.com) // -#if NET_2_0 using NUnit.Framework; using System; using System.IO; @@ -635,5 +634,4 @@ namespace MonoTests.System.Net } } -#endif diff --git a/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs b/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs index d1de09391e8..4d8985a262d 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerBasicIdentityTest.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.Net; using NUnit.Framework; @@ -72,5 +71,4 @@ namespace MonoTests.System.Net { } } } -#endif diff --git a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs index b099f07d75e..873481cbc5a 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerPrefixCollectionTest.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.Net; using NUnit.Framework; @@ -248,5 +247,4 @@ namespace MonoTests.System.Net { } } } -#endif diff --git a/mcs/class/System/Test/System.Net/HttpListenerTest.cs b/mcs/class/System/Test/System.Net/HttpListenerTest.cs index 5c1591169ed..a62ea64b81f 100644 --- a/mcs/class/System/Test/System.Net/HttpListenerTest.cs +++ b/mcs/class/System/Test/System.Net/HttpListenerTest.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.Net; using System.Net.Sockets; @@ -527,5 +526,4 @@ namespace MonoTests.System.Net { } } } -#endif diff --git a/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs b/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs index 5866c34bbcc..c62c888f24b 100644 --- a/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs +++ b/mcs/class/System/Test/System.Net/HttpWebResponseTest.cs @@ -272,7 +272,6 @@ namespace MonoTests.System.Net HttpWebResponse resp = (HttpWebResponse) req.GetResponse (); ((IDisposable) resp).Dispose (); -#if NET_2_0 WebHeaderCollection headers = resp.Headers; Assert.AreEqual (6, headers.Count, "#1"); Assert.AreEqual ("9", headers ["Content-Length"], "#2"); @@ -281,17 +280,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("Wed, 08 Jan 2003 23:11:55 GMT", headers ["Last-Modified"], "#5"); Assert.AreEqual ("UserID=Miguel,StoreProfile=true", headers ["Set-Cookie"], "#6"); Assert.AreEqual ("Mono/Test", headers ["Server"], "#7"); -#else - try { - WebHeaderCollection headers = resp.Headers; - Assert.Fail ("#1:" + headers); - } catch (ObjectDisposedException ex) { - Assert.AreEqual (typeof (ObjectDisposedException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.AreEqual (typeof (HttpWebResponse).FullName, ex.ObjectName, "#5"); - } -#endif } } @@ -664,7 +652,6 @@ namespace MonoTests.System.Net } } -#if NET_2_0 [Test] // bug #324182 public void CanTimeout () { @@ -693,7 +680,6 @@ namespace MonoTests.System.Net } } } -#endif [Test] public void CanWrite () @@ -1088,7 +1074,6 @@ namespace MonoTests.System.Net } } -#if NET_2_0 [Test] public void ReadTimeout () { @@ -1117,7 +1102,6 @@ namespace MonoTests.System.Net } } } -#endif [Test] public void Write () @@ -1153,7 +1137,6 @@ namespace MonoTests.System.Net } } -#if NET_2_0 [Test] public void WriteTimeout () { @@ -1182,6 +1165,5 @@ namespace MonoTests.System.Net } } } -#endif } } diff --git a/mcs/class/System/Test/System.Net/ServicePointTest.cs b/mcs/class/System/Test/System.Net/ServicePointTest.cs index 98189c285be..da4a0f5dd4d 100644 --- a/mcs/class/System/Test/System.Net/ServicePointTest.cs +++ b/mcs/class/System/Test/System.Net/ServicePointTest.cs @@ -146,7 +146,6 @@ public class ServicePointTest }
}
-#if NET_2_0
[Test]
[Category ("InetAccess")]
public void EndPointBind ()
@@ -177,7 +176,6 @@ public class ServicePointTest Assert.IsTrue (called);
}
-#endif
// Debug code not used now, but could be useful later
/*
diff --git a/mcs/class/System/Test/System.Net/WebClientTest.cs b/mcs/class/System/Test/System.Net/WebClientTest.cs index 7f9675865bf..9b3b8a92d78 100644 --- a/mcs/class/System/Test/System.Net/WebClientTest.cs +++ b/mcs/class/System/Test/System.Net/WebClientTest.cs @@ -63,7 +63,6 @@ namespace MonoTests.System.Net try { wc.DownloadData ((string) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -71,24 +70,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // DownloadData (string) @@ -114,7 +95,6 @@ namespace MonoTests.System.Net } } -#if NET_2_0 [Test] // DownloadData (Uri) public void DownloadData2_Address_Null () { @@ -153,7 +133,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (inner.Message, "#9"); } } -#endif [Test] public void DownloadFile1_Address_Null () @@ -162,7 +141,6 @@ namespace MonoTests.System.Net try { wc.DownloadFile ((string) null, "tmp.out"); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -170,24 +148,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // DownloadFile (string, string) @@ -226,7 +186,6 @@ namespace MonoTests.System.Net wc.DownloadFile ("tp://scheme.notsupported", (string) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -234,27 +193,8 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("fileName", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("path", inner.ParamName, "#11"); - } -#endif } -#if NET_2_0 [Test] // DownloadFile (Uri, string) public void DownloadFile2_Address_Null () { @@ -417,7 +357,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("Encoding", ex.ParamName, "#6"); } } -#endif [Test] // OpenRead (string) public void OpenRead1_Address_Null () @@ -426,7 +365,6 @@ namespace MonoTests.System.Net try { wc.OpenRead ((string) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -434,24 +372,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // OpenRead (string) @@ -477,7 +397,6 @@ namespace MonoTests.System.Net } } -#if NET_2_0 [Test] // OpenRead (Uri) public void OpenRead2_Address_Null () { @@ -516,7 +435,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (inner.Message, "#9"); } } -#endif [Test] // OpenWrite (string) public void OpenWrite1_Address_Null () @@ -525,7 +443,6 @@ namespace MonoTests.System.Net try { wc.OpenWrite ((string) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -533,24 +450,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // OpenWrite (string) @@ -583,7 +482,6 @@ namespace MonoTests.System.Net try { wc.OpenWrite ((string) null, "PUT"); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -591,24 +489,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // OpenWrite (string, string) @@ -634,7 +514,6 @@ namespace MonoTests.System.Net } } -#if NET_2_0 [Test] // OpenWrite (Uri) public void OpenWrite3_Address_Null () { @@ -713,7 +592,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (inner.Message, "#9"); } } -#endif [Test] // UploadData (string, byte []) public void UploadData1_Address_Null () @@ -722,7 +600,6 @@ namespace MonoTests.System.Net try { wc.UploadData ((string) null, new byte [] { 0x1a }); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -730,24 +607,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // UploadData (string, byte []) @@ -784,7 +643,6 @@ namespace MonoTests.System.Net wc.UploadData ("http://www.mono-project.com", (byte []) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -792,27 +650,8 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("data", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("data", inner.ParamName, "#11"); - } -#endif } -#if NET_2_0 [Test] // UploadData (Uri, byte []) public void UploadData2_Address_Null () { @@ -869,7 +708,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("data", ex.ParamName, "#6"); } } -#endif [Test] // UploadData (string, string, byte []) public void UploadData3_Address_Null () @@ -879,7 +717,6 @@ namespace MonoTests.System.Net wc.UploadData ((string) null, "POST", new byte [] { 0x1a }); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -887,24 +724,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // UploadData (string, string, byte []) @@ -942,7 +761,6 @@ namespace MonoTests.System.Net wc.UploadData ("http://www.mono-project.com", "POST", (byte []) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -950,27 +768,8 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("data", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("data", inner.ParamName, "#11"); - } -#endif } -#if NET_2_0 [Test] // UploadData (Uri, string, byte []) public void UploadData4_Address_Null () { @@ -1027,7 +826,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("data", ex.ParamName, "#6"); } } -#endif [Test] // UploadFile (string, string) public void UploadFile1_Address_Null () @@ -1039,7 +837,6 @@ namespace MonoTests.System.Net try { wc.UploadFile ((string) null, tempFile); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1047,24 +844,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // UploadFile (string, string) @@ -1131,7 +910,6 @@ namespace MonoTests.System.Net wc.UploadFile ("tp://scheme.notsupported", (string) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1139,27 +917,8 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("fileName", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("path", inner.ParamName, "#11"); - } -#endif } -#if NET_2_0 [Test] // UploadFile (Uri, string) public void UploadFile2_Address_Null () { @@ -1250,7 +1009,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("fileName", ex.ParamName, "#6"); } } -#endif [Test] // UploadFile (string, string, string) public void UploadFile3_Address_Null () @@ -1262,7 +1020,6 @@ namespace MonoTests.System.Net try { wc.UploadFile ((string) null, "POST", tempFile); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1270,24 +1027,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("path", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // UploadFile (string, string, string) @@ -1354,7 +1093,6 @@ namespace MonoTests.System.Net wc.UploadFile ("tp://scheme.notsupported", "POST", (string) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1362,27 +1100,8 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("fileName", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("path", inner.ParamName, "#11"); - } -#endif } -#if NET_2_0 [Test] // UploadFile (Uri, string, string) public void UploadFile4_Address_Null () { @@ -1700,7 +1419,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("data", ex.ParamName, "#6"); } } -#endif [Test] public void UploadValues1 () @@ -1712,9 +1430,7 @@ namespace MonoTests.System.Net responder.Start (); WebClient wc = new WebClient (); -#if NET_2_0 wc.Encoding = Encoding.ASCII; -#endif NameValueCollection nvc = new NameValueCollection (); nvc.Add ("Name", "\u0041\u2262\u0391\u002E"); @@ -1733,7 +1449,6 @@ namespace MonoTests.System.Net try { wc.UploadValues ((string) null, new NameValueCollection ()); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1741,24 +1456,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // UploadValues (string, NameValueCollection) @@ -1796,7 +1493,6 @@ namespace MonoTests.System.Net wc.UploadValues ("http://www.mono-project.com", (NameValueCollection) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1804,27 +1500,8 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("data", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("data", inner.ParamName, "#11"); - } -#endif } -#if NET_2_0 [Test] // UploadValues (Uri, NameValueCollection) public void UploadValues2_Address_Null () { @@ -1881,7 +1558,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("data", ex.ParamName, "#6"); } } -#endif [Test] // UploadValues (string, string, NameValueCollection) public void UploadValues3_Address_Null () @@ -1891,7 +1567,6 @@ namespace MonoTests.System.Net wc.UploadValues ((string) null, "POST", new NameValueCollection ()); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1899,24 +1574,6 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("address", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("uriString", inner.ParamName, "#11"); - } -#endif } [Test] // UploadValues (string, string, NameValueCollection) @@ -1954,7 +1611,6 @@ namespace MonoTests.System.Net wc.UploadValues ("http://www.mono-project.com", "POST", (NameValueCollection) null); Assert.Fail ("#1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); @@ -1962,27 +1618,8 @@ namespace MonoTests.System.Net Assert.IsNotNull (ex.ParamName, "#5"); Assert.AreEqual ("data", ex.ParamName, "#6"); } -#else - } catch (WebException ex) { - // An error occurred performing a WebClient request - Assert.AreEqual (typeof (WebException), ex.GetType (), "#2"); - Assert.IsNotNull (ex.Message, "#3"); - Assert.IsNull (ex.Response, "#4"); - Assert.AreEqual (WebExceptionStatus.UnknownError, ex.Status, "#5"); - - ArgumentNullException inner = ex.InnerException - as ArgumentNullException; - Assert.IsNotNull (inner, "#6"); - Assert.AreEqual (typeof (ArgumentNullException), inner.GetType (), "#7"); - Assert.IsNull (inner.InnerException, "#8"); - Assert.IsNotNull (inner.Message, "#9"); - Assert.IsNotNull (inner.ParamName, "#10"); - Assert.AreEqual ("data", inner.ParamName, "#11"); - } -#endif } -#if NET_2_0 [Test] // UploadValues (Uri, string, NameValueCollection) public void UploadValues4_Address_Null () { @@ -2040,9 +1677,7 @@ namespace MonoTests.System.Net Assert.AreEqual ("data", ex.ParamName, "#6"); } } -#endif -#if NET_2_0 [Test] public void GetWebRequestOverriding () { @@ -2061,7 +1696,6 @@ namespace MonoTests.System.Net return base.GetWebRequest (address); } } -#endif static byte [] EchoRequestHandler (Socket socket) { diff --git a/mcs/class/System/Test/System.Net/WebPermissionAttributeTest.cs b/mcs/class/System/Test/System.Net/WebPermissionAttributeTest.cs index 77c4b75c098..15bdaea1ce1 100644 --- a/mcs/class/System/Test/System.Net/WebPermissionAttributeTest.cs +++ b/mcs/class/System/Test/System.Net/WebPermissionAttributeTest.cs @@ -95,7 +95,6 @@ namespace MonoTests.System.Net { Assert.IsFalse (wp.IsUnrestricted (), "!IsUnrestricted"); } -#if NET_2_0 [Test] public void Accept_Null () { @@ -104,31 +103,6 @@ namespace MonoTests.System.Net { Assert.IsNull (a.Accept, "Accept"); Assert.IsNull (a.Connect, "Connect"); } -#else - - [Test] - // Strangely, although you can set Accept to value of null, you cannot - // then examine the value without throwing a NullRef - [ExpectedException (typeof (NullReferenceException))] - public void Accept_Null () - { - WebPermissionAttribute a = new WebPermissionAttribute (SecurityAction.Assert); - a.Accept = null; // legal - Assert.IsNull (a.Connect, "Connect"); - } - - [Test] - // Strangely, although you can set Accept to value of null, you cannot - // then examine the value without throwing a NullRef - [ExpectedException (typeof (NullReferenceException))] - public void Accept_Null2 () - { - WebPermissionAttribute a = new WebPermissionAttribute (SecurityAction.Assert); - a.Accept = null; // legal - Assert.IsNull (a.Accept, "Accept"); - } - -#endif [Test] [ExpectedException (typeof (ArgumentException))] @@ -172,7 +146,6 @@ namespace MonoTests.System.Net { a.AcceptPattern = "\\"; } -#if NET_2_0 [Test] public void AcceptPattern () { @@ -181,7 +154,6 @@ namespace MonoTests.System.Net { Assert.AreEqual ("\b(?", a.AcceptPattern, "AcceptPattern"); Assert.IsNull (a.ConnectPattern, "ConnectPattern"); } -#endif [Test] [ExpectedException (typeof (ArgumentException))] @@ -201,7 +173,6 @@ namespace MonoTests.System.Net { a.Accept = "\\"; } -#if NET_2_0 [Test] public void Connect_Null () { @@ -210,25 +181,6 @@ namespace MonoTests.System.Net { Assert.IsNull (a.Accept, "Accept"); Assert.IsNull (a.Connect, "Connect"); } -#else - [Test] - [ExpectedException (typeof (NullReferenceException))] - public void Connect_Null () - { - WebPermissionAttribute a = new WebPermissionAttribute (SecurityAction.Assert); - a.Connect = null; // legal - Assert.IsNull (a.Accept, "Accept"); - } - - [Test] - [ExpectedException (typeof (NullReferenceException))] - public void Connect_Null2 () - { - WebPermissionAttribute a = new WebPermissionAttribute (SecurityAction.Assert); - a.Connect = null; // legal - Assert.IsNull (a.Connect, "Connect"); - } -#endif [Test] [ExpectedException (typeof (ArgumentException))] @@ -248,7 +200,6 @@ namespace MonoTests.System.Net { a.Connect = null; } -#if NET_2_0 [Test] public void Connect () { @@ -257,7 +208,6 @@ namespace MonoTests.System.Net { Assert.IsNull (a.Accept, "Accept"); Assert.AreEqual ("/", a.Connect, "Connect"); } -#endif [Test] [ExpectedException (typeof (ArgumentNullException))] @@ -276,7 +226,6 @@ namespace MonoTests.System.Net { a.ConnectPattern = "\\"; } -#if NET_2_0 [Test] public void ConnectPattern () { @@ -285,7 +234,6 @@ namespace MonoTests.System.Net { Assert.IsNull (a.AcceptPattern, "AcceptPattern"); Assert.AreEqual ("\b(?", a.ConnectPattern, "ConnectPattern"); } -#endif [Test] [ExpectedException (typeof (ArgumentException))] @@ -305,7 +253,6 @@ namespace MonoTests.System.Net { a.Connect = "\\"; } -#if NET_2_0 [Test] public void CreatePermission_InvalidRegex () { @@ -315,7 +262,6 @@ namespace MonoTests.System.Net { WebPermission wp = (WebPermission) a.CreatePermission (); Assert.IsNotNull (wp, "CreatePermission"); } -#endif [Test] public void Attributes () diff --git a/mcs/class/System/Test/System.Net/WebProxyTest.cs b/mcs/class/System/Test/System.Net/WebProxyTest.cs index 2e3ffcb33df..d88c9864e23 100644 --- a/mcs/class/System/Test/System.Net/WebProxyTest.cs +++ b/mcs/class/System/Test/System.Net/WebProxyTest.cs @@ -177,7 +177,6 @@ namespace MonoTests.System.Net try { p.IsBypassed (null); Assert.Fail ("#A1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#A2"); Assert.IsNotNull (ex.Message, "#A3"); @@ -185,16 +184,11 @@ namespace MonoTests.System.Net Assert.AreEqual ("host", ex.ParamName, "#A5"); Assert.IsNull (ex.InnerException, "#A6"); } -#else - } catch (NullReferenceException) { - } -#endif p = new WebProxy ((Uri) null); try { p.IsBypassed (null); Assert.Fail ("#B1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#B2"); Assert.IsNotNull (ex.Message, "#B3"); @@ -202,16 +196,11 @@ namespace MonoTests.System.Net Assert.AreEqual ("host", ex.ParamName, "#B5"); Assert.IsNull (ex.InnerException, "#B6"); } -#else - } catch (NullReferenceException) { - } -#endif p = new WebProxy ((Uri) null, true); try { p.IsBypassed (null); Assert.Fail ("#C1"); -#if NET_2_0 } catch (ArgumentNullException ex) { Assert.AreEqual (typeof (ArgumentNullException), ex.GetType (), "#C2"); Assert.IsNotNull (ex.Message, "#C3"); @@ -219,10 +208,6 @@ namespace MonoTests.System.Net Assert.AreEqual ("host", ex.ParamName, "#C5"); Assert.IsNull (ex.InnerException, "#C6"); } -#else - } catch (NullReferenceException) { - } -#endif } [Test] @@ -233,11 +218,7 @@ namespace MonoTests.System.Net WebProxy proxy = new WebProxy ("proxy.ximian.com"); ((ISerializable) proxy).GetObjectData (si, new StreamingContext ()); -#if NET_2_0 Assert.AreEqual (4, si.MemberCount, "#A1"); -#else - Assert.AreEqual (3, si.MemberCount, "#A1"); -#endif int i = 0; foreach (SerializationEntry entry in si) { Assert.IsNotNull (entry.Name, "#A2:" + i); @@ -260,14 +241,12 @@ namespace MonoTests.System.Net Assert.AreEqual (typeof (object), entry.ObjectType, "#A5:" + i); Assert.IsNull (entry.Value, "#A6:" + i); break; -#if NET_2_0 case 3: Assert.AreEqual ("_UseDefaultCredentials", entry.Name, "#A4:" + i); Assert.AreEqual (typeof (bool), entry.ObjectType, "#A5:" + i); Assert.IsNotNull (entry.Value, "#A6:" + i); Assert.AreEqual (false, entry.Value, "#A7:" + i); break; -#endif } i++; } diff --git a/mcs/class/System/Test/System.Net/WebRequestTest.cs b/mcs/class/System/Test/System.Net/WebRequestTest.cs index c2e893a168e..8dbdde051bc 100644 --- a/mcs/class/System/Test/System.Net/WebRequestTest.cs +++ b/mcs/class/System/Test/System.Net/WebRequestTest.cs @@ -46,16 +46,8 @@ namespace MonoTests.System.Net { [Test]
public void SerializationConstructor ()
{
-#if NET_2_0
NonAbstractWebRequest w = new NonAbstractWebRequest (null, new StreamingContext ());
Assert.IsNotNull (w);
-#else
- try {
- new NonAbstractWebRequest (null, new StreamingContext ());
- Assert.Fail ("#1");
- } catch (NotImplementedException) {
- }
-#endif
}
// properties (only test 'get'ter)
@@ -207,10 +199,8 @@ namespace MonoTests.System.Net { Assert.IsTrue (req is HttpWebRequest, "#2");
req = WebRequest.Create ("file://www.contoso.com");
Assert.IsTrue (req is FileWebRequest, "#3");
-#if NET_2_0
req = WebRequest.Create ("ftp://www.contoso.com");
Assert.IsTrue (req is FtpWebRequest, "#4");
-#endif
WebRequest.RegisterPrefix ("http://www.contoso.com", new TestWebRequestCreator ());
bool ret = WebRequest.RegisterPrefix ("http://WWW.contoso.com", new TestWebRequestCreator ());
Assert.AreEqual (false, ret, "#5a");
@@ -271,7 +261,6 @@ namespace MonoTests.System.Net { }
}
-#if NET_2_0
[Test]
public void DefaultWebProxy ()
{
@@ -295,7 +284,6 @@ namespace MonoTests.System.Net { new Uri ("http://www.mono-project.com"));
Assert.IsNull (req.Proxy, "#D");
}
-#endif
[Test]
public void RegisterPrefix_Creator_Null ()
diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PkitsTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PkitsTest.cs index 746c367d0aa..5da8a5d59c7 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PkitsTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PkitsTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -114,4 +113,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_01_SignatureVerification.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_01_SignatureVerification.cs index 174c33f7759..988a5240815 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_01_SignatureVerification.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_01_SignatureVerification.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -154,4 +153,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_02_ValidityPeriod.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_02_ValidityPeriod.cs index 94d4230085e..2b7aa76bd34 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_02_ValidityPeriod.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_02_ValidityPeriod.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -178,4 +177,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif
\ No newline at end of file diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_03_VerifyingNameChaining.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_03_VerifyingNameChaining.cs index 1109cae91df..b8d14815385 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_03_VerifyingNameChaining.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_03_VerifyingNameChaining.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -421,4 +420,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_04_BasicCertificateRevocationTests.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_04_BasicCertificateRevocationTests.cs index ae565b7cad1..be364c1ad35 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_04_BasicCertificateRevocationTests.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_04_BasicCertificateRevocationTests.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -457,4 +456,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_05_VerifyingPathWithSelfIssuedCertificates.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_05_VerifyingPathWithSelfIssuedCertificates.cs index 91187974c26..b75afcbbb83 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_05_VerifyingPathWithSelfIssuedCertificates.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_05_VerifyingPathWithSelfIssuedCertificates.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -325,4 +324,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_06_VerifyingBasicConstraints.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_06_VerifyingBasicConstraints.cs index c399a475410..b56cc55f966 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_06_VerifyingBasicConstraints.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_06_VerifyingBasicConstraints.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -513,4 +512,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_07_KeyUsage.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_07_KeyUsage.cs index feb801b013e..e753333891e 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_07_KeyUsage.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_07_KeyUsage.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -192,4 +191,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_08_CertificatePolicies.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_08_CertificatePolicies.cs index 61af730d6ab..0cb2625bfbb 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_08_CertificatePolicies.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_08_CertificatePolicies.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_09_RequireExplicitPolicy.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_09_RequireExplicitPolicy.cs index ffa98ba4aba..b7348c69950 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_09_RequireExplicitPolicy.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_09_RequireExplicitPolicy.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_10_PolicyMappings.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_10_PolicyMappings.cs index 044f84903a4..7733df71f1e 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_10_PolicyMappings.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_10_PolicyMappings.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_11_InhibitPolicyMapping.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_11_InhibitPolicyMapping.cs index 69d7c556b73..5fb5e7450e0 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_11_InhibitPolicyMapping.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_11_InhibitPolicyMapping.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_12_InhibitAnyPolicy.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_12_InhibitAnyPolicy.cs index ad759e33ccd..23fd569a344 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_12_InhibitAnyPolicy.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_12_InhibitAnyPolicy.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_13_NameConstraints.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_13_NameConstraints.cs index 5f632c194a7..db8235cbfc0 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_13_NameConstraints.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_13_NameConstraints.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_14_DistributionPoints.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_14_DistributionPoints.cs index ae2cba7bc2b..adc67ec0a1f 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_14_DistributionPoints.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_14_DistributionPoints.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_15_DeltaCRL.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_15_DeltaCRL.cs index a14398b119f..0602c16e734 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_15_DeltaCRL.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_15_DeltaCRL.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -48,4 +47,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_16_PrivateCertificateExtensions.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_16_PrivateCertificateExtensions.cs index 80162da765d..efb82d0663e 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_16_PrivateCertificateExtensions.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/Pkits_4_16_PrivateCertificateExtensions.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -95,4 +94,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyCas.cs index aee100b223a..555287fafc9 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -86,4 +85,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyTest.cs index 340113568cf..b87dc5b5fce 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/PublicKeyTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -422,4 +421,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameCas.cs index e92f84dbaab..f655044ac0e 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -84,4 +83,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameTest.cs index 799152f5bbd..1e49fac4166 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X500DistinguishedNameTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -354,4 +353,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionCas.cs index 6233b3e4568..91c26963074 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -84,4 +83,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionTest.cs index 75f4b2381e3..dd75eceb5dc 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509BasicConstraintsExtensionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -299,4 +298,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs index f230b59470a..d8eed04fda1 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Cert20Test.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -748,4 +747,3 @@ mgk3bWUV6ChegutbguiKrI/DbO7wPiDLxw== } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs index e8ef4d15ad0..3f7ef18e702 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2CollectionTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -941,4 +940,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs index 9fceaca05ca..e642d688f3c 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509Certificate2Test.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.IO; @@ -1652,4 +1651,3 @@ WYpnKQqsKIzlSqv9wwXs7B1iA7ZdvHk3TAnSnLP1o2H7ME05UnZPKCvraONdezon } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs index bcb8854963a..edff47b0ad2 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509CertificateCollectionTest.cs @@ -238,11 +238,7 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { // works by object reference (not value) X509Certificate x = new X509Certificate (cert_a); Assert.IsTrue (!Object.ReferenceEquals (x509a, x), "!ReferenceEquals"); -#if NET_2_0 Assert.AreEqual (0, c.IndexOf (x), "A-x"); -#else - Assert.AreEqual (-1, c.IndexOf (x), "A-x"); -#endif } [Test] @@ -279,9 +275,6 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif public void Remove_ByValue () { X509CertificateCollection c = new X509CertificateCollection (); diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainCas.cs index 33f0bfdcbf9..259f523c677 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -75,4 +74,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyCas.cs index a2d4fd56b7f..160b66aedd7 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -80,4 +79,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyTest.cs index 8c74173c4c6..50b657cd993 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainPolicyTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -268,4 +267,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainTest.cs index 0ef6418bc14..026cfc2757a 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ChainTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -297,4 +296,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionCas.cs index 272c2af9dbe..a463b2c93be 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -77,4 +76,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionTest.cs index d2faad5046d..3fb946de5c7 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtensionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -242,4 +241,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCas.cs index c69188a6e77..37baedb2b28 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -79,4 +78,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCollectionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCollectionTest.cs index 2872a495685..b5dc983cb9e 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCollectionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -200,4 +199,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionTest.cs index 09d044feafb..ed7f3e841f1 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509ExtensionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -191,4 +190,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionCas.cs index cc4db3eecb5..6108137a19a 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -77,4 +76,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionTest.cs index 358291b71c9..cfb4b3d1fab 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509KeyUsageExtensionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -260,4 +259,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreCas.cs index c7abea1bcf1..e5f83650959 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -91,4 +90,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreTest.cs index 3fba5e5564d..588666f092e 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509StoreTest.cs @@ -7,7 +7,6 @@ // (C) 2003 Motus Technologies Inc. (http://www.motus.com) // -#if NET_2_0 using NUnit.Framework; @@ -591,4 +590,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionCas.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionCas.cs index 4c0c0bc1b1e..d1f660dfa2c 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionCas.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -80,4 +79,3 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionTest.cs b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionTest.cs index e9251b1a93b..90bf8c8928f 100644 --- a/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography.X509Certificates/X509SubjectKeyIdentifierExtensionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -405,4 +404,3 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs b/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs index 71566982148..1c80aa29140 100644 --- a/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography/AsnEncodedDataTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -283,4 +282,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs b/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs index 8a3d778b7c9..dfba21db293 100644 --- a/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography/OidCollectionTest.cs @@ -7,7 +7,6 @@ // (C) 2003 Motus Technologies Inc. (http://www.motus.com) // -#if NET_2_0 using NUnit.Framework; @@ -72,4 +71,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs b/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs index 91dd1e55fe5..0560a91f06c 100644 --- a/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography/OidEnumeratorTest.cs @@ -7,7 +7,6 @@ // (C) 2003 Motus Technologies Inc. (http://www.motus.com) // -#if NET_2_0 using NUnit.Framework; @@ -78,4 +77,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs b/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs index 8555f9e21e2..40480ba9ee5 100644 --- a/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs +++ b/mcs/class/System/Test/System.Security.Cryptography/OidTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -184,4 +183,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Permissions/ResourcePermissionBaseTest.cs b/mcs/class/System/Test/System.Security.Permissions/ResourcePermissionBaseTest.cs index b67aaef8fc9..e183ee38d04 100644 --- a/mcs/class/System/Test/System.Security.Permissions/ResourcePermissionBaseTest.cs +++ b/mcs/class/System/Test/System.Security.Permissions/ResourcePermissionBaseTest.cs @@ -123,9 +123,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void Constructor_Invalid () { NonAbstractResourcePermissionBase rp = new NonAbstractResourcePermissionBase ((PermissionState)Int32.MaxValue); @@ -282,11 +280,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void FromXml_Null () { NonAbstractResourcePermissionBase rp = new NonAbstractResourcePermissionBase (); @@ -294,9 +288,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTag () { NonAbstractResourcePermissionBase rp = new NonAbstractResourcePermissionBase (); @@ -306,9 +298,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongTagCase () { NonAbstractResourcePermissionBase rp = new NonAbstractResourcePermissionBase (); @@ -344,9 +334,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_WrongVersion () { NonAbstractResourcePermissionBase rp = new NonAbstractResourcePermissionBase (); diff --git a/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeCas.cs b/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeCas.cs index 80d0e83481f..d8e2964e325 100644 --- a/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeCas.cs +++ b/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -83,4 +82,3 @@ namespace MonoCasTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeTest.cs b/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeTest.cs index f060dfc78de..cc556d30f3a 100644 --- a/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeTest.cs +++ b/mcs/class/System/Test/System.Security.Permissions/StorePermissionAttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -246,4 +245,3 @@ namespace MonoTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Permissions/StorePermissionCas.cs b/mcs/class/System/Test/System.Security.Permissions/StorePermissionCas.cs index 542480a5eab..887843f97df 100644 --- a/mcs/class/System/Test/System.Security.Permissions/StorePermissionCas.cs +++ b/mcs/class/System/Test/System.Security.Permissions/StorePermissionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -96,4 +95,3 @@ namespace MonoCasTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/System/Test/System.Security.Permissions/StorePermissionTest.cs b/mcs/class/System/Test/System.Security.Permissions/StorePermissionTest.cs index c67dbb6761d..3e93614e53f 100644 --- a/mcs/class/System/Test/System.Security.Permissions/StorePermissionTest.cs +++ b/mcs/class/System/Test/System.Security.Permissions/StorePermissionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -476,4 +475,3 @@ namespace MonoTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/System/Test/System.Text.RegularExpressions/RegexCas.cs b/mcs/class/System/Test/System.Text.RegularExpressions/RegexCas.cs index 0a7ae4a380a..a3e7fa48518 100644 --- a/mcs/class/System/Test/System.Text.RegularExpressions/RegexCas.cs +++ b/mcs/class/System/Test/System.Text.RegularExpressions/RegexCas.cs @@ -118,10 +118,8 @@ namespace MonoCasTests.System.Text.RegularExpressions { Assert.AreEqual (2, Regex.Split (String.Empty, String.Empty).Length, "Split"); Assert.AreEqual (2, Regex.Split (String.Empty, String.Empty, RegexOptions.Singleline).Length, "Split2"); -#if NET_2_0 Assert.AreEqual (15, Regex.CacheSize, "CacheSize"); Regex.CacheSize = 1; -#endif } [Test] @@ -240,4 +238,4 @@ namespace MonoCasTests.System.Text.RegularExpressions { } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/System/Test/System.Text.RegularExpressions/RegexCompilationInfoTest.cs b/mcs/class/System/Test/System.Text.RegularExpressions/RegexCompilationInfoTest.cs index 063a6608953..339ffc4a514 100644 --- a/mcs/class/System/Test/System.Text.RegularExpressions/RegexCompilationInfoTest.cs +++ b/mcs/class/System/Test/System.Text.RegularExpressions/RegexCompilationInfoTest.cs @@ -64,9 +64,7 @@ namespace MonoTests.System.Text.RegularExpressions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void Constructor_EmptyName () { new RegexCompilationInfo ("pattern", RegexOptions.None, String.Empty, "fullnamespace", false); @@ -114,9 +112,7 @@ namespace MonoTests.System.Text.RegularExpressions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void Name_Empty () { RegexCompilationInfo info = new RegexCompilationInfo ("pattern", RegexOptions.None, "name", "fullnamespace", true); diff --git a/mcs/class/System/Test/System.Text.RegularExpressions/RegexRunnerCas.cs b/mcs/class/System/Test/System.Text.RegularExpressions/RegexRunnerCas.cs index b6fb96b76cf..1743cc433bc 100644 --- a/mcs/class/System/Test/System.Text.RegularExpressions/RegexRunnerCas.cs +++ b/mcs/class/System/Test/System.Text.RegularExpressions/RegexRunnerCas.cs @@ -114,9 +114,7 @@ namespace MonoCasTests.System.Text.RegularExpressions { TransferCapture (0, 0, 0, 0); Uncapture (); Assert.IsNotNull (Scan (new Regex (String.Empty), "mono", 0, 0, 0, 0, true), "Scan"); -#if NET_2_0 Assert.IsTrue (CharInSet ('a', "a", String.Empty), "CharInSet"); -#endif } } diff --git a/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs b/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs index 5978a5d095f..79ad728c5bf 100644 --- a/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs +++ b/mcs/class/System/Test/System.Text.RegularExpressions/RegexTest.cs @@ -11,9 +11,7 @@ using System; using System.Text.RegularExpressions; -#if NET_2_0 using System.Collections.Generic; -#endif using NUnit.Framework; @@ -54,7 +52,6 @@ namespace MonoTests.System.Text.RegularExpressions protected bool Compiled { get; set; } -#if NET_2_0 private int cache_initial_value; [TestFixtureSetUp] @@ -68,7 +65,6 @@ namespace MonoTests.System.Text.RegularExpressions { Regex.CacheSize = cache_initial_value; } -#endif [Test] public void Simple () @@ -445,7 +441,6 @@ namespace MonoTests.System.Text.RegularExpressions foreach (MatchCollectionTrial t in trials) runTrial (t,Compiled); } -#if NET_2_0 [Test] public void CacheSize () { @@ -525,6 +520,5 @@ namespace MonoTests.System.Text.RegularExpressions x += "1"; } } -#endif } } diff --git a/mcs/class/System/Test/System.Threading/SemaphoreCas.cs b/mcs/class/System/Test/System.Threading/SemaphoreCas.cs index 563e3ea7fe8..ff895c00315 100644 --- a/mcs/class/System/Test/System.Threading/SemaphoreCas.cs +++ b/mcs/class/System/Test/System.Threading/SemaphoreCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -108,4 +107,3 @@ namespace MonoCasTests.System.Threading { } } -#endif diff --git a/mcs/class/System/Test/System.Threading/SemaphoreFullExceptionCas.cs b/mcs/class/System/Test/System.Threading/SemaphoreFullExceptionCas.cs index cea95d01163..1d97db6dead 100644 --- a/mcs/class/System/Test/System.Threading/SemaphoreFullExceptionCas.cs +++ b/mcs/class/System/Test/System.Threading/SemaphoreFullExceptionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -70,4 +69,3 @@ namespace MonoCasTests.System.Threading { } } -#endif diff --git a/mcs/class/System/Test/System.Threading/SemaphoreTest.cs b/mcs/class/System/Test/System.Threading/SemaphoreTest.cs index 51d0b522ec9..e30968bf5ad 100644 --- a/mcs/class/System/Test/System.Threading/SemaphoreTest.cs +++ b/mcs/class/System/Test/System.Threading/SemaphoreTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -271,4 +270,3 @@ namespace MonoTests.System.Threading { } } -#endif diff --git a/mcs/class/System/Test/System.Web/AspNetHostingPermissionTest.cs b/mcs/class/System/Test/System.Web/AspNetHostingPermissionTest.cs index fbc2d7b91b4..00fc2689cef 100644 --- a/mcs/class/System/Test/System.Web/AspNetHostingPermissionTest.cs +++ b/mcs/class/System/Test/System.Web/AspNetHostingPermissionTest.cs @@ -91,12 +91,8 @@ namespace MonoTests.System.Web { Assert.IsTrue (anhp.IsUnrestricted (), "IsUnrestricted");
SecurityElement se = anhp.ToXml ();
-#if NET_2_0
// fixed in 2.0 RC
Assert.IsNotNull (se.Attribute ("Unrestricted"), "Xml-Unrestricted");
-#else
- Assert.IsNull (se.Attribute ("Unrestricted"), "Xml-Unrestricted");
-#endif
Assert.AreEqual ("Unrestricted", se.Attribute ("Level"), "Xml-Level");
Assert.IsNull (se.Children, "Xml-Children");
@@ -149,10 +145,6 @@ namespace MonoTests.System.Web { foreach (AspNetHostingPermissionLevel ppl in AllLevel) {
anhp.Level = ppl;
IPermission p = anhp.Intersect (null);
-#if ! NET_2_0
- if (p != null)
- Assert.Ignore ("Behaviour changed in FX 1.1 SP1");
-#endif
Assert.IsNull (p, ppl.ToString ());
}
}
diff --git a/mcs/class/System/Test/System/FileStyleUriParserCas.cs b/mcs/class/System/Test/System/FileStyleUriParserCas.cs index e4932233636..778e57a3e7a 100644 --- a/mcs/class/System/Test/System/FileStyleUriParserCas.cs +++ b/mcs/class/System/Test/System/FileStyleUriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/FileStyleUriParserTest.cs b/mcs/class/System/Test/System/FileStyleUriParserTest.cs index bbe67b6a883..2a8169ca5cf 100644 --- a/mcs/class/System/Test/System/FileStyleUriParserTest.cs +++ b/mcs/class/System/Test/System/FileStyleUriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -134,4 +133,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/FtpStyleUriParserCas.cs b/mcs/class/System/Test/System/FtpStyleUriParserCas.cs index f6d22558830..d843ccbd632 100644 --- a/mcs/class/System/Test/System/FtpStyleUriParserCas.cs +++ b/mcs/class/System/Test/System/FtpStyleUriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/FtpStyleUriParserTest.cs b/mcs/class/System/Test/System/FtpStyleUriParserTest.cs index 4d520ce6180..6ccee59e9e9 100644 --- a/mcs/class/System/Test/System/FtpStyleUriParserTest.cs +++ b/mcs/class/System/Test/System/FtpStyleUriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -134,4 +133,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/GenericUriParserCas.cs b/mcs/class/System/Test/System/GenericUriParserCas.cs index 71a53da0afe..45e12fc5ecd 100644 --- a/mcs/class/System/Test/System/GenericUriParserCas.cs +++ b/mcs/class/System/Test/System/GenericUriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -84,4 +83,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/GenericUriParserTest.cs b/mcs/class/System/Test/System/GenericUriParserTest.cs index a679f882e52..1944ab9c654 100644 --- a/mcs/class/System/Test/System/GenericUriParserTest.cs +++ b/mcs/class/System/Test/System/GenericUriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -149,4 +148,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/HttpStyleUriParserCas.cs b/mcs/class/System/Test/System/HttpStyleUriParserCas.cs index 444027540b1..f8de459eb80 100644 --- a/mcs/class/System/Test/System/HttpStyleUriParserCas.cs +++ b/mcs/class/System/Test/System/HttpStyleUriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -88,4 +87,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/HttpStyleUriParserTest.cs b/mcs/class/System/Test/System/HttpStyleUriParserTest.cs index 1dfde093572..6e631dcef73 100644 --- a/mcs/class/System/Test/System/HttpStyleUriParserTest.cs +++ b/mcs/class/System/Test/System/HttpStyleUriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -184,4 +183,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/NetPipeStyleUriParserCas.cs b/mcs/class/System/Test/System/NetPipeStyleUriParserCas.cs index 9d155cff802..1ab3397cf6f 100644 --- a/mcs/class/System/Test/System/NetPipeStyleUriParserCas.cs +++ b/mcs/class/System/Test/System/NetPipeStyleUriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/NetPipeStyleUriParserTest.cs b/mcs/class/System/Test/System/NetPipeStyleUriParserTest.cs index 1bb7d17fd30..a581b20cd53 100644 --- a/mcs/class/System/Test/System/NetPipeStyleUriParserTest.cs +++ b/mcs/class/System/Test/System/NetPipeStyleUriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -134,4 +133,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/NetTcpStyleUriParserCas.cs b/mcs/class/System/Test/System/NetTcpStyleUriParserCas.cs index 3edef6b63fe..e6939d380d1 100644 --- a/mcs/class/System/Test/System/NetTcpStyleUriParserCas.cs +++ b/mcs/class/System/Test/System/NetTcpStyleUriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/NetTcpStyleUriParserTest.cs b/mcs/class/System/Test/System/NetTcpStyleUriParserTest.cs index 64060780fe1..9a0de8434d9 100644 --- a/mcs/class/System/Test/System/NetTcpStyleUriParserTest.cs +++ b/mcs/class/System/Test/System/NetTcpStyleUriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -134,4 +133,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/NewsStyleUriParserCas.cs b/mcs/class/System/Test/System/NewsStyleUriParserCas.cs index 361fb03555c..6a4fddcb733 100644 --- a/mcs/class/System/Test/System/NewsStyleUriParserCas.cs +++ b/mcs/class/System/Test/System/NewsStyleUriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/NewsStyleUriParserTest.cs b/mcs/class/System/Test/System/NewsStyleUriParserTest.cs index 641bce00ebe..9ef327aaca0 100644 --- a/mcs/class/System/Test/System/NewsStyleUriParserTest.cs +++ b/mcs/class/System/Test/System/NewsStyleUriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -134,4 +133,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/UriBuilderCas.cs b/mcs/class/System/Test/System/UriBuilderCas.cs index 18be4dd03bc..d6d7a295ff2 100644 --- a/mcs/class/System/Test/System/UriBuilderCas.cs +++ b/mcs/class/System/Test/System/UriBuilderCas.cs @@ -67,10 +67,8 @@ namespace MonoCasTests.System { unit.GetReady (); unit.ToStringTest (); -#if NET_2_0 unit.GetReady (); unit.DefaultPort (); -#endif } [Test] diff --git a/mcs/class/System/Test/System/UriCas.cs b/mcs/class/System/Test/System/UriCas.cs index d2e292d19d7..7ff3662f7fb 100644 --- a/mcs/class/System/Test/System/UriCas.cs +++ b/mcs/class/System/Test/System/UriCas.cs @@ -91,16 +91,12 @@ namespace MonoCasTests.System { unit.Segments3 (); unit.Segments5 (); unit.UnixLocalPath (); -#if NET_2_0 unit.PortMax (); -#endif } [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#if NET_2_0 [Category ("NotDotNet")] // tests needs to be updated for 2.0 -#endif public void UnitTest2Reuse () { UriTest2 unit = new UriTest2 (); @@ -109,7 +105,6 @@ namespace MonoCasTests.System { unit.MoreUnescape (); unit.UriScheme (); } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] [Category ("NotWorking")] @@ -122,7 +117,6 @@ namespace MonoCasTests.System { unit.TryCreate_Uri_String_Uri (); unit.TryCreate_Uri_Uri_Uri (); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void LinkDemand_Deny_Unrestricted () diff --git a/mcs/class/System/Test/System/UriParserCas.cs b/mcs/class/System/Test/System/UriParserCas.cs index 6630eaf9b1b..6bb63e69356 100644 --- a/mcs/class/System/Test/System/UriParserCas.cs +++ b/mcs/class/System/Test/System/UriParserCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -98,4 +97,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/UriParserTest.cs b/mcs/class/System/Test/System/UriParserTest.cs index 0373ef20c4c..66823040979 100644 --- a/mcs/class/System/Test/System/UriParserTest.cs +++ b/mcs/class/System/Test/System/UriParserTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -596,4 +595,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/UriTypeConverterCas.cs b/mcs/class/System/Test/System/UriTypeConverterCas.cs index bf916a498a1..6510acf6411 100644 --- a/mcs/class/System/Test/System/UriTypeConverterCas.cs +++ b/mcs/class/System/Test/System/UriTypeConverterCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -87,4 +86,3 @@ namespace MonoCasTests.System { } } -#endif diff --git a/mcs/class/System/Test/System/UriTypeConverterTest.cs b/mcs/class/System/Test/System/UriTypeConverterTest.cs index b37d5a86578..c444a7916f0 100644 --- a/mcs/class/System/Test/System/UriTypeConverterTest.cs +++ b/mcs/class/System/Test/System/UriTypeConverterTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -421,4 +420,3 @@ namespace MonoTests.System { } } -#endif diff --git a/mcs/class/SystemWebTestShim/SystemWebTestShim/Adapters.cs b/mcs/class/SystemWebTestShim/SystemWebTestShim/Adapters.cs index 9016b9b8f64..c0af20f5427 100644 --- a/mcs/class/SystemWebTestShim/SystemWebTestShim/Adapters.cs +++ b/mcs/class/SystemWebTestShim/SystemWebTestShim/Adapters.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System.Collections; using System.IO; @@ -106,4 +105,3 @@ namespace SystemWebTestShim { } } -#endif diff --git a/mcs/class/SystemWebTestShim/SystemWebTestShim/BuildManager.cs b/mcs/class/SystemWebTestShim/SystemWebTestShim/BuildManager.cs index 1a6481c6ba8..8b3cfdb52d7 100644 --- a/mcs/class/SystemWebTestShim/SystemWebTestShim/BuildManager.cs +++ b/mcs/class/SystemWebTestShim/SystemWebTestShim/BuildManager.cs @@ -32,7 +32,7 @@ namespace SystemWebTestShim { public class BuildManager { public static void SuppressDebugModeMessages () { -#if NET_2_0 && !TARGET_DOTNET +#if !TARGET_DOTNET global::System.Web.Compilation.BuildManager.suppressDebugModeMessages = true; #endif } diff --git a/mcs/class/SystemWebTestShim/SystemWebTestShim/HttpCapabilitiesBase.cs b/mcs/class/SystemWebTestShim/SystemWebTestShim/HttpCapabilitiesBase.cs index d51b2664203..b60b3a57a59 100644 --- a/mcs/class/SystemWebTestShim/SystemWebTestShim/HttpCapabilitiesBase.cs +++ b/mcs/class/SystemWebTestShim/SystemWebTestShim/HttpCapabilitiesBase.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using Orig = System.Web.Configuration.HttpCapabilitiesBase; @@ -45,4 +44,3 @@ namespace SystemWebTestShim { } } -#endif diff --git a/mcs/class/SystemWebTestShim/SystemWebTestShim/Page.cs b/mcs/class/SystemWebTestShim/SystemWebTestShim/Page.cs index b8987b3dd59..644d2387656 100644 --- a/mcs/class/SystemWebTestShim/SystemWebTestShim/Page.cs +++ b/mcs/class/SystemWebTestShim/SystemWebTestShim/Page.cs @@ -33,7 +33,6 @@ using System.Web; namespace SystemWebTestShim { public class Page : Orig.Page { -#if NET_2_0 public new string RawViewState { #if TARGET_DOTNET set; private get; @@ -48,6 +47,5 @@ namespace SystemWebTestShim { base.SetContext (ctx); #endif } -#endif } } diff --git a/mcs/class/SystemWebTestShim/SystemWebTestShim/UrlUtils.cs b/mcs/class/SystemWebTestShim/SystemWebTestShim/UrlUtils.cs index 2563a016975..1f73ec7ea23 100644 --- a/mcs/class/SystemWebTestShim/SystemWebTestShim/UrlUtils.cs +++ b/mcs/class/SystemWebTestShim/SystemWebTestShim/UrlUtils.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using Orig = System.Web.Util.UrlUtils; @@ -41,4 +40,3 @@ namespace SystemWebTestShim { } } -#endif
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs b/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs index 1a89b8eedb2..44635354d9f 100644 --- a/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs +++ b/mcs/class/corlib/Test/System.Collections.Generic/DictionaryTest.cs @@ -29,7 +29,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -1232,4 +1231,3 @@ BgcAAAABMQEAAAAL"; } } -#endif // NET_2_0 diff --git a/mcs/class/corlib/Test/System.Collections.Generic/EqualityComparerTest.cs b/mcs/class/corlib/Test/System.Collections.Generic/EqualityComparerTest.cs index 21918f0845a..5a0fd3b6a25 100644 --- a/mcs/class/corlib/Test/System.Collections.Generic/EqualityComparerTest.cs +++ b/mcs/class/corlib/Test/System.Collections.Generic/EqualityComparerTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -63,4 +62,3 @@ namespace MonoTests.System.Collections.Generic { } } -#endif diff --git a/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs b/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs index 695e16b57fd..c6387d678f2 100644 --- a/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs +++ b/mcs/class/corlib/Test/System.Collections.Generic/IListTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System.Collections.Generic; @@ -49,5 +48,4 @@ namespace MonoTests.System.Collections.Generic } } } -#endif diff --git a/mcs/class/corlib/Test/System.Collections.ObjectModel/CollectionTest.cs b/mcs/class/corlib/Test/System.Collections.ObjectModel/CollectionTest.cs index fcb088c203e..922cc4722e4 100644 --- a/mcs/class/corlib/Test/System.Collections.ObjectModel/CollectionTest.cs +++ b/mcs/class/corlib/Test/System.Collections.ObjectModel/CollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -187,4 +186,3 @@ namespace MonoTests.System.Collections.ObjectModel } } -#endif diff --git a/mcs/class/corlib/Test/System.Collections.ObjectModel/KeyedCollectionTest.cs b/mcs/class/corlib/Test/System.Collections.ObjectModel/KeyedCollectionTest.cs index 0d53f7040ba..c097fe73fbc 100644 --- a/mcs/class/corlib/Test/System.Collections.ObjectModel/KeyedCollectionTest.cs +++ b/mcs/class/corlib/Test/System.Collections.ObjectModel/KeyedCollectionTest.cs @@ -5,7 +5,6 @@ // (C) Carlo Kok // -#if NET_2_0 using NUnit.Framework; using System; using System.Globalization; @@ -222,4 +221,3 @@ namespace MonoTests.System.Collections.ObjectModel } } } -#endif diff --git a/mcs/class/corlib/Test/System.Collections.ObjectModel/ReadOnlyCollectionTest.cs b/mcs/class/corlib/Test/System.Collections.ObjectModel/ReadOnlyCollectionTest.cs index 390526cc5b5..90b728f3f1b 100644 --- a/mcs/class/corlib/Test/System.Collections.ObjectModel/ReadOnlyCollectionTest.cs +++ b/mcs/class/corlib/Test/System.Collections.ObjectModel/ReadOnlyCollectionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections; @@ -128,4 +127,3 @@ namespace MonoTests.System.Collections.ObjectModel } } -#endif diff --git a/mcs/class/corlib/Test/System.Collections/ArrayListTest.cs b/mcs/class/corlib/Test/System.Collections/ArrayListTest.cs index 49ad9ae055d..eec4652aca1 100644 --- a/mcs/class/corlib/Test/System.Collections/ArrayListTest.cs +++ b/mcs/class/corlib/Test/System.Collections/ArrayListTest.cs @@ -64,13 +64,8 @@ namespace MonoTests.System.Collections [Test] public void TestCapacity () { -#if NET_2_0 int default_capacity = 4; int unspecified_capacity = 0; -#else - int default_capacity = 16; - int unspecified_capacity = 16; -#endif for (int i = 1; i < 100; i++) { ArrayList al1 = new ArrayList (i); Assert.AreEqual (i, al1.Capacity, "Bad capacity of " + i); @@ -1761,12 +1756,8 @@ namespace MonoTests.System.Collections public void TrimToSize () { ArrayList al1 = new ArrayList (); -#if NET_2_0 // Capacity is 0 under 2.0 int capacity = 4; -#else - int capacity = al1.Capacity; -#endif int size = capacity / 2; for (int i = 1; i <= size; i++) { al1.Add ('?'); diff --git a/mcs/class/corlib/Test/System.Collections/CaseInsensitiveComparerTest.cs b/mcs/class/corlib/Test/System.Collections/CaseInsensitiveComparerTest.cs index fa9c080614e..aa022569a3b 100644 --- a/mcs/class/corlib/Test/System.Collections/CaseInsensitiveComparerTest.cs +++ b/mcs/class/corlib/Test/System.Collections/CaseInsensitiveComparerTest.cs @@ -182,11 +182,7 @@ namespace MonoTests.System.Collections { ms.Position = 0; ms.Read (buffer, 0, buffer.Length); -#if NET_2_0 Assert.AreEqual (_serializedCultureV20, buffer); -#else - Assert.AreEqual (_serializedCultureV11, buffer); -#endif } finally { // restore original culture Thread.CurrentThread.CurrentCulture = originalCulture; @@ -194,11 +190,7 @@ namespace MonoTests.System.Collections { } [Test] -#if NET_2_0 [Category ("NotWorking")] // bug #80082 -#else - [Category ("NotWorking")] // bug #80076 -#endif public void Deserialize_Culture () { CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture; @@ -215,7 +207,6 @@ namespace MonoTests.System.Collections { bf.Deserialize (ms); Assert.IsNotNull (cic, "#1"); -#if NET_2_0 ms = new MemoryStream (); ms.Write (_serializedCultureV20, 0, _serializedCultureV20.Length); ms.Position = 0; @@ -223,7 +214,6 @@ namespace MonoTests.System.Collections { bf = new BinaryFormatter (); cic = (CaseInsensitiveComparer) bf.Deserialize (ms); Assert.IsNotNull (cic, "#2"); -#endif } finally { // restore original culture Thread.CurrentThread.CurrentCulture = originalCulture; @@ -249,11 +239,7 @@ namespace MonoTests.System.Collections { ms.Position = 0; ms.Read (buffer, 0, buffer.Length); -#if NET_2_0 Assert.AreEqual (_serializedDefaultV20, buffer); -#else - Assert.AreEqual (_serializedDefaultV11, buffer); -#endif } finally { // restore original culture Thread.CurrentThread.CurrentCulture = originalCulture; @@ -261,11 +247,7 @@ namespace MonoTests.System.Collections { } [Test] -#if NET_2_0 [Category ("NotWorking")] // bug #80082 -#else - [Category ("NotWorking")] // bug #80076 -#endif public void Deserialize_Default () { CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture; @@ -282,7 +264,6 @@ namespace MonoTests.System.Collections { bf.Deserialize (ms); Assert.IsNotNull (cic, "#1"); -#if NET_2_0 ms = new MemoryStream (); ms.Write (_serializedDefaultV20, 0, _serializedDefaultV20.Length); ms.Position = 0; @@ -290,7 +271,6 @@ namespace MonoTests.System.Collections { bf = new BinaryFormatter (); cic = (CaseInsensitiveComparer) bf.Deserialize (ms); Assert.IsNotNull (cic, "#2"); -#endif } finally { // restore original culture Thread.CurrentThread.CurrentCulture = originalCulture; @@ -316,11 +296,7 @@ namespace MonoTests.System.Collections { ms.Position = 0; ms.Read (buffer, 0, buffer.Length); -#if NET_2_0 Assert.AreEqual (_serializedDefaultInvariantV20, buffer); -#else - Assert.AreEqual (_serializedDefaultInvariantV11, buffer); -#endif } finally { // restore original culture Thread.CurrentThread.CurrentCulture = originalCulture; @@ -328,11 +304,7 @@ namespace MonoTests.System.Collections { } [Test] -#if NET_2_0 [Category ("NotWorking")] // bug #80082 -#else - [Category ("NotWorking")] // bug #80076 -#endif public void Deserialize_DefaultInvariant () { CultureInfo originalCulture = Thread.CurrentThread.CurrentCulture; @@ -349,7 +321,6 @@ namespace MonoTests.System.Collections { bf.Deserialize (ms); Assert.IsNotNull (cic, "#1"); -#if NET_2_0 ms = new MemoryStream (); ms.Write (_serializedDefaultInvariantV20, 0, _serializedDefaultInvariantV20.Length); ms.Position = 0; @@ -357,7 +328,6 @@ namespace MonoTests.System.Collections { bf = new BinaryFormatter (); cic = (CaseInsensitiveComparer) bf.Deserialize (ms); Assert.IsNotNull (cic, "#2"); -#endif } finally { // restore original culture Thread.CurrentThread.CurrentCulture = originalCulture; @@ -424,7 +394,6 @@ namespace MonoTests.System.Collections { 0x75, 0x6c, 0x74, 0x75, 0x72, 0x65, 0x00, 0x00, 0x08, 0x08, 0x7f, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 0x0b }; -#if NET_2_0 private static byte [] _serializedDefaultV20 = new byte [] { 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, @@ -489,6 +458,5 @@ namespace MonoTests.System.Collections { 0x6d, 0x65, 0x00, 0x00, 0x01, 0x08, 0x08, 0x1f, 0x04, 0x00, 0x00, 0x1f, 0x04, 0x00, 0x00, 0x06, 0x03, 0x00, 0x00, 0x00, 0x05, 0x74, 0x72, 0x2d, 0x54, 0x52, 0x0b }; -#endif } } diff --git a/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs b/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs index bd06254227d..c7ac0929030 100644 --- a/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs +++ b/mcs/class/corlib/Test/System.Collections/CaseInsensitiveHashCodeProviderTest.cs @@ -62,7 +62,6 @@ namespace MonoTests.System.Collections Assert.IsFalse (object.ReferenceEquals (cih1, cih2)); } -#if NET_2_0 [Test] public void DefaultInvariant () { @@ -79,7 +78,6 @@ namespace MonoTests.System.Collections CaseInsensitiveHashCodeProvider cih2 = CaseInsensitiveHashCodeProvider.DefaultInvariant; Assert.IsTrue (object.ReferenceEquals (cih1, cih2)); } -#endif [Test] public void HashCode () @@ -136,7 +134,6 @@ namespace MonoTests.System.Collections } } -#if NET_2_0 [Test] public void Constructor1_Serialization () { @@ -153,7 +150,6 @@ namespace MonoTests.System.Collections Assert.AreEqual (ser1, ser2, "#1"); } -#endif [Test] public void SerializationRoundtrip () @@ -184,7 +180,6 @@ namespace MonoTests.System.Collections } private static byte [] serialized_en_us = new byte [] { -#if NET_2_0 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x32, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x6F, 0x6C, 0x6C, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x2E, @@ -203,26 +198,9 @@ namespace MonoTests.System.Collections 0x64, 0x65, 0x0D, 0x6D, 0x5F, 0x77, 0x69, 0x6E, 0x33, 0x32, 0x4C, 0x61, 0x6E, 0x67, 0x49, 0x44, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x01, 0x08, 0x0A, 0x00, 0x0A, 0x29, 0x00, 0x00, 0x00, 0x01, 0x09, 0x04, 0x00, 0x00, 0x0B -#else - 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x32, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x6F, - 0x6C, 0x6C, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x2E, 0x43, 0x61, 0x73, 0x65, 0x49, 0x6E, - 0x73, 0x65, 0x6E, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6F, 0x64, - 0x65, 0x50, 0x72, 0x6F, 0x76, 0x69, 0x64, 0x65, 0x72, 0x01, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x5F, - 0x74, 0x65, 0x78, 0x74, 0x03, 0x1D, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x47, 0x6C, 0x6F, - 0x62, 0x61, 0x6C, 0x69, 0x7A, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x54, 0x65, 0x78, 0x74, 0x49, - 0x6E, 0x66, 0x6F, 0x09, 0x02, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x1D, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x69, 0x7A, 0x61, 0x74, 0x69, - 0x6F, 0x6E, 0x2E, 0x54, 0x65, 0x78, 0x74, 0x49, 0x6E, 0x66, 0x6F, 0x03, 0x00, 0x00, 0x00, 0x0B, - 0x6D, 0x5F, 0x6E, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6D, 0x11, 0x6D, 0x5F, 0x75, 0x73, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x4F, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x0D, 0x6D, 0x5F, - 0x77, 0x69, 0x6E, 0x33, 0x32, 0x4C, 0x61, 0x6E, 0x67, 0x49, 0x44, 0x00, 0x00, 0x00, 0x08, 0x01, - 0x08, 0x29, 0x00, 0x00, 0x00, 0x01, 0x09, 0x04, 0x00, 0x00, 0x0B -#endif }; private static byte [] serialized_fr_ca = new byte [] { -#if NET_2_0 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x32, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x6F, 0x6C, 0x6C, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x2E, @@ -241,22 +219,6 @@ namespace MonoTests.System.Collections 0x64, 0x65, 0x0D, 0x6D, 0x5F, 0x77, 0x69, 0x6E, 0x33, 0x32, 0x4C, 0x61, 0x6E, 0x67, 0x49, 0x44, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x01, 0x08, 0x0A, 0x00, 0x0A, 0x50, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x0C, 0x00, 0x00, 0x0B -#else - 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x32, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x6F, - 0x6C, 0x6C, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x2E, 0x43, 0x61, 0x73, 0x65, 0x49, 0x6E, - 0x73, 0x65, 0x6E, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6F, 0x64, - 0x65, 0x50, 0x72, 0x6F, 0x76, 0x69, 0x64, 0x65, 0x72, 0x01, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x5F, - 0x74, 0x65, 0x78, 0x74, 0x03, 0x1D, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x47, 0x6C, 0x6F, - 0x62, 0x61, 0x6C, 0x69, 0x7A, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x54, 0x65, 0x78, 0x74, 0x49, - 0x6E, 0x66, 0x6F, 0x09, 0x02, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x1D, 0x53, 0x79, - 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x69, 0x7A, 0x61, 0x74, 0x69, - 0x6F, 0x6E, 0x2E, 0x54, 0x65, 0x78, 0x74, 0x49, 0x6E, 0x66, 0x6F, 0x03, 0x00, 0x00, 0x00, 0x0B, - 0x6D, 0x5F, 0x6E, 0x44, 0x61, 0x74, 0x61, 0x49, 0x74, 0x65, 0x6D, 0x11, 0x6D, 0x5F, 0x75, 0x73, - 0x65, 0x55, 0x73, 0x65, 0x72, 0x4F, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x0D, 0x6D, 0x5F, - 0x77, 0x69, 0x6E, 0x33, 0x32, 0x4C, 0x61, 0x6E, 0x67, 0x49, 0x44, 0x00, 0x00, 0x00, 0x08, 0x01, - 0x08, 0x50, 0x00, 0x00, 0x00, 0x01, 0x0C, 0x0C, 0x00, 0x00, 0x0B -#endif }; } } diff --git a/mcs/class/corlib/Test/System.Collections/DictionaryBaseTest.cs b/mcs/class/corlib/Test/System.Collections/DictionaryBaseTest.cs index 96a5eecddf0..90446d6fc32 100644 --- a/mcs/class/corlib/Test/System.Collections/DictionaryBaseTest.cs +++ b/mcs/class/corlib/Test/System.Collections/DictionaryBaseTest.cs @@ -469,14 +469,9 @@ namespace MonoTests.System.Collections Assert.IsFalse (myDictionary.onSetFired, "#B8"); Assert.IsFalse (myDictionary.onSetCompleteFired, "#B9"); Assert.IsFalse (myDictionary.onGetFired, "#B10"); -#if NET_2_0 myDictionary.onGetExist = true; Assert.AreEqual (28, myDictionary.Count, "#B11"); Assert.AreEqual (22, myDictionary.BaseDictionary [11], "#B12"); -#else - Assert.AreEqual (27, myDictionary.Count, "#B11"); - Assert.IsNull (myDictionary.BaseDictionary [11], "#B12"); -#endif } [Test] @@ -487,15 +482,9 @@ namespace MonoTests.System.Collections Assert.IsFalse (myDictionary.onInsertFired, "#B1"); Assert.IsFalse (myDictionary.onInsertCompleteFired, "#B2"); -#if NET_2_0 Assert.IsFalse (myDictionary.onValidateFired, "#1"); Assert.IsFalse (myDictionary.onRemoveFired, "#2"); Assert.IsFalse (myDictionary.onRemoveCompleteFired, "#3"); -#else - Assert.IsTrue (myDictionary.onValidateFired, "#1"); - Assert.IsTrue (myDictionary.onRemoveFired, "#2"); - Assert.IsTrue (myDictionary.onRemoveCompleteFired, "#3"); -#endif Assert.IsFalse (myDictionary.onClearFired, "#B6"); Assert.IsFalse (myDictionary.onClearCompleteFired, "#B7"); Assert.IsFalse (myDictionary.onSetFired, "#B8"); @@ -805,12 +794,8 @@ namespace MonoTests.System.Collections { IDictionary dictionary = new ModifyDictionary (); dictionary ["a"] = "b"; -#if NET_2_0 // first time we return "b" - because the value was cached Assert.AreEqual ("b", dictionary ["a"], "#1"); -#else - Assert.AreEqual ("a", dictionary ["a"], "#1"); -#endif // second time we return "a" - because it's the value in the dictionary Assert.AreEqual ("a", dictionary ["a"], "#2"); } diff --git a/mcs/class/corlib/Test/System.Collections/HashtableTest.cs b/mcs/class/corlib/Test/System.Collections/HashtableTest.cs index 9eef487f474..bd60687f6f9 100644 --- a/mcs/class/corlib/Test/System.Collections/HashtableTest.cs +++ b/mcs/class/corlib/Test/System.Collections/HashtableTest.cs @@ -275,7 +275,6 @@ public class HashtableTest { Assert.AreEqual (0, h.Count, "Table should be cleared");
}
-#if NET_2_0
public class MyEqualityComparer : IEqualityComparer {
bool IEqualityComparer.Equals (object x, object y) { return x == y; }
public int GetHashCode (object obj) { return 1; }
@@ -286,7 +285,6 @@ public class HashtableTest { return (IEqualityComparer) typeof (Hashtable).GetField ("_keycomparer",
BindingFlags.NonPublic | BindingFlags.Instance).GetValue (h);
}
-#endif
[Test]
public void TestClone() {
@@ -324,7 +322,6 @@ public class HashtableTest { ((char[])h1[c1[0]])[0] = 'z';
Assert.AreEqual (h1[c1[0]], h2[c1[0]], "shallow copy");
-#if NET_2_0
// NET 2.0 stuff
MyEqualityComparer a = new MyEqualityComparer ();
Hashtable mh1 = new Hashtable (a);
@@ -332,7 +329,6 @@ public class HashtableTest { // warning, depends on the field name.
Assert.AreEqual (GetEqualityComparer (mh1), GetEqualityComparer (mh1clone), "EqualityComparer");
-#endif
}
}
diff --git a/mcs/class/corlib/Test/System.Collections/QueueTest.cs b/mcs/class/corlib/Test/System.Collections/QueueTest.cs index eb6f43c357d..9f8a8b3117b 100644 --- a/mcs/class/corlib/Test/System.Collections/QueueTest.cs +++ b/mcs/class/corlib/Test/System.Collections/QueueTest.cs @@ -140,11 +140,6 @@ namespace MonoTests.System.Collections { [Test] public void TestSyncRoot() { -#if !NET_2_0 // umm, why on earth do you expect SyncRoot is the Queue itself? - Assert.AreEqual (q1, q1.SyncRoot, "SyncRoot q1"); - Assert.AreEqual (q2, q2.SyncRoot, "SyncRoot q2"); - Assert.AreEqual (emptyQueue, emptyQueue.SyncRoot, "SyncRoot emptyQueue"); -#endif Queue q1sync = Queue.Synchronized(q1); Assert.AreNotSame (q1, q1sync.SyncRoot, "SyncRoot value of a synchronized queue"); diff --git a/mcs/class/corlib/Test/System.Collections/ReadOnlyCollectionBaseTest.cs b/mcs/class/corlib/Test/System.Collections/ReadOnlyCollectionBaseTest.cs index a15aadc40f9..d7719ce6dae 100644 --- a/mcs/class/corlib/Test/System.Collections/ReadOnlyCollectionBaseTest.cs +++ b/mcs/class/corlib/Test/System.Collections/ReadOnlyCollectionBaseTest.cs @@ -18,9 +18,7 @@ namespace MonoTests.System.Collections { // We need a concrete class to test the abstract base class public class ConcreteReadOnlyCollection : ReadOnlyCollectionBase { -#if NET_2_0 public override int Count { get { return -1; }} -#endif } // Make sure that the Count is 0 for a new object @@ -29,11 +27,7 @@ namespace MonoTests.System.Collections { { ConcreteReadOnlyCollection myCollection; myCollection = new ConcreteReadOnlyCollection(); -#if NET_2_0 Assert.IsTrue (-1 == myCollection.Count); -#else - Assert.IsTrue ( 0 == myCollection.Count); -#endif } // Make sure we get an object from GetEnumerator() diff --git a/mcs/class/corlib/Test/System.Collections/SortedListTest.cs b/mcs/class/corlib/Test/System.Collections/SortedListTest.cs index 5289f944890..4b4b3b3a805 100644 --- a/mcs/class/corlib/Test/System.Collections/SortedListTest.cs +++ b/mcs/class/corlib/Test/System.Collections/SortedListTest.cs @@ -44,9 +44,6 @@ namespace MonoTests.System.Collections { SortedList temp1 = new SortedList (); Assert.IsNotNull (temp1, "#1"); -#if !NET_2_0 // no such expectation as it is broken in .NET 2.0 - Assert.AreEqual (icap, temp1.Capacity, "#2"); -#endif } [Test] @@ -55,9 +52,6 @@ namespace MonoTests.System.Collections Comparer c = Comparer.Default; SortedList temp1 = new SortedList (c); Assert.IsNotNull (temp1, "#1"); -#if !NET_2_0 // no such expectation as it is broken in .NET 2.0 - Assert.AreEqual (icap, temp1.Capacity, "#2"); -#endif } [Test] @@ -125,25 +119,6 @@ namespace MonoTests.System.Collections } } -#if !NET_2_0 // no such expectation as it is broken in .NET 2.0 - [Test] - public void Constructor_Capacity () - { - SortedList sl = new SortedList (0); - Assert.AreEqual (0, sl.Capacity, "#A1"); - sl.Capacity = 0; - // doesn't reset to class default (16) - Assert.AreEqual (0, sl.Capacity, "#A2"); - - for (int i = 1; i <= 16; i++) { - sl = new SortedList (i); - Assert.AreEqual (i, sl.Capacity, "#B1:" + i); - sl.Capacity = 0; - // reset to class default (16) - Assert.AreEqual (16, sl.Capacity, "#B2:" + i); - } - } -#endif [Test] public void TestIsSynchronized () @@ -317,38 +292,8 @@ namespace MonoTests.System.Collections Assert.AreEqual (2, sl1.Count, "#A2"); sl1.Clear (); Assert.AreEqual (0, sl1.Count, "#B1"); -#if !NET_2_0 // no such expectation as it is broken in .NET 2.0 - Assert.AreEqual (16, sl1.Capacity, "#B2"); -#endif } -#if !NET_2_0 // no such expectation as it is broken in .NET 2.0 - [Test] - public void Clear_Capacity () - { - // strangely Clear change the default capacity (while Capacity doesn't) - for (int i = 0; i <= 16; i++) { - SortedList sl = new SortedList (i); - Assert.AreEqual (i, sl.Capacity, "#1:"+ i); - sl.Clear (); - // reset to class default (16) - Assert.AreEqual (16, sl.Capacity, "#2:" + i); - } - } - - [Test] - public void Clear_Capacity_Reset () - { - SortedList sl = new SortedList (0); - Assert.AreEqual (0, sl.Capacity, "#1"); - sl.Clear (); - // reset to class default (16) - Assert.AreEqual (16, sl.Capacity, "#2"); - sl.Capacity = 0; - Assert.AreEqual (16, sl.Capacity, "#3"); - // note: we didn't return to 0 - so Clear cahnge the default capacity - } -#endif [Test] public void ClearDoesNotTouchCapacity () @@ -868,16 +813,10 @@ namespace MonoTests.System.Collections SortedList sl1 = new SortedList (24); sl1.TrimToSize (); -#if !NET_2_0 // no such expectation as it is broken in .NET 2.0 - Assert.AreEqual (icap, sl1.Capacity, "#1"); -#endif for (int i = 72; i >= 0; i--) sl1.Add (100 + i, i); sl1.TrimToSize (); -#if !NET_2_0 // no such expectation as it is broken in .NET 2.0 - Assert.AreEqual (73, sl1.Capacity, "#2"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs b/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs index 7db2ea31f39..0a8e3f8d373 100644 --- a/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs +++ b/mcs/class/corlib/Test/System.Diagnostics/StackTraceCas.cs @@ -58,22 +58,15 @@ namespace MonoCasTests.System.Diagnostics { Assert.IsNotNull (st.GetFrame (0), "GetFrame"); else Assert.IsNull (st.GetFrame (0), "GetFrame"); -#if NET_2_0 if (st.FrameCount > 0) Assert.IsNotNull (st.GetFrames (), "GetFrames"); else Assert.IsNull (st.GetFrames (), "GetFrames"); -#endif Assert.IsNotNull (st.ToString (), "ToString"); } [Test] -#if NET_2_0 [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#else - [ReflectionPermission (SecurityAction.Deny, TypeInformation = true)] - [ExpectedException (typeof (SecurityException))] -#endif public void StackTrace_DefaultConstructor () { StackTrace st = new StackTrace (); @@ -81,12 +74,7 @@ namespace MonoCasTests.System.Diagnostics { } [Test] -#if NET_2_0 [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#else - [ReflectionPermission (SecurityAction.Deny, TypeInformation = true)] - [ExpectedException (typeof (SecurityException))] -#endif public void StackTrace_BoolConstructor () { StackTrace st = new StackTrace (true); @@ -94,12 +82,7 @@ namespace MonoCasTests.System.Diagnostics { } [Test] -#if NET_2_0 [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#else - [ReflectionPermission (SecurityAction.Deny, TypeInformation = true)] - [ExpectedException (typeof (SecurityException))] -#endif public void StackTrace_IntConstructor () { StackTrace st = new StackTrace (1); @@ -107,12 +90,7 @@ namespace MonoCasTests.System.Diagnostics { } [Test] -#if NET_2_0 [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#else - [ReflectionPermission (SecurityAction.Deny, TypeInformation = true)] - [ExpectedException (typeof (SecurityException))] -#endif public void StackTrace_IntBoolConstructor () { StackTrace st = new StackTrace (1, true); @@ -152,12 +130,7 @@ namespace MonoCasTests.System.Diagnostics { } [Test] -#if NET_2_0 [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#else - [ReflectionPermission (SecurityAction.Deny, TypeInformation = true)] - [ExpectedException (typeof (SecurityException))] -#endif public void StackTrace_StackFrameConstructor () { StackTrace st = new StackTrace (new StackFrame ()); @@ -165,12 +138,7 @@ namespace MonoCasTests.System.Diagnostics { } [Test] -#if NET_2_0 [PermissionSet (SecurityAction.Deny, Unrestricted = true)] -#else - [ReflectionPermission (SecurityAction.Deny, TypeInformation = true)] - [ExpectedException (typeof (SecurityException))] -#endif [Category ("NotWorking")] public void StackTrace_ThreadBoolConstructor () { diff --git a/mcs/class/corlib/Test/System.Diagnostics/StackTraceTest.cs b/mcs/class/corlib/Test/System.Diagnostics/StackTraceTest.cs index 14af812b277..f2665988d52 100644 --- a/mcs/class/corlib/Test/System.Diagnostics/StackTraceTest.cs +++ b/mcs/class/corlib/Test/System.Diagnostics/StackTraceTest.cs @@ -133,10 +133,6 @@ namespace MonoTests.System.Diagnostics { } [Test] -#if !NET_2_0 - // on MS .NET 1.x, ThreadState after Start() is Unstarted - [Category ("NotDotNet")] -#endif [ExpectedException (typeof (ThreadStateException))] [Ignore ("Not supported in Mono")] public void StackTrace_Thread_NotSuspended () @@ -179,7 +175,6 @@ namespace MonoTests.System.Diagnostics { { Assert.AreEqual (frame, trace.GetFrame (0), "0"); } -#if NET_2_0 [Test] public void GetFrames () { @@ -190,7 +185,6 @@ namespace MonoTests.System.Diagnostics { Assert.AreEqual (sf [i], st.GetFrame (i), i.ToString ()); } } -#endif [Test] public void UnthrownException () { diff --git a/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs b/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs index c1b34196e95..05fadd83203 100644 --- a/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/CalendarTest.cs @@ -133,12 +133,10 @@ public class CalendarTest { private TaiwanCalendar tacal; private KoreanCalendar kcal; private ThaiBuddhistCalendar tbcal; -#if NET_2_0 private ChineseLunisolarCalendar clcal; private TaiwanLunisolarCalendar tlcal; private JapaneseLunisolarCalendar jlcal; private KoreanLunisolarCalendar klcal; -#endif [SetUp] protected void SetUp() { @@ -153,12 +151,10 @@ public class CalendarTest { acal = new Calendar[] { gcal, jucal, hical, hecal, jacal, tacal, kcal, tbcal}; -#if NET_2_0 clcal = new ChineseLunisolarCalendar (); tlcal = new TaiwanLunisolarCalendar (); jlcal = new JapaneseLunisolarCalendar (); klcal = new KoreanLunisolarCalendar (); -#endif } private void RowCheck(params Date[] adate) { @@ -468,11 +464,9 @@ public class CalendarTest { Assert.AreEqual(1, KoreanCalendar.KoreanEra, "B05 KoreanEra"); Assert.AreEqual(1, ThaiBuddhistCalendar.ThaiBuddhistEra, "B06 ThaiBuddhistEra"); -#if NET_2_0 Assert.AreEqual(1, ChineseLunisolarCalendar.ChineseEra, "CNLunisor"); Assert.AreEqual(1, JapaneseLunisolarCalendar.JapaneseEra, "JPLunisor"); Assert.AreEqual(1, KoreanLunisolarCalendar.GregorianEra, "KRLunisor"); -#endif } [Test] @@ -508,7 +502,6 @@ public class CalendarTest { } } -#if NET_2_0 [Category ("NotWorking")] [Test] public void TestErasProperty2() { @@ -520,7 +513,6 @@ public class CalendarTest { Assert.AreEqual(4, jlcal.Eras [0], "jp.1"); Assert.AreEqual(3, jlcal.Eras [1], "jp.2"); } -#endif [Test] public void TestTwoDigitYearMax() { @@ -606,7 +598,6 @@ public class CalendarTest { Assert.AreEqual (2, next.Month, "next"); } -#if NET_2_0 [Test] [Category ("NotWorking")] public void GetLeapMonth () @@ -699,7 +690,6 @@ public class CalendarTest { Assert.AreEqual (52, gc.GetWeekOfYear (new DateTime (2000, 1, 1), CalendarWeekRule.FirstFourDayWeek, DayOfWeek.Sunday), "#5"); Assert.AreEqual (52, gc.GetWeekOfYear (new DateTime (2000, 1, 1), CalendarWeekRule.FirstFullWeek, DayOfWeek.Sunday), "#6"); } -#endif [Test] public void TestToFourDigitYear() { diff --git a/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs index ccf702f8a92..ab7ef74d070 100644 --- a/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/CompareInfoTest.cs @@ -502,7 +502,6 @@ public class CompareInfoTest Array values = Enum.GetValues (typeof (CompareOptions)); foreach (int i in values) { CompareOptions option = (CompareOptions) i; -#if NET_2_0 if (option == CompareOptions.OrdinalIgnoreCase || option == CompareOptions.Ordinal) { try { french.GetSortKey ("foo", option); @@ -517,16 +516,11 @@ public class CompareInfoTest } else { french.GetSortKey ("foo", option); } -#else - french.GetSortKey ("foo", option); -#endif } } [Test] -#if NET_2_0 [Category ("NotDotNet")] -#endif public void FrenchSort () { if (!doTest) @@ -706,9 +700,7 @@ public class CompareInfoTest } [Test] -#if NET_2_0 [Category ("NotDotNet")] -#endif public void CultureSensitiveCompare () { if (!doTest) @@ -760,9 +752,7 @@ public class CompareInfoTest } [Test] -#if NET_2_0 [Category ("NotDotNet")] -#endif public void CompareSpecialWeight () { if (!doTest) @@ -853,9 +843,7 @@ public class CompareInfoTest } [Test] -#if NET_2_0 [Category ("NotDotNet")] -#endif public void IsPrefix () { if (!doTest) @@ -922,9 +910,7 @@ public class CompareInfoTest } [Test] -#if NET_2_0 [Category ("NotDotNet")] -#endif public void IsSuffix () { if (!doTest) @@ -1010,9 +996,7 @@ public class CompareInfoTest } [Test] -#if NET_2_0 [Category ("NotDotNet")] -#endif public void IndexOfStringWeird () { // BUG in .NET 2.0 : see GetSortKey() test (mentioned above). @@ -1170,7 +1154,6 @@ public class CompareInfoTest Assert.AreEqual (0, "MONO".CompareTo ("MONO\0\0\0"), "#4"); } -#if NET_2_0 [Test] [Category ("NotDotNet")] public void OrdinalIgnoreCaseCompare () @@ -1241,7 +1224,6 @@ public class CompareInfoTest { Assert.IsTrue ("aaaa".StartsWith ("A", StringComparison.OrdinalIgnoreCase)); } -#endif [Test] [ExpectedException (typeof (ArgumentNullException))] diff --git a/mcs/class/corlib/Test/System.Globalization/EastAsianLunisolarCalendarTest.cs b/mcs/class/corlib/Test/System.Globalization/EastAsianLunisolarCalendarTest.cs index fca89e28f09..1451fdff356 100644 --- a/mcs/class/corlib/Test/System.Globalization/EastAsianLunisolarCalendarTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/EastAsianLunisolarCalendarTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -227,4 +226,3 @@ namespace MonoTests.System.Globalization } } -#endif diff --git a/mcs/class/corlib/Test/System.Globalization/IdnMappingTest.cs b/mcs/class/corlib/Test/System.Globalization/IdnMappingTest.cs index babb01e94a8..90a06f2a373 100644 --- a/mcs/class/corlib/Test/System.Globalization/IdnMappingTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/IdnMappingTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System.IO; @@ -194,4 +193,3 @@ namespace MonoTests.System.Globalization } } -#endif diff --git a/mcs/class/corlib/Test/System.Globalization/StringInfoTest.cs b/mcs/class/corlib/Test/System.Globalization/StringInfoTest.cs index 70fb0abd9fa..d74f68e3463 100644 --- a/mcs/class/corlib/Test/System.Globalization/StringInfoTest.cs +++ b/mcs/class/corlib/Test/System.Globalization/StringInfoTest.cs @@ -29,9 +29,7 @@ namespace MonoTests.System.Globalization Assert.AreEqual ("B", StringInfo.GetNextTextElement ("A\u0330BC", 2), "#4"); // hmm ... -#if NET_2_0 // it causes ArgumentOutOfRangeException in 1.x, not worthy to test it anymore Assert.AreEqual (String.Empty, StringInfo.GetNextTextElement ("A\u0330BC", 4), "#4"); -#endif } [Test] @@ -41,7 +39,6 @@ namespace MonoTests.System.Globalization StringInfo.GetNextTextElement ("ABC", -1); } -#if NET_2_0 [Test] public void LengthInTextElements () { @@ -87,7 +84,6 @@ namespace MonoTests.System.Globalization { new StringInfo (String.Empty).SubstringByTextElements (0); } -#endif } } diff --git a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileCas.cs b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileCas.cs index 031c4c4fd3b..f89e7cedfbc 100644 --- a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileCas.cs +++ b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileCas.cs @@ -82,7 +82,6 @@ namespace MonoCasTests.System.IO.IsolatedStorageTest { } } -#if NET_2_0 [Test] [IsolatedStorageFilePermission (SecurityAction.Deny, UsageAllowed = IsolatedStorageContainment.ApplicationIsolationByMachine)] [ExpectedException (typeof (SecurityException))] @@ -176,7 +175,6 @@ namespace MonoCasTests.System.IO.IsolatedStorageTest { { IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication (); } -#endif [Test] [IsolatedStorageFilePermission (SecurityAction.Deny, UsageAllowed = IsolatedStorageContainment.AssemblyIsolationByUser)] [ExpectedException (typeof (SecurityException))] @@ -291,13 +289,8 @@ namespace MonoCasTests.System.IO.IsolatedStorageTest { { Assert.AreEqual (Int64.MaxValue, MaximumSize (SecurityZone.MyComputer), "MyComputer"); Assert.AreEqual (Int64.MaxValue, MaximumSize (SecurityZone.Intranet), "Intranet"); -#if NET_2_0 Assert.AreEqual (512000, MaximumSize (SecurityZone.Internet), "Internet"); Assert.AreEqual (512000, MaximumSize (SecurityZone.Trusted), "Trusted"); -#else - Assert.AreEqual (10240, MaximumSize (SecurityZone.Internet), "Internet"); - Assert.AreEqual (10240, MaximumSize (SecurityZone.Trusted), "Trusted"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamCas.cs b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamCas.cs index 238c73cae6c..15c8e0e5376 100644 --- a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamCas.cs +++ b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamCas.cs @@ -37,9 +37,7 @@ using System.Security; using System.Security.Permissions; using System.Threading; -#if NET_2_0 using Microsoft.Win32.SafeHandles; -#endif namespace MonoCasTests.System.IO.IsolatedStorageTest { @@ -229,7 +227,6 @@ namespace MonoCasTests.System.IO.IsolatedStorageTest { IntPtr p = isfs.Handle; // Note: The SecurityException for UnmanagedCode cannot be tested here because it's a LinkDemand } -#if NET_2_0 [Test] [IsolatedStorageFilePermission (SecurityAction.PermitOnly, Unrestricted = true)] [ExpectedException (typeof (IsolatedStorageException))] @@ -239,7 +236,6 @@ namespace MonoCasTests.System.IO.IsolatedStorageTest { SafeFileHandle sfh = isfs.SafeFileHandle; // Note: The SecurityException for UnmanagedCode cannot be tested here because it's a LinkDemand } -#endif // we use reflection to call IsolatedStorageFileStream as the Handle and SafeFileHandle // properties are protected by LinkDemand (which will be converted into full demand, @@ -259,7 +255,6 @@ namespace MonoCasTests.System.IO.IsolatedStorageTest { isfs.Close (); } } -#if NET_2_0 [Test] [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] [ExpectedException (typeof (SecurityException))] @@ -274,7 +269,6 @@ namespace MonoCasTests.System.IO.IsolatedStorageTest { isfs.Close (); } } -#endif // async tests (for stack propagation) diff --git a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamTest.cs b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamTest.cs index bb2d7e61631..5be5a00eaba 100644 --- a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamTest.cs +++ b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileStreamTest.cs @@ -30,9 +30,7 @@ using System; using System.IO; using System.IO.IsolatedStorage; -#if NET_2_0 using Microsoft.Win32.SafeHandles; -#endif using NUnit.Framework; diff --git a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs index c3d4e01665a..96208930b06 100644 --- a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs +++ b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageFileTest.cs @@ -56,10 +56,8 @@ namespace MonoTests.System.IO.IsolatedStorageTest { Assert.IsNotNull (isf.AssemblyIdentity, prefix + "AssemblyIdentity"); if ((isf.Scope & IsolatedStorageScope.Domain) != 0) Assert.IsNotNull (isf.DomainIdentity, prefix + "DomainIdentity"); -#if NET_2_0 if ((isf.Scope & IsolatedStorageScope.Application) != 0) Assert.IsNotNull (isf.ApplicationIdentity, prefix + "ApplicationIdentity"); -#endif } private void GetEnumerator (IsolatedStorageScope scope) @@ -100,7 +98,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { // giving more details is bad GetEnumerator (IsolatedStorageScope.User | IsolatedStorageScope.Assembly | IsolatedStorageScope.Domain | IsolatedStorageScope.Roaming); } -#if NET_2_0 [Test] public void GetEnumerator_Machine () { @@ -121,7 +118,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { // we can't enum application GetEnumerator (IsolatedStorageScope.Application); } -#endif [Test] public void GetUserStoreForAssembly () { @@ -147,7 +143,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { object o = isf.DomainIdentity; } -#if NET_2_0 [Test] [ExpectedException (typeof (InvalidOperationException))] public void GetUserStoreForAssembly_ApplicationIdentity () @@ -155,7 +150,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForAssembly (); object o = isf.ApplicationIdentity; } -#endif [Test] public void GetUserStoreForDomain () @@ -178,7 +172,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { Assert.IsTrue ((isf.CurrentSize >= 0), "CurrentSize"); } -#if NET_2_0 [Test] [ExpectedException (typeof (InvalidOperationException))] public void GetUserStoreForDomain_ApplicationIdentity () @@ -230,7 +223,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { object o = isf.DomainIdentity; } #endif -#endif #if NET_4_0 // This is supposed to be working only in SL. diff --git a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageTest.cs b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageTest.cs index 034a9517bda..6bc4b9f5027 100644 --- a/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageTest.cs +++ b/mcs/class/corlib/Test/System.IO.IsolatedStorage/IsolatedStorageTest.cs @@ -168,7 +168,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { Assert.AreEqual (Path.DirectorySeparatorChar, nais.PublicSeparatorExternal, "SeparatorExternal"); Assert.AreEqual ('.', nais.PublicSeparatorInternal, "SeparatorInternal"); } -#if NET_2_0 [Test] [ExpectedException (typeof (InvalidOperationException))] public void IsolatedStorage_ApplicationIdentity () @@ -184,14 +183,6 @@ namespace MonoTests.System.IO.IsolatedStorageTest { NonAbstractIsolatedStorage nais = new NonAbstractIsolatedStorage (); object o = nais.AssemblyIdentity; } -#else - [Test] - public void IsolatedStorage_AssemblyIdentity () - { - NonAbstractIsolatedStorage nais = new NonAbstractIsolatedStorage (); - Assert.IsNull (nais.AssemblyIdentity, "AssemblyIdentity"); - } -#endif [Test] [ExpectedException (typeof (InvalidOperationException))] diff --git a/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs b/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs index 3e34c81352a..b18345e2dd2 100644 --- a/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs +++ b/mcs/class/corlib/Test/System.IO/DirectoryInfoTest.cs @@ -516,9 +516,7 @@ namespace MonoTests.System.IO Assert.AreEqual (0, info.GetDirectories ("test[12]*").Length, "#6"); Assert.AreEqual (2, info.GetDirectories ("test2*0").Length, "#7"); Assert.AreEqual (4, info.GetDirectories ("*test*").Length, "#8"); -#if NET_2_0 Assert.AreEqual (6, info.GetDirectories ("*", SearchOption.AllDirectories).Length, "#9"); -#endif } finally { DeleteDir (path); } @@ -572,7 +570,6 @@ namespace MonoTests.System.IO Assert.AreEqual(directoryToBeLookedFor, directoriesFound[0].Name, "The name of the directory found should match the expected one."); } -#if NET_2_0 [Test] // GetDirectories (String, SearchOption) public void GetDirectories3_SearchPattern_Null () { @@ -587,7 +584,6 @@ namespace MonoTests.System.IO Assert.AreEqual ("searchPattern", ex.ParamName, "#5"); } } -#endif [Test] // GetFiles () public void GetFiles1 () @@ -692,7 +688,6 @@ namespace MonoTests.System.IO } } -#if NET_2_0 [Test] // GetFiles (String, SearchOption) public void GetFiles3_SearchPattern_Null () { @@ -707,7 +702,6 @@ namespace MonoTests.System.IO Assert.AreEqual ("searchPattern", ex.ParamName, "#5"); } } -#endif [Test] public void GetFileSystemInfos2_SearchPattern_Null () diff --git a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs index f2d7e03d3d6..78e7a96f478 100644 --- a/mcs/class/corlib/Test/System.IO/DirectoryTest.cs +++ b/mcs/class/corlib/Test/System.IO/DirectoryTest.cs @@ -222,18 +222,12 @@ public class DirectoryTest fstream.Close();
DirectoryInfo dinfo = Directory.CreateDirectory (path);
-#if NET_2_0
Assert.Fail ("#1");
} catch (IOException ex) {
Assert.AreEqual (typeof (IOException), ex.GetType (), "#2");
// exception message contains the path
Assert.IsTrue (ex.Message.Contains (path), "#3");
Assert.IsNull (ex.InnerException, "#4");
-#else
- Assert.IsFalse (dinfo.Exists, "#2");
- Assert.IsTrue (dinfo.FullName.EndsWith ("DirectoryTest.Test.ExistsAsFile"), "#3");
- Assert.AreEqual ("DirectoryTest.Test.ExistsAsFile", dinfo.Name, "#4");
-#endif
} finally {
DeleteDirectory (path);
DeleteFile (path);
@@ -399,9 +393,6 @@ public class DirectoryTest }
[Test]
-#if !NET_2_0
- [ExpectedException(typeof(IOException))]
-#endif
public void GetCreationTimeException_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetCreationTime.1";
@@ -409,7 +400,6 @@ public class DirectoryTest try {
DateTime time = Directory.GetCreationTime (path);
-#if NET_2_0
DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();
Assert.AreEqual (expectedTime.Year, time.Year, "#1");
Assert.AreEqual (expectedTime.Month, time.Month, "#2");
@@ -417,7 +407,6 @@ public class DirectoryTest Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");
Assert.AreEqual (expectedTime.Second, time.Second, "#5");
Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");
-#endif
} finally {
DeleteDirectory (path);
}
@@ -452,9 +441,6 @@ public class DirectoryTest }
[Test]
-#if !NET_2_0
- [ExpectedException (typeof (IOException))]
-#endif
public void GetCreationTimeUtc_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetCreationTimeUtc.1";
@@ -463,14 +449,12 @@ public class DirectoryTest try {
DateTime time = Directory.GetCreationTimeUtc (path);
-#if NET_2_0
Assert.AreEqual (1601, time.Year, "#1");
Assert.AreEqual (1, time.Month, "#2");
Assert.AreEqual (1, time.Day, "#3");
Assert.AreEqual (0, time.Hour, "#4");
Assert.AreEqual (0, time.Second, "#5");
Assert.AreEqual (0, time.Millisecond, "#6");
-#endif
} finally {
DeleteDirectory (path);
}
@@ -505,9 +489,6 @@ public class DirectoryTest }
[Test]
-#if !NET_2_0
- [ExpectedException (typeof (IOException))]
-#endif
public void GetLastAccessTime_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTime.1";
@@ -516,7 +497,6 @@ public class DirectoryTest try {
DateTime time = Directory.GetLastAccessTime (path);
-#if NET_2_0
DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();
Assert.AreEqual (expectedTime.Year, time.Year, "#1");
Assert.AreEqual (expectedTime.Month, time.Month, "#2");
@@ -524,7 +504,6 @@ public class DirectoryTest Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");
Assert.AreEqual (expectedTime.Second, time.Second, "#5");
Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");
-#endif
} finally {
DeleteDirectory (path);
}
@@ -559,9 +538,6 @@ public class DirectoryTest }
[Test]
-#if !NET_2_0
- [ExpectedException (typeof (IOException))]
-#endif
public void GetLastAccessTimeUtc_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastAccessTimeUtc.1";
@@ -569,14 +545,12 @@ public class DirectoryTest try {
DateTime time = Directory.GetLastAccessTimeUtc (path);
-#if NET_2_0
Assert.AreEqual (1601, time.Year, "#1");
Assert.AreEqual (1, time.Month, "#2");
Assert.AreEqual (1, time.Day, "#3");
Assert.AreEqual (0, time.Hour, "#4");
Assert.AreEqual (0, time.Second, "#5");
Assert.AreEqual (0, time.Millisecond, "#6");
-#endif
} finally {
DeleteDirectory (path);
}
@@ -611,9 +585,6 @@ public class DirectoryTest }
[Test]
-#if !NET_2_0
- [ExpectedException (typeof (IOException))]
-#endif
public void GetLastWriteTime_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastWriteTime.1";
@@ -621,7 +592,6 @@ public class DirectoryTest try {
DateTime time = Directory.GetLastWriteTime (path);
-#if NET_2_0
DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime ();
Assert.AreEqual (expectedTime.Year, time.Year, "#1");
Assert.AreEqual (expectedTime.Month, time.Month, "#2");
@@ -629,7 +599,6 @@ public class DirectoryTest Assert.AreEqual (expectedTime.Hour, time.Hour, "#4");
Assert.AreEqual (expectedTime.Second, time.Second, "#5");
Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6");
-#endif
} finally {
DeleteDirectory (path);
}
@@ -664,9 +633,6 @@ public class DirectoryTest }
[Test]
-#if !NET_2_0
- [ExpectedException (typeof (IOException))]
-#endif
public void GetLastWriteTimeUtc_NonExistingPath ()
{
string path = TempFolder + DSC + "DirectoryTest.GetLastWriteTimeUtc.1";
@@ -674,14 +640,12 @@ public class DirectoryTest try {
DateTime time = Directory.GetLastWriteTimeUtc (path);
-#if NET_2_0
Assert.AreEqual (1601, time.Year, "#1");
Assert.AreEqual (1, time.Month, "#2");
Assert.AreEqual (1, time.Day, "#3");
Assert.AreEqual (0, time.Hour, "#4");
Assert.AreEqual (0, time.Second, "#5");
Assert.AreEqual (0, time.Millisecond, "#6");
-#endif
} finally {
DeleteDirectory (path);
}
diff --git a/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs b/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs index 445c646b7d4..e25d38c07ba 100644 --- a/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs +++ b/mcs/class/corlib/Test/System.IO/FileNotFoundExceptionTest.cs @@ -40,9 +40,7 @@ namespace MonoTests.System.IO { { FileNotFoundException fnf = new FileNotFoundException (); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNull (fnf.InnerException, "#3"); Assert.IsNotNull (fnf.Message, "#4"); // Unable to find the specified file @@ -55,9 +53,7 @@ namespace MonoTests.System.IO { { FileNotFoundException fnf = new FileNotFoundException ("message"); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNull (fnf.InnerException, "#3"); Assert.IsNotNull (fnf.Message, "#4"); @@ -72,9 +68,7 @@ namespace MonoTests.System.IO { { FileNotFoundException fnf = new FileNotFoundException (string.Empty); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNull (fnf.InnerException, "#3"); Assert.IsNotNull (fnf.Message, "#4"); @@ -89,23 +83,13 @@ namespace MonoTests.System.IO { { FileNotFoundException fnf = new FileNotFoundException ((string) null); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNull (fnf.InnerException, "#3"); -#if NET_2_0 Assert.IsNull (fnf.Message, "#4"); -#else - Assert.IsNotNull (fnf.Message, "#4"); // File or assembly name (null), or ... -#endif Assert.IsNull (fnf.FusionLog, "#5"); -#if NET_2_0 Assert.AreEqual (fnf.GetType ().FullName + ": ", fnf.ToString (), "#6"); -#else - Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName), "#6"); -#endif } [Test] @@ -115,9 +99,7 @@ namespace MonoTests.System.IO { FileNotFoundException fnf = new FileNotFoundException ("message", ame); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNotNull (fnf.InnerException, "#3"); Assert.AreSame (ame, fnf.InnerException, "#4"); @@ -134,9 +116,7 @@ namespace MonoTests.System.IO { ArithmeticException ame = new ArithmeticException ("something"); FileNotFoundException fnf = new FileNotFoundException (string.Empty, ame); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNotNull (fnf.InnerException, "#3"); Assert.AreSame (ame, fnf.InnerException, "#4"); @@ -153,25 +133,14 @@ namespace MonoTests.System.IO { ArithmeticException ame = new ArithmeticException ("something"); FileNotFoundException fnf = new FileNotFoundException ((string) null, ame); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNotNull (fnf.InnerException, "#3"); Assert.AreSame (ame, fnf.InnerException, "#4"); -#if NET_2_0 Assert.IsNull (fnf.Message, "#5"); -#else - Assert.IsNotNull (fnf.Message, "#5"); // File or assembly name (null), or ... -#endif Assert.IsNull (fnf.FusionLog, "#6"); -#if NET_2_0 Assert.AreEqual (fnf.GetType ().FullName + ": ---> " + ame.GetType ().FullName + ": something", fnf.ToString (), "#7"); -#else - Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName), "#7"); - Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#9"); -#endif } [Test] @@ -180,9 +149,7 @@ namespace MonoTests.System.IO { FileNotFoundException fnf = new FileNotFoundException ("message", (Exception) null); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNull (fnf.InnerException, "#3"); Assert.IsNotNull (fnf.Message, "#4"); @@ -198,9 +165,7 @@ namespace MonoTests.System.IO { FileNotFoundException fnf = new FileNotFoundException ("message", "file.txt"); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNotNull (fnf.FileName, "#2"); Assert.AreEqual ("file.txt", fnf.FileName, "#3"); Assert.IsNull (fnf.InnerException, "#4"); @@ -209,13 +174,8 @@ namespace MonoTests.System.IO { Assert.IsNull (fnf.FusionLog, "#7"); Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName + ": message" + Environment.NewLine), "#8"); -#if NET_2_0 Assert.IsTrue (fnf.ToString ().IndexOf ("'file.txt'") != -1, "#9"); Assert.IsFalse (fnf.ToString ().IndexOf ("\"file.txt\"") != -1, "#9"); -#else - Assert.IsFalse (fnf.ToString ().IndexOf ("'file.txt'") != -1, "#9"); - Assert.IsTrue (fnf.ToString ().IndexOf ("\"file.txt\"") != -1, "#10"); -#endif } [Test] @@ -224,9 +184,7 @@ namespace MonoTests.System.IO { FileNotFoundException fnf = new FileNotFoundException ("message", string.Empty); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNotNull (fnf.FileName, "#2"); Assert.AreEqual (string.Empty, fnf.FileName, "#3"); Assert.IsNull (fnf.InnerException, "#4"); @@ -243,9 +201,7 @@ namespace MonoTests.System.IO { FileNotFoundException fnf = new FileNotFoundException ("message", (string) null); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#A1"); -#endif Assert.IsNull (fnf.FileName, "#A2"); Assert.IsNull (fnf.InnerException, "#A3"); Assert.IsNotNull (fnf.Message, "#A4"); @@ -257,9 +213,7 @@ namespace MonoTests.System.IO { fnf = new FileNotFoundException (string.Empty, (string) null); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#B1"); -#endif Assert.IsNull (fnf.FileName, "#B2"); Assert.IsNull (fnf.InnerException, "#B3"); Assert.IsNotNull (fnf.Message, "#B4"); @@ -275,9 +229,7 @@ namespace MonoTests.System.IO { FileNotFoundException fnf = new FileNotFoundException (string.Empty, string.Empty); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNotNull (fnf.FileName, "#2"); Assert.AreEqual (string.Empty, fnf.FileName, "#3"); Assert.IsNull (fnf.InnerException, "#4"); @@ -293,16 +245,10 @@ namespace MonoTests.System.IO { FileNotFoundException fnf = new FileNotFoundException ((string) null, (string) null); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNull (fnf.FileName, "#2"); Assert.IsNull (fnf.InnerException, "#3"); -#if NET_2_0 Assert.IsNull (fnf.Message, "#4"); -#else - Assert.IsNotNull (fnf.Message, "#4"); -#endif Assert.IsNull (fnf.FusionLog, "#5"); Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName + ": "), "#6"); @@ -317,9 +263,7 @@ namespace MonoTests.System.IO { fnf = new FileNotFoundException (string.Empty, "file.txt"); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#1"); -#endif Assert.IsNotNull (fnf.FileName, "#2"); Assert.AreEqual ("file.txt", fnf.FileName, "#3"); Assert.IsNull (fnf.InnerException, "#4"); @@ -328,13 +272,8 @@ namespace MonoTests.System.IO { Assert.IsNull (fnf.FusionLog, "#7"); Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName + ": " + Environment.NewLine), "#8"); -#if NET_2_0 Assert.IsTrue (fnf.ToString ().IndexOf ("'file.txt'") != -1, "#9"); Assert.IsFalse (fnf.ToString ().IndexOf ("\"file.txt\"") != -1, "#10"); -#else - Assert.IsFalse (fnf.ToString ().IndexOf ("'file.txt'") != -1, "#9"); - Assert.IsTrue (fnf.ToString ().IndexOf ("\"file.txt\"") != -1, "#10"); -#endif } [Test] @@ -344,9 +283,7 @@ namespace MonoTests.System.IO { fnf = new FileNotFoundException ((string) null, "file.txt"); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#A1"); -#endif Assert.IsNotNull (fnf.FileName, "#A2"); Assert.AreEqual ("file.txt", fnf.FileName, "#A3"); Assert.IsNull (fnf.InnerException, "#A4"); @@ -355,19 +292,12 @@ namespace MonoTests.System.IO { Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName + ": "), "#A7"); Assert.IsTrue (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#A8"); -#if NET_2_0 Assert.IsTrue (fnf.ToString ().IndexOf ("'file.txt'") != -1, "#A9"); Assert.IsFalse (fnf.ToString ().IndexOf ("\"file.txt\"") != -1, "#A10"); -#else - Assert.IsFalse (fnf.ToString ().IndexOf ("'file.txt'") != -1, "#A9"); - Assert.IsTrue (fnf.ToString ().IndexOf ("\"file.txt\"") != -1, "#A10"); -#endif fnf = new FileNotFoundException ((string) null, string.Empty); -#if NET_2_0 Assert.IsNotNull (fnf.Data, "#B1"); -#endif Assert.IsNotNull (fnf.FileName, "#B2"); Assert.AreEqual (string.Empty, fnf.FileName, "#B3"); Assert.IsNull (fnf.InnerException, "#B4"); @@ -378,12 +308,7 @@ namespace MonoTests.System.IO { Assert.IsTrue (fnf.ToString ().StartsWith (fnf.GetType ().FullName + ": "), "#B7"); Assert.IsFalse (fnf.ToString ().IndexOf (Environment.NewLine) != -1, "#B8"); -#if NET_2_0 Assert.IsTrue (fnf.ToString ().IndexOf ("''") != -1, "#B9"); -#else - Assert.IsFalse (fnf.ToString ().IndexOf ("''") != -1, "#B9"); - Assert.IsFalse (fnf.ToString ().IndexOf ("\"\"") != -1, "#B10"); -#endif } } } diff --git a/mcs/class/corlib/Test/System.IO/FileTest.cs b/mcs/class/corlib/Test/System.IO/FileTest.cs index 05c2241144d..b926c3c71e0 100644 --- a/mcs/class/corlib/Test/System.IO/FileTest.cs +++ b/mcs/class/corlib/Test/System.IO/FileTest.cs @@ -812,11 +812,7 @@ namespace MonoTests.System.IO Assert.AreEqual (typeof (DirectoryNotFoundException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); -#if NET_2_0 Assert.IsFalse (ex.Message.IndexOf (destFile) != -1, "#5"); -#else - Assert.IsTrue (ex.Message.IndexOf (destFile) != -1, "#5"); -#endif } } finally { DeleteFile (sourceFile); @@ -1292,7 +1288,6 @@ namespace MonoTests.System.IO string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeException3"; DeleteFile (path); -#if NET_2_0 DateTime time = File.GetCreationTime (path); DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime (); Assert.AreEqual (expectedTime.Year, time.Year, "#1"); @@ -1301,18 +1296,6 @@ namespace MonoTests.System.IO Assert.AreEqual (expectedTime.Hour, time.Hour, "#4"); Assert.AreEqual (expectedTime.Second, time.Second, "#5"); Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6"); -#else - try { - File.GetCreationTime (path); - Assert.Fail ("#1"); - } catch (IOException ex) { - // Could not find a part of the path "..." - Assert.AreEqual (typeof (IOException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("\"" + path + "\"") != -1, "#5"); - } -#endif } [Test] @@ -1380,7 +1363,6 @@ namespace MonoTests.System.IO string path = TempFolder + Path.DirectorySeparatorChar + "GetCreationTimeUtcException3"; DeleteFile (path); -#if NET_2_0 DateTime time = File.GetCreationTimeUtc (path); Assert.AreEqual (1601, time.Year, "#1"); Assert.AreEqual (1, time.Month, "#2"); @@ -1388,18 +1370,6 @@ namespace MonoTests.System.IO Assert.AreEqual (0, time.Hour, "#4"); Assert.AreEqual (0, time.Second, "#5"); Assert.AreEqual (0, time.Millisecond, "#6"); -#else - try { - File.GetCreationTimeUtc (path); - Assert.Fail ("#1"); - } catch (IOException ex) { - // Could not find a part of the path "..." - Assert.AreEqual (typeof (IOException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("\"" + path + "\"") != -1, "#5"); - } -#endif } [Test] @@ -1467,7 +1437,6 @@ namespace MonoTests.System.IO string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeException3"; DeleteFile (path); -#if NET_2_0 DateTime time = File.GetLastAccessTime (path); DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime (); Assert.AreEqual (expectedTime.Year, time.Year, "#1"); @@ -1476,18 +1445,6 @@ namespace MonoTests.System.IO Assert.AreEqual (expectedTime.Hour, time.Hour, "#4"); Assert.AreEqual (expectedTime.Second, time.Second, "#5"); Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6"); -#else - try { - File.GetLastAccessTime (path); - Assert.Fail ("#1"); - } catch (IOException ex) { - // Could not find a part of the path "..." - Assert.AreEqual (typeof (IOException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("\"" + path + "\"") != -1, "#5"); - } -#endif } [Test] @@ -1555,7 +1512,6 @@ namespace MonoTests.System.IO string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeUtcException3"; DeleteFile (path); -#if NET_2_0 DateTime time = File.GetLastAccessTimeUtc (path); Assert.AreEqual (1601, time.Year, "#1"); Assert.AreEqual (1, time.Month, "#2"); @@ -1563,18 +1519,6 @@ namespace MonoTests.System.IO Assert.AreEqual (0, time.Hour, "#4"); Assert.AreEqual (0, time.Second, "#5"); Assert.AreEqual (0, time.Millisecond, "#6"); -#else - try { - File.GetLastAccessTimeUtc (path); - Assert.Fail ("#1"); - } catch (IOException ex) { - // Could not find a part of the path "..." - Assert.AreEqual (typeof (IOException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("\"" + path + "\"") != -1, "#5"); - } -#endif } [Test] @@ -1642,7 +1586,6 @@ namespace MonoTests.System.IO string path = TempFolder + Path.DirectorySeparatorChar + "GetLastAccessTimeUtcException3"; DeleteFile (path); -#if NET_2_0 DateTime time = File.GetLastWriteTime (path); DateTime expectedTime = (new DateTime (1601, 1, 1)).ToLocalTime (); Assert.AreEqual (expectedTime.Year, time.Year, "#1"); @@ -1651,18 +1594,6 @@ namespace MonoTests.System.IO Assert.AreEqual (expectedTime.Hour, time.Hour, "#4"); Assert.AreEqual (expectedTime.Second, time.Second, "#5"); Assert.AreEqual (expectedTime.Millisecond, time.Millisecond, "#6"); -#else - try { - File.GetLastWriteTime (path); - Assert.Fail ("#1"); - } catch (IOException ex) { - // Could not find a part of the path "..." - Assert.AreEqual (typeof (IOException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("\"" + path + "\"") != -1, "#5"); - } -#endif } [Test] @@ -1730,7 +1661,6 @@ namespace MonoTests.System.IO string path = TempFolder + Path.DirectorySeparatorChar + "GetLastWriteTimeUtcException3"; DeleteFile (path); -#if NET_2_0 DateTime time = File.GetLastWriteTimeUtc (path); Assert.AreEqual (1601, time.Year, "#1"); Assert.AreEqual (1, time.Month, "#2"); @@ -1738,18 +1668,6 @@ namespace MonoTests.System.IO Assert.AreEqual (0, time.Hour, "#4"); Assert.AreEqual (0, time.Second, "#5"); Assert.AreEqual (0, time.Millisecond, "#6"); -#else - try { - File.GetLastWriteTimeUtc (path); - Assert.Fail ("#1"); - } catch (IOException ex) { - // Could not find a part of the path "..." - Assert.AreEqual (typeof (IOException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsTrue (ex.Message.IndexOf ("\"" + path + "\"") != -1, "#5"); - } -#endif } [Test] @@ -2625,7 +2543,6 @@ namespace MonoTests.System.IO LockUnlock ((long) Int32.MaxValue + 1); } -#if NET_2_0 [Test] public void ReadWriteAllText () { @@ -2679,7 +2596,6 @@ namespace MonoTests.System.IO Assert.AreEqual ("replaceFile", txt, "#3"); } } -#endif static bool RunningOnUnix { get { @@ -2700,7 +2616,6 @@ namespace MonoTests.System.IO Directory.Delete (path, true); } -#if NET_2_0 void read_all (string s) { string f = Path.GetTempFileName (); @@ -2712,7 +2627,6 @@ namespace MonoTests.System.IO DeleteFile (f); } } -#endif void MoveTest (FileAccess acc, FileShare share, bool works) { diff --git a/mcs/class/corlib/Test/System.IO/PathTest.cs b/mcs/class/corlib/Test/System.IO/PathTest.cs index 24c66a5fba6..a71fb947291 100644 --- a/mcs/class/corlib/Test/System.IO/PathTest.cs +++ b/mcs/class/corlib/Test/System.IO/PathTest.cs @@ -584,10 +584,6 @@ namespace MonoTests.System.IO {"root//dir", "root\\dir"}, {"root/. /", "root\\"}, {"root/.. /", ""}, -#if !NET_2_0 - {"root/ . /", "root\\"}, - {"root/ .. /", ""}, -#endif {"root/./", "root\\"}, {"root/.. /", ""}, {".//", ""} @@ -626,10 +622,6 @@ namespace MonoTests.System.IO {"root//dir", "root\\dir"}, {"root/. /", "root\\"}, {"root/.. /", ""}, -#if !NET_2_0 - {"root/ . /", "root\\"}, - {"root/ .. /", ""}, -#endif {"root/./", "root\\"}, {"root/.. /", ""}, {".//", ""} @@ -671,10 +663,6 @@ namespace MonoTests.System.IO {"root//dir", "root\\dir"}, {"root/. /", "root\\"}, {"root/.. /", ""}, -#if !NET_2_0 - {"root/ . /", "root\\"}, - {"root/ .. /", ""}, -#endif {"root/./", "root\\"}, {"root/.. /", ""}, {".//", ""} @@ -871,7 +859,6 @@ namespace MonoTests.System.IO #endif public void GetPathRoot_Path_InvalidPathChars () { -#if NET_2_0 try { Path.GetPathRoot ("hi\0world"); Assert.Fail ("#1"); @@ -882,9 +869,6 @@ namespace MonoTests.System.IO Assert.IsNotNull (ex.Message, "#4"); Assert.IsNull (ex.ParamName, "#5"); } -#else - Assert.AreEqual (String.Empty, Path.GetPathRoot ("hi\0world")); -#endif } [Test] @@ -1098,20 +1082,14 @@ namespace MonoTests.System.IO { char[] invalid = Path.InvalidPathChars; if (Windows) { -#if NET_2_0 Assert.AreEqual (36, invalid.Length, "Length"); -#else - Assert.AreEqual (15, invalid.Length, "Length"); -#endif + foreach (char c in invalid) { int i = (int) c; -#if NET_2_0 + if (i < 32) continue; -#else - if ((i == 0) || (i == 8) || ((i > 15) && (i < 19)) || ((i > 19) && (i < 26))) - continue; -#endif + // in both 1.1 SP1 and 2.0 if ((i == 34) || (i == 60) || (i == 62) || (i == 124)) continue; @@ -1143,7 +1121,6 @@ namespace MonoTests.System.IO } } -#if NET_2_0 [Test] public void GetInvalidFileNameChars_Values () { @@ -1266,7 +1243,7 @@ namespace MonoTests.System.IO } } } -#endif + #if NET_4_0 string Concat (string sep, params string [] parms) { diff --git a/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs b/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs index 8d1b9887528..c80de599fd6 100644 --- a/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs +++ b/mcs/class/corlib/Test/System.IO/UnmanagedMemoryStreamTest.cs @@ -10,7 +10,6 @@ // Copyright (C) 2004, 2009 Novell (http://www.novell.com) // -#if NET_2_0 using System; using System.Collections; using System.IO; @@ -1315,4 +1314,3 @@ namespace MonoTests.System.IO } } } -#endif diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs index 5482647d8c4..b4886cbf99b 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/AssemblyBuilderTest.cs @@ -99,7 +99,6 @@ public class AssemblyBuilderTest return mb; } -#if NET_2_0 [Test] [Category ("NotWorking")] public void ManifestModule () @@ -124,7 +123,6 @@ public class AssemblyBuilderTest Assert.AreSame (mb2, ab.ManifestModule, "#C3"); Assert.AreSame (mb1, mb2, "#C4"); } -#endif [Test] [ExpectedException (typeof (NotSupportedException))] @@ -1080,28 +1078,14 @@ public class AssemblyBuilderTest filename = Path.Combine (tempDir, "TestSetCustomAttributeA.dll"); check = AssemblyName.GetAssemblyName (filename); Assert.AreEqual (CultureInfo.InvariantCulture, check.CultureInfo, "#A1"); -#if NET_2_0 Assert.AreEqual (AssemblyNameFlags.None, check.Flags, "#A2"); -#else - Assert.AreEqual (AssemblyNameFlags.PublicKey, check.Flags, "#A2"); -#endif Assert.AreEqual ("TestSetCustomAttributeA, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", check.FullName, "#A3"); -#if NET_2_0 Assert.IsNull (check.GetPublicKey (), "#A4"); -#else - Assert.AreEqual (new byte [0], check.GetPublicKey (), "#A4"); -#endif -#if NET_2_0 Assert.AreEqual (new byte [0], check.GetPublicKeyToken (), "#A5"); -#else - Assert.IsNull (check.GetPublicKeyToken (), "#A5"); -#endif Assert.AreEqual (AssemblyHashAlgorithm.SHA1, check.HashAlgorithm, "#A6"); Assert.IsNull (check.KeyPair, "#A7"); Assert.AreEqual ("TestSetCustomAttributeA", check.Name, "#A8"); -#if NET_2_0 //Assert.AreEqual (ProcessorArchitecture.MSIL, check.ProcessorArchitecture, "#A9"); -#endif Assert.AreEqual (new Version (0, 0, 0, 0), check.Version, "#A10"); Assert.AreEqual (AssemblyVersionCompatibility.SameMachine, check.VersionCompatibility, "#A11"); @@ -1130,9 +1114,7 @@ public class AssemblyBuilderTest an.CultureInfo = new CultureInfo ("nl-BE"); an.Flags = AssemblyNameFlags.Retargetable; an.Name = "TestSetCustomAttributeB"; -#if NET_2_0 an.ProcessorArchitecture = ProcessorArchitecture.IA64; -#endif an.Version = new Version (1, 3, 5, 7); an.VersionCompatibility = AssemblyVersionCompatibility.SameDomain; @@ -1155,28 +1137,14 @@ public class AssemblyBuilderTest filename = Path.Combine (tempDir, "TestSetCustomAttributeB.dll"); check = AssemblyName.GetAssemblyName (filename); Assert.AreEqual ("nl-BE", check.CultureInfo.Name, "#B1"); -#if NET_2_0 Assert.AreEqual (AssemblyNameFlags.Retargetable, check.Flags, "#B2"); -#else - Assert.AreEqual (AssemblyNameFlags.PublicKey | AssemblyNameFlags.Retargetable, check.Flags, "#B2"); -#endif Assert.AreEqual ("TestSetCustomAttributeB, Version=1.3.5.7, Culture=nl-BE, PublicKeyToken=null, Retargetable=Yes", check.FullName, "#B3"); -#if NET_2_0 Assert.IsNull (check.GetPublicKey (), "#B4"); -#else - Assert.AreEqual (new byte [0], check.GetPublicKey (), "#B4"); -#endif -#if NET_2_0 Assert.AreEqual (new byte [0], check.GetPublicKeyToken (), "#B5"); -#else - Assert.IsNull (check.GetPublicKeyToken (), "#B5"); -#endif Assert.AreEqual (AssemblyHashAlgorithm.SHA1, check.HashAlgorithm, "#B6"); Assert.IsNull (check.KeyPair, "#B7"); Assert.AreEqual ("TestSetCustomAttributeB", check.Name, "#B8"); -#if NET_2_0 //Assert.AreEqual (ProcessorArchitecture.MSIL, check.ProcessorArchitecture, "#B9"); -#endif Assert.AreEqual (new Version (1, 3, 5, 7), check.Version, "#B10"); Assert.AreEqual (AssemblyVersionCompatibility.SameMachine, check.VersionCompatibility, "#B11"); @@ -1268,17 +1236,10 @@ public class AssemblyBuilderTest AssemblyName check = AssemblyName.GetAssemblyName (filename); // no exception is thrown (file not found) // because it's not AssemblyBuilder.Save job to do the signing :-/ -#if NET_2_0 Assert.AreEqual (AssemblyNameFlags.None, check.Flags, "#1"); Assert.IsNull (check.GetPublicKey (), "#2"); Assert.IsNotNull (check.GetPublicKeyToken (), "#3a"); Assert.AreEqual (0, check.GetPublicKeyToken ().Length, "#3b"); -#else - Assert.AreEqual (AssemblyNameFlags.PublicKey, check.Flags, "#1"); - Assert.IsNotNull (check.GetPublicKey (), "#2a"); - Assert.AreEqual (0, check.GetPublicKey ().Length, "#2b"); - Assert.IsNull (check.GetPublicKeyToken (), "#3"); -#endif Assert.IsTrue (check.FullName.IndexOf ("Version=0.0.0.0") != -1, "#4"); Assert.IsTrue (check.FullName.IndexOf ("Culture=neutral") != -1, "#5"); Assert.IsTrue (check.FullName.IndexOf ("PublicKeyToken=null") != -1, "#6"); @@ -1300,17 +1261,10 @@ public class AssemblyBuilderTest AssemblyName check = AssemblyName.GetAssemblyName (filename); // no public key is inserted into the assembly // because it's not AssemblyBuilder.Save job to do the signing :-/ -#if NET_2_0 Assert.AreEqual (AssemblyNameFlags.None, check.Flags, "#1"); Assert.IsNull (check.GetPublicKey (), "#2"); Assert.IsNotNull (check.GetPublicKeyToken (), "#3a"); Assert.AreEqual (0, check.GetPublicKeyToken ().Length, "#3b"); -#else - Assert.AreEqual (AssemblyNameFlags.PublicKey, check.Flags, "#1"); - Assert.IsNotNull (check.GetPublicKey (), "#2a"); - Assert.AreEqual (0, check.GetPublicKey ().Length, "#2b"); - Assert.IsNull (check.GetPublicKeyToken (), "#3"); -#endif Assert.IsTrue (check.FullName.IndexOf ("Version=0.0.0.0") != -1, "#4"); Assert.IsTrue (check.FullName.IndexOf ("Culture=neutral") != -1, "#5"); Assert.IsTrue (check.FullName.IndexOf ("PublicKeyToken=null") != -1, "#6"); @@ -1468,9 +1422,7 @@ public class AssemblyBuilderTest Assert.AreEqual (AssemblyHashAlgorithm.SHA1, refs [0].HashAlgorithm, "#D2:HashAlgorithm"); Assert.IsNull (refs [0].KeyPair, "#D2:KeyPair"); Assert.AreEqual ("mscorlib", refs [0].Name, "#D2:Name"); -#if NET_2_0 Assert.AreEqual (ProcessorArchitecture.None, refs [0].ProcessorArchitecture, "#D2:PA"); -#endif string FxVersion; #if MOBILE @@ -1507,9 +1459,7 @@ public class AssemblyBuilderTest Assert.AreEqual (AssemblyHashAlgorithm.SHA1, refs [0].HashAlgorithm, "#E2:HashAlgorithm"); Assert.IsNull (refs [0].KeyPair, "#E2:KeyPair"); Assert.AreEqual (an1.Name, refs [0].Name, "#E2:Name"); -#if NET_2_0 Assert.AreEqual (ProcessorArchitecture.None, refs [0].ProcessorArchitecture, "#E2:PA"); -#endif Assert.AreEqual (new Version (3, 0, 0, 0), refs [0].Version, "#E2:Version"); Assert.AreEqual (AssemblyVersionCompatibility.SameMachine, refs [0].VersionCompatibility, "#E2:VersionCompatibility"); @@ -1537,9 +1487,7 @@ public class AssemblyBuilderTest Assert.AreEqual (AssemblyHashAlgorithm.SHA1, refs [0].HashAlgorithm, "#F2:HashAlgorithm"); Assert.IsNull (refs [0].KeyPair, "#F2:KeyPair"); Assert.AreEqual (an1.Name, refs [0].Name, "#F2:Name"); -#if NET_2_0 Assert.AreEqual (ProcessorArchitecture.None, refs [0].ProcessorArchitecture, "#F2:PA"); -#endif Assert.AreEqual (new Version (3, 0, 0, 0), refs [0].Version, "#F2:Version"); Assert.AreEqual (AssemblyVersionCompatibility.SameMachine, refs [0].VersionCompatibility, "#F2:VersionCompatibility"); @@ -1557,9 +1505,7 @@ public class AssemblyBuilderTest Assert.AreEqual (AssemblyHashAlgorithm.SHA1, refs [1].HashAlgorithm, "#F3:HashAlgorithm"); Assert.IsNull (refs [1].KeyPair, "#F3:KeyPair"); Assert.AreEqual (an2.Name, refs [1].Name, "#F3:Name"); -#if NET_2_0 Assert.AreEqual (ProcessorArchitecture.None, refs [1].ProcessorArchitecture, "#F3:PA"); -#endif Assert.AreEqual (new Version (1, 2, 3, 4), refs [1].Version, "#F3:Version"); Assert.AreEqual (AssemblyVersionCompatibility.SameMachine, refs [1].VersionCompatibility, "#F3:VersionCompatibility"); @@ -1616,13 +1562,7 @@ public class AssemblyBuilderTest Assert.IsTrue (abName.GetPublicKey ().Length > 0, "#B3b"); Assert.IsNotNull (abName.GetPublicKeyToken (), "#B4a"); Assert.IsTrue (abName.GetPublicKeyToken ().Length > 0, "#B4b"); -#if NET_2_0 Assert.AreEqual (fullName, abName.FullName, "#B5"); -#else - //Assert.AreEqual ("AssemblyNameTest_PublicKey, Version=1.2.3.4, PublicKeyToken=0eea7ce65f35f2d8", abName.FullName, "#B5"); - Assert.IsTrue (abName.FullName.IndexOf ("AssemblyNameTest_PublicKey, Version=1.2.3.4") != -1, "#B5a"); - Assert.IsTrue (abName.FullName.IndexOf ("PublicKeyToken=0eea7ce65f35f2d8") != -1, "#B5b"); -#endif ab.Save ("AssemblyNameTest_PublicKey.dll"); AssemblyName bakedName = AssemblyName.GetAssemblyName (Path.Combine( @@ -1653,18 +1593,10 @@ public class AssemblyBuilderTest AssemblyName abName = ab.GetName (); Assert.IsNotNull (abName.CultureInfo != null, "#B1"); -#if NET_2_0 Assert.IsTrue (abName.CultureInfo != CultureInfo.InvariantCulture, "#B2a"); Assert.AreEqual (CultureInfo.InvariantCulture.LCID, abName.CultureInfo.LCID, "#B2a"); Assert.AreEqual (AssemblyNameFlags.PublicKey, abName.Flags, "#B3"); Assert.AreEqual (fullName, abName.FullName, "#B4"); -#else - Assert.AreEqual (CultureInfo.InvariantCulture, abName.CultureInfo, "#B2"); - Assert.AreEqual (AssemblyNameFlags.PublicKey, abName.Flags, "#B3"); - //Assert.AreEqual ("AssemblyNameTest_MoreCultureInfo, Version=1.2.3.4, PublicKeyToken=0eea7ce65f35f2d8", abName.FullName, "#B4"); - Assert.IsTrue (abName.FullName.IndexOf ("AssemblyNameTest_MoreCultureInfo, Version=1.2.3.4") != -1, "#B4a"); - Assert.IsTrue (abName.FullName.IndexOf ("PublicKeyToken=0eea7ce65f35f2d8") != -1, "#B4b"); -#endif ab.Save ("AssemblyNameTest_MoreCultureInfo.dll"); @@ -1673,12 +1605,8 @@ public class AssemblyBuilderTest Assert.IsNotNull (bakedName.CultureInfo, "#C1"); -#if NET_2_0 Assert.IsTrue (abName.CultureInfo != CultureInfo.InvariantCulture, "#C2a"); Assert.AreEqual (CultureInfo.InvariantCulture.LCID, abName.CultureInfo.LCID, "#C2b"); -#else - Assert.AreEqual (CultureInfo.InvariantCulture, bakedName.CultureInfo, "#C2"); -#endif Assert.AreEqual (fullName, bakedName.FullName, "#C3"); } @@ -1880,25 +1808,17 @@ public class AssemblyBuilderTest assemblyName, AssemblyBuilderAccess.Save, tempDir); ab.Save (assemblyName.Name + ".dll"); -#if NET_2_0 // on .NET 2.0, the full name of the AssemblyBuilder matches the // fully qualified assembly name Assert.AreEqual (fullName, ab.FullName, "#1"); -#else - //Assert.AreEqual (abName, ab.FullName, "#1"); -#endif AssemblyName an = ab.GetName (); Assert.AreEqual (AssemblyNameFlags.PublicKey, an.Flags, "#2"); Assert.IsNotNull (an.GetPublicKey (), "#3a"); Assert.AreEqual (0, an.GetPublicKey ().Length, "#3b"); -#if NET_2_0 Assert.IsNotNull (an.GetPublicKeyToken (), "#4a"); Assert.AreEqual (0, an.GetPublicKeyToken ().Length, "#4b"); -#else - Assert.IsNull (an.GetPublicKeyToken (), "#4"); -#endif // load assembly in separate domain, so we can clean-up after the // test diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorBuilderTest.cs index 347189ddc56..59e0734fb9c 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorBuilderTest.cs @@ -195,9 +195,7 @@ public class ConstructorBuilderTest } [Test] -#if NET_2_0 [Category ("NotDotNet")] // https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=341439 -#endif public void DefineParameter_Position_Zero () { ConstructorBuilder cb = genClass.DefineConstructor ( @@ -408,21 +406,12 @@ public class ConstructorBuilderTest try { cb.GetParameters (); Assert.Fail ("#1"); -#if NET_2_0 } catch (NotSupportedException ex) { // Type has not been created Assert.AreEqual (typeof (NotSupportedException), ex.GetType (), "#2"); Assert.IsNull (ex.InnerException, "#3"); Assert.IsNotNull (ex.Message, "#4"); } -#else - } catch (InvalidOperationException ex) { - // Type has not been created - Assert.AreEqual (typeof (InvalidOperationException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - } -#endif } [Test] @@ -433,20 +422,12 @@ public class ConstructorBuilderTest cb.GetILGenerator ().Emit (OpCodes.Ret); MethodToken tokenA = cb.GetToken (); -#if NET_2_0 Assert.IsFalse (tokenA == MethodToken.Empty, "#1"); -#else - Assert.IsFalse (tokenA.Token == MethodToken.Empty.Token, "#1"); -#endif genClass.CreateType (); MethodToken tokenB = cb.GetToken (); -#if NET_2_0 Assert.AreEqual (tokenA, tokenB, "#2"); -#else - Assert.AreEqual (tokenA.Token, tokenB.Token, "#2"); -#endif } [Test] // Invoke (Object []) diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorOnTypeBuilderInstTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorOnTypeBuilderInstTest.cs index 2c6e031be55..0312c9318e4 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorOnTypeBuilderInstTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/ConstructorOnTypeBuilderInstTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Globalization; @@ -464,4 +463,3 @@ namespace MonoTests.System.Reflection.Emit } } -#endif diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/DerivedTypesTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/DerivedTypesTest.cs index cc31ed42b3a..b9b6fbacca1 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/DerivedTypesTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/DerivedTypesTest.cs @@ -18,13 +18,10 @@ using System.Runtime.InteropServices; using NUnit.Framework; using System.Runtime.CompilerServices; -#if NET_2_0 using System.Collections.Generic; -#endif namespace MonoTests.System.Reflection.Emit { -#if NET_2_0 [TestFixture] public class PointerTypeTest { @@ -1745,5 +1742,4 @@ namespace MonoTests.System.Reflection.Emit } } -#endif } diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs index 4aecf73b87e..e04744d8244 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/DynamicMethodTest.cs @@ -6,7 +6,6 @@ // // (C) 2006 Novell -#if NET_2_0 using System; using System.Reflection; @@ -512,4 +511,3 @@ namespace MonoTests.System.Reflection.Emit } } -#endif diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/EnumBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/EnumBuilderTest.cs index 0eb7d46f509..383eae40030 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/EnumBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/EnumBuilderTest.cs @@ -55,20 +55,12 @@ namespace MonoTests.System.Reflection.Emit } [Test] -#if NET_2_0 [Category ("NotWorking")] -#else - [ExpectedException (typeof (NotSupportedException))] -#endif public void TestHasElementTypeEnumBuilderIncomplete () { EnumBuilder enumBuilder = GenerateEnum (); bool hasElementType = enumBuilder.HasElementType; -#if NET_2_0 Assert.IsFalse (hasElementType); -#else - Assert.Fail ("Should have failed: " + hasElementType); -#endif } [Test] @@ -81,11 +73,7 @@ namespace MonoTests.System.Reflection.Emit EnumBuilder enumBuilder = GenerateEnum (); enumBuilder.CreateType (); bool hasElementType = enumBuilder.HasElementType; -#if NET_2_0 Assert.IsFalse (hasElementType); -#else - Assert.Fail ("Should have failed: " + hasElementType); -#endif } [Test] @@ -110,16 +98,11 @@ namespace MonoTests.System.Reflection.Emit Assert.IsTrue (fieldBuilder.IsStatic, "#2"); Assert.IsTrue (fieldBuilder.IsLiteral, "#3"); Assert.AreEqual (_fieldName, fieldBuilder.Name, "#4"); -#if NET_2_0 Assert.IsFalse (enumType == fieldBuilder.DeclaringType, "#5"); Assert.IsFalse (enumBuilder == fieldBuilder.DeclaringType, "#6"); Assert.AreEqual (enumType.FullName, fieldBuilder.DeclaringType.FullName, "#7"); Assert.IsFalse (enumType == fieldBuilder.FieldType, "#8"); Assert.AreEqual (enumBuilder, fieldBuilder.FieldType, "#9"); -#else - Assert.AreEqual (enumType, fieldBuilder.DeclaringType, "#5"); - Assert.AreEqual (_enumType, fieldBuilder.FieldType, "#6"); -#endif } [Test] @@ -185,24 +168,13 @@ namespace MonoTests.System.Reflection.Emit Assert.IsTrue (fi.IsStatic, "#3"); Assert.AreEqual (enumBuilder, fieldBuilder.FieldType, "#4"); Assert.IsFalse (enumType == fieldBuilder.FieldType, "#5"); -#if NET_2_0 Assert.AreEqual (enumType.FullName, fieldBuilder.FieldType.FullName, "#6"); Assert.IsFalse (_enumType == fieldBuilder.FieldType, "#7"); -#else - Assert.IsFalse (enumType.FullName == fieldBuilder.FieldType.FullName, "#6"); - Assert.AreEqual (_enumType, fieldBuilder.FieldType, "#7"); -#endif object fieldValue = fi.GetValue (enumType); -#if NET_2_0 Assert.IsFalse (_fieldValue == fieldValue, "#8"); Assert.IsTrue (fieldValue.GetType ().IsEnum, "#9"); Assert.AreEqual (enumType, fieldValue.GetType (), "#10"); -#else - Assert.AreEqual (_fieldValue, fieldValue, "#8"); - Assert.IsFalse (fieldValue.GetType ().IsEnum, "#9"); - Assert.AreEqual (_enumType, fieldValue.GetType (), "#10"); -#endif Assert.AreEqual (_fieldValue, (int) fieldValue, "#11"); } diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/ILGeneratorTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/ILGeneratorTest.cs index 616d687ee81..a31821924c7 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/ILGeneratorTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/ILGeneratorTest.cs @@ -58,7 +58,6 @@ namespace MonoTests.System.Reflection.Emit Assert.AreEqual ("localType", ex.ParamName, "#A"); } -#if NET_2_0 try { il_gen.DeclareLocal (null, false); Assert.Fail ("#B1"); @@ -69,7 +68,6 @@ namespace MonoTests.System.Reflection.Emit Assert.IsNotNull (ex.ParamName, "#B5"); Assert.AreEqual ("localType", ex.ParamName, "#B6"); } -#endif } [Test] @@ -187,9 +185,7 @@ namespace MonoTests.System.Reflection.Emit } [Test] // Emit (OpCode, ConstructorInfo) -#if NET_2_0 [Category ("NotDotNet")] // MS bug: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=304610 -#endif public void Emit3_Constructor_Null () { DefineBasicMethod (); @@ -204,7 +200,6 @@ namespace MonoTests.System.Reflection.Emit } } -#if NET_2_0 [Test] // Emit (OpCode, ConstructorInfo) [Category ("NotWorking")] // MS bug: https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=304610 public void Emit3_Constructor_Null_MS () @@ -216,7 +211,6 @@ namespace MonoTests.System.Reflection.Emit } catch (NullReferenceException) { } } -#endif [Test] // Emit (OpCode, FieldInfo) public void Emit5_Field_Null () @@ -364,7 +358,6 @@ namespace MonoTests.System.Reflection.Emit Assert.IsTrue ((bool) tf.Invoke (null, new object [] { true })); } -#if NET_2_0 delegate void FooFoo (); static void Foo () @@ -386,9 +379,7 @@ namespace MonoTests.System.Reflection.Emit dynt.GetMethod ("F", BindingFlags.Public | BindingFlags.Static).Invoke ( null, new object [] { Marshal.GetFunctionPointerForDelegate (new FooFoo (Foo)) }); } -#endif -#if NET_2_0 //Test for #509131 [Test] public void TestEmitCallIgnoresOptionalArgsForNonVarargMethod () @@ -400,18 +391,6 @@ namespace MonoTests.System.Reflection.Emit Assert.Fail ("#1"); } } -#else - [Test] - public void TestEmitCallThrowsOnOptionalArgsForNonVarargMethod () - { - DefineBasicMethod (); - try { - il_gen.EmitCall (OpCodes.Call, typeof (object).GetMethod ("GetHashCode"), new Type[] { typeof (string) }); - Assert.Fail ("#1"); - } catch (InvalidOperationException ex) { - } - } -#endif [Test] [ExpectedException (typeof (Exception))] diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs index 60ae8016cad..c14a6c388f2 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/MethodBuilderTest.cs @@ -284,11 +284,9 @@ namespace MonoTests.System.Reflection.Emit } [Test] -#if NET_2_0 // MS.NET 2.x no longer allows a zero length method body // to be emitted [ExpectedException (typeof (InvalidOperationException))] -#endif public void ZeroLengthBodyTest1 () { MethodBuilder mb = genClass.DefineMethod ( @@ -750,12 +748,8 @@ namespace MonoTests.System.Reflection.Emit Assert.IsTrue (pi [0].IsIn, "#A2"); Assert.AreEqual (52, pi [0].DefaultValue, "#A3"); object [] cattrs = pi [0].GetCustomAttributes (true); -#if NET_2_0 Assert.AreEqual (1, cattrs.Length, "#A4"); Assert.AreEqual (typeof (InAttribute), cattrs [0].GetType (), "#A5"); -#else - Assert.AreEqual (0, cattrs.Length, "#A4"); -#endif cattrs = pi [1].GetCustomAttributes (true); Assert.AreEqual ("foo", pi [1].DefaultValue, "#B1"); diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/MethodOnTypeBuilderInstTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/MethodOnTypeBuilderInstTest.cs index d0ff1465202..88a810f1461 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/MethodOnTypeBuilderInstTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/MethodOnTypeBuilderInstTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Collections.Generic; @@ -713,4 +712,3 @@ namespace MonoTests.System.Reflection.Emit } } -#endif diff --git a/mcs/class/corlib/Test/System.Reflection.Emit/ModuleBuilderTest.cs b/mcs/class/corlib/Test/System.Reflection.Emit/ModuleBuilderTest.cs index a72afba50bb..33d320e7299 100644 --- a/mcs/class/corlib/Test/System.Reflection.Emit/ModuleBuilderTest.cs +++ b/mcs/class/corlib/Test/System.Reflection.Emit/ModuleBuilderTest.cs @@ -214,7 +214,6 @@ namespace MonoTests.System.Reflection.Emit } // fail on MS .NET 1.1 -#if NET_2_0 TypeBuilder tb = mb.DefineType ("ITest2", TypeAttributes.Interface, typeof (object)); Assert.AreEqual (typeof (object), tb.BaseType, "#C1"); @@ -222,7 +221,6 @@ namespace MonoTests.System.Reflection.Emit tb = mb.DefineType ("ITest3", TypeAttributes.Interface, typeof (IDisposable)); Assert.AreEqual (typeof (IDisposable), tb.BaseType, "#D1"); -#endif } [Test] @@ -304,7 +302,6 @@ namespace MonoTests.System.Reflection.Emit Assert.AreEqual (s1.GetValue (i), s2.GetValue (i), "#2: " + i); } -#if NET_2_0 [Test] public void ResolveFieldTokenFieldBuilder () { @@ -564,7 +561,6 @@ namespace MonoTests.System.Reflection.Emit Assert.AreEqual (typeof (string), resolved_method.GetParameters () [0].ParameterType); Assert.AreEqual (typeof (int), resolved_method.GetParameters () [1].ParameterType); } -#endif [Test] public void GetTypes () @@ -586,9 +582,7 @@ namespace MonoTests.System.Reflection.Emit } [Test] // GetTypeToken (Type) -#if NET_2_0 [Category ("NotDotNet")] // http://support.microsoft.com/kb/950986 -#endif public void GetTypeToken2_Type_Array () { Type type; @@ -602,21 +596,15 @@ namespace MonoTests.System.Reflection.Emit type = typeof (object []); typeToken = mb.GetTypeToken (type); -#if NET_2_0 Assert.IsFalse (typeToken == TypeToken.Empty, "#A1"); resolved_type = mb.ResolveType (typeToken.Token); Assert.AreEqual (type, resolved_type, "#A2"); -#else - Assert.IsFalse (typeToken.Token == TypeToken.Empty.Token, "#A1"); -#endif -#if NET_2_0 type = typeof (object).MakeArrayType (); typeToken = mb.GetTypeToken (type); Assert.IsFalse (typeToken == TypeToken.Empty, "#B1"); resolved_type = mb.ResolveType (typeToken.Token); Assert.AreEqual (type, resolved_type, "#B2"); -#endif } [Test] // GetTypeToken (Type) @@ -628,16 +616,11 @@ namespace MonoTests.System.Reflection.Emit ModuleBuilder mb = ab.DefineDynamicModule ("MyModule"); Type type = typeof (string); TypeToken typeToken = mb.GetTypeToken (type); -#if NET_2_0 Assert.IsFalse (typeToken == TypeToken.Empty, "#1"); Type resolved_type = mb.ResolveType (typeToken.Token); Assert.AreEqual (type, resolved_type, "#2"); -#else - Assert.IsFalse (typeToken.Token == TypeToken.Empty.Token, "#1"); -#endif } -#if NET_2_0 [Test] // bug #471302 public void ModuleBuilder_ModuleVersionId () { @@ -649,7 +632,6 @@ namespace MonoTests.System.Reflection.Emit Assert.AreNotEqual (new Guid (), module.ModuleVersionId); } -#endif [Test] public void GetType_String_Null () diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyCas.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyCas.cs index 31114c46313..7e34570450b 100644 --- a/mcs/class/corlib/Test/System.Reflection/AssemblyCas.cs +++ b/mcs/class/corlib/Test/System.Reflection/AssemblyCas.cs @@ -239,18 +239,6 @@ namespace MonoCasTests.System.Reflection { // e.g. in this case both assemblies are already loaded in memory at.LoadWithPartialName (); } -#if !NET_2_0 - // that one is unclear (undocumented) and doesn't happen in 2.0 - // will not be implemented in Mono unless if find out why... - [Category ("NotWorking")] - [Test] - [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] - [ExpectedException (typeof (SecurityException))] - public void LoadWithPartialName_Deny_SecurityPermission () - { - at.LoadWithPartialName (); - } -#endif // we use reflection to call Assembly as some methods and events are protected // by LinkDemand (which will be converted into full demand, i.e. a stack walk) // when reflection is used (i.e. it gets testable). diff --git a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs index 8ff66095363..c0f83169d4e 100644 --- a/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/AssemblyTest.cs @@ -88,12 +88,8 @@ namespace MonoTests.System.Reflection } [Test] // bug #49114 -#if NET_2_0 [Category ("NotWorking")] [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (TypeLoadException))] -#endif public void GetType_TypeName_Invalid () { typeof (int).Assembly.GetType ("&blabla", true, true); @@ -104,7 +100,6 @@ namespace MonoTests.System.Reflection { Assembly a = typeof (int).Assembly; string typeName = typeof (string).AssemblyQualifiedName; -#if NET_2_0 try { a.GetType (typeName, true, false); Assert.Fail ("#A1"); @@ -114,17 +109,6 @@ namespace MonoTests.System.Reflection Assert.IsNotNull (ex.Message, "#A4"); Assert.IsNull (ex.ParamName, "#A5"); } -#else - try { - a.GetType (typeName, true, false); - Assert.Fail ("#A1"); - } catch (TypeLoadException ex) { - Assert.AreEqual (typeof (TypeLoadException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsTrue (ex.Message.IndexOf (typeName) != -1, "#A5"); - } -#endif Type type = a.GetType (typeName, false); Assert.IsNull (type, "#B1"); @@ -141,14 +125,10 @@ namespace MonoTests.System.Reflection string fname = AppDomain.CurrentDomain.FriendlyName; if (fname.EndsWith (".dll")) { // nunit-console Assert.IsNull (Assembly.GetEntryAssembly (), "GetEntryAssembly"); -#if NET_2_0 Assert.IsFalse (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain"); -#endif } else { // gnunit Assert.IsNotNull (Assembly.GetEntryAssembly (), "GetEntryAssembly"); -#if NET_2_0 Assert.IsTrue (AppDomain.CurrentDomain.IsDefaultAppDomain (), "!default appdomain"); -#endif } } @@ -589,15 +569,11 @@ namespace MonoTests.System.Reflection Assert.AreEqual ("readme.txt", resInfo.FileName, "#A6"); Assert.IsNull (resInfo.ReferencedAssembly, "#A7"); Assert.AreEqual ((ResourceLocation) 0, resInfo.ResourceLocation, "#A8"); -#if NET_2_0 try { assembly.GetManifestResourceStream ("read"); Assert.Fail ("#A9"); } catch (FileNotFoundException) { } -#else - Assert.IsNull (assembly.GetManifestResourceStream ("read"), "#A9"); -#endif try { assembly.GetFile ("readme.txt"); Assert.Fail ("#A10"); @@ -621,7 +597,6 @@ namespace MonoTests.System.Reflection } } -#if NET_2_0 [Test] [Category ("NotWorking")] public void ReflectionOnlyLoad () @@ -650,7 +625,6 @@ namespace MonoTests.System.Reflection Assembly assembly = Assembly.ReflectionOnlyLoad (typeof (AssemblyTest).Assembly.FullName); assembly.CreateInstance ("MonoTests.System.Reflection.AssemblyTest"); } -#endif [Test] [Category ("NotWorking")] // patch for bug #79720 must be committed first @@ -760,11 +734,7 @@ namespace MonoTests.System.Reflection } [Test] // bug #79712 -#if NET_2_0 [Category ("NotWorking")] // in non-default domain, MS throws FileNotFoundException -#else - [Category ("NotWorking")] -#endif public void Load_Culture_Mismatch () { string tempDir = Path.Combine (Path.GetTempPath (), @@ -787,11 +757,7 @@ namespace MonoTests.System.Reflection aname = new AssemblyName (); aname.Name = "bug79712a"; aname.CultureInfo = CultureInfo.InvariantCulture; -#if NET_2_0 Assert.IsTrue (cdt.AssertFileNotFoundException (aname), "#A1"); -#else - Assert.IsTrue (cdt.AssertFileLoadException (aname), "#A2"); -#endif // PART B @@ -803,11 +769,7 @@ namespace MonoTests.System.Reflection aname = new AssemblyName (); aname.Name = "bug79712b"; aname.CultureInfo = new CultureInfo ("en-US"); -#if NET_2_0 Assert.IsTrue (cdt.AssertFileNotFoundException (aname), "#B1"); -#else - Assert.IsTrue (cdt.AssertFileLoadException (aname), "#B2"); -#endif } finally { AppDomain.Unload (ad); if (Directory.Exists (tempDir)) diff --git a/mcs/class/corlib/Test/System.Reflection/BinderTests.cs b/mcs/class/corlib/Test/System.Reflection/BinderTests.cs index ab0c5356aff..c96913e9642 100644 --- a/mcs/class/corlib/Test/System.Reflection/BinderTests.cs +++ b/mcs/class/corlib/Test/System.Reflection/BinderTests.cs @@ -370,19 +370,11 @@ namespace MonoTests.System.Reflection MethodInfo mi_run = type.GetMethod ("Run", flags, binder, new Type [] { typeof (int) }, null); Assert.IsFalse (mi_run.GetParameters () [0].ParameterType.IsByRef, "#A1"); -#if NET_2_0 MethodInfo mi_run_ref = type.GetMethod ("Run", flags, binder, new Type [] { typeof (int).MakeByRefType () }, null); -#else - MethodInfo mi_run_ref = type.GetMethod ("RunV1", flags); -#endif Assert.IsTrue (mi_run_ref.GetParameters () [0].ParameterType.IsByRef, "#A2"); -#if NET_2_0 ref_int = typeof (int).MakeByRefType (); -#else - ref_int = mi_run_ref.GetParameters () [0].ParameterType; -#endif match = new MethodBase [] { mi_run_ref }; types = new Type [] { typeof (int) }; @@ -568,12 +560,8 @@ namespace MonoTests.System.Reflection MethodInfo mi_run = type.GetMethod ("Run", flags, binder, new Type [] { typeof (int) }, null); Assert.IsFalse (mi_run.GetParameters () [0].ParameterType.IsByRef, "#A1"); -#if NET_2_0 MethodInfo mi_run_ref = type.GetMethod ("Run", flags, binder, new Type [] { typeof (int).MakeByRefType () }, null); -#else - MethodInfo mi_run_ref = type.GetMethod ("RunV1", flags); -#endif Assert.IsTrue (mi_run_ref.GetParameters () [0].ParameterType.IsByRef, "#A2"); match = new MethodBase [] { mi_run }; @@ -1048,7 +1036,6 @@ namespace MonoTests.System.Reflection Assert.AreEqual (3, bug42457_2, "#6"); } -#if NET_2_0 [Test] public void NullableArg () { MethodInfo method = (typeof (BinderTest)).GetMethod("SetA", new [] {typeof (Int32)}); @@ -1058,7 +1045,6 @@ namespace MonoTests.System.Reflection public int SetA(Int32? a) { return (int)a; } -#endif static void MethodWithLongParam(long param) { @@ -1355,11 +1341,7 @@ namespace MonoTests.System.Reflection { } -#if NET_2_0 public void Run (out int i) -#else - public void RunV1 (out int i) -#endif { i = 0; } diff --git a/mcs/class/corlib/Test/System.Reflection/EventInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/EventInfoTest.cs index c2268b00211..8147e9fe839 100644 --- a/mcs/class/corlib/Test/System.Reflection/EventInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/EventInfoTest.cs @@ -70,7 +70,6 @@ namespace MonoTests.System.Reflection Assert.IsNotNull (pub.GetRemoveMethod (), "#B3"); } -#if NET_2_0 [Test] public void AddHandlerToNullInstanceEventRaisesTargetException () { @@ -114,7 +113,6 @@ namespace MonoTests.System.Reflection Assert.Fail ("#1"); } catch (InvalidOperationException) {} } -#endif #pragma warning disable 67 public class PrivateEvent diff --git a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs index a7c5c2463e6..98cfc3f3e17 100644 --- a/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/FieldInfoTest.cs @@ -232,7 +232,6 @@ namespace MonoTests.System.Reflection } } -#if NET_2_0 [Test] // GetFieldFromHandle (RuntimeFieldHandle, RuntimeTypeHandle) public void GetFieldFromHandle2_DeclaringType_Zero () { @@ -315,7 +314,6 @@ namespace MonoTests.System.Reflection FieldInfo fi2 = FieldInfo.GetFieldFromHandle (fh, th); } -#endif [Test] public void PseudoCustomAttributes () diff --git a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs index 00349880e1f..ac30bc8e5c9 100644 --- a/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/MethodInfoTest.cs @@ -37,9 +37,7 @@ using System.Reflection.Emit; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; -#if NET_2_0 using System.Collections.Generic; -#endif namespace A.B.C { // Disable expected warning @@ -97,7 +95,6 @@ namespace MonoTests.System.Reflection } } -#if NET_2_0 [Test] public void PseudoCustomAttributes () { @@ -135,7 +132,6 @@ namespace MonoTests.System.Reflection Assert.IsTrue (mi.ReturnTypeCustomAttributes.GetCustomAttributes (typeof (MarshalAsAttribute), true).Length == 1); } -#endif public static int foo (int i, int j) { @@ -215,18 +211,10 @@ namespace MonoTests.System.Reflection method.Invoke (null, new object [0]); Assert.Fail ("#1"); } -#if NET_2_0 catch (ThreadAbortException ex) { Thread.ResetAbort (); Assert.IsNull (ex.InnerException, "#2"); } -#else - catch (TargetInvocationException ex) { - Thread.ResetAbort (); - Assert.IsNotNull (ex.InnerException, "#2"); - Assert.AreEqual (typeof (ThreadAbortException), ex.InnerException.GetType (), "#3"); - } -#endif } public static void AbortIt () @@ -316,7 +304,6 @@ namespace MonoTests.System.Reflection Assert.AreSame (inheritedMethod, baseMethod); } -#if NET_2_0 [Test] public void GetMethodBody_Abstract () { @@ -740,7 +727,6 @@ namespace MonoTests.System.Reflection { } } -#endif #if NET_4_0 interface IMethodInvoke<out T> { @@ -826,7 +812,6 @@ namespace MonoTests.System.Reflection #endif } -#if NET_2_0 // Helper class class RefOnlyMethodClass { @@ -850,5 +835,4 @@ namespace MonoTests.System.Reflection set { _myList = value; } } } -#endif } diff --git a/mcs/class/corlib/Test/System.Reflection/ModuleCas.cs b/mcs/class/corlib/Test/System.Reflection/ModuleCas.cs index 2251fe27bda..29a7c0351c5 100644 --- a/mcs/class/corlib/Test/System.Reflection/ModuleCas.cs +++ b/mcs/class/corlib/Test/System.Reflection/ModuleCas.cs @@ -72,12 +72,10 @@ namespace MonoCasTests.System.Reflection { { // call "normal" unit with reduced privileges mt.FindTypes (); -#if NET_2_0 mt.ResolveType (); mt.ResolveMethod (); mt.ResolveField (); mt.ResolveMember (); -#endif // properties Assert.IsNotNull (main.Assembly, "Assembly"); Assert.IsNotNull (main.ScopeName, "ScopeName"); diff --git a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs index dbe1bde1b42..46edaece552 100644 --- a/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/ModuleTest.cs @@ -155,7 +155,6 @@ public class ModuleTest } #endif -#if NET_2_0 [Test] public void ResolveType () { @@ -304,7 +303,6 @@ public class ModuleTest MethodBase res = mod.ResolveMethod (method.MetadataToken); Assert.AreEqual (method, res, "#1"); } -#endif [Test] public void FindTypes () diff --git a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs index c0a6e39bcdb..90362747a6c 100644 --- a/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/ParameterInfoTest.cs @@ -72,7 +72,7 @@ namespace MonoTests.System.Reflection } } -#if NET_2_0 && !NET_2_1 +#if !NET_2_1 public enum ParamEnum { None = 0, Foo = 1, diff --git a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs index f461e8be636..49af23097c8 100644 --- a/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs +++ b/mcs/class/corlib/Test/System.Reflection/PropertyInfoTest.cs @@ -98,7 +98,6 @@ namespace MonoTests.System.Reflection methods = property.GetAccessors (); Assert.AreEqual (0, methods.Length, "#H"); -#if NET_2_0 property = typeof (TestClass).GetProperty ("PrivateSetter"); methods = property.GetAccessors (true); @@ -117,7 +116,6 @@ namespace MonoTests.System.Reflection Assert.AreEqual (1, methods.Length, "#J1"); Assert.IsNotNull (methods [0], "#J2"); Assert.AreEqual ("get_PrivateSetter", methods [0].Name, "#J3"); -#endif } [Test] @@ -480,12 +478,10 @@ namespace MonoTests.System.Reflection set { } } -#if NET_2_0 public string PrivateSetter { get { return null; } private set { } } -#endif } [Test] // bug #633671 diff --git a/mcs/class/corlib/Test/System.Resources/ResourceReaderTest.cs b/mcs/class/corlib/Test/System.Resources/ResourceReaderTest.cs index ddbca3dedc4..22edae8269f 100644 --- a/mcs/class/corlib/Test/System.Resources/ResourceReaderTest.cs +++ b/mcs/class/corlib/Test/System.Resources/ResourceReaderTest.cs @@ -186,7 +186,6 @@ namespace MonoTests.System.Resources reader.Close (); } -#if NET_2_0 [Test] // bug #81757 public void ReadNullResource () { @@ -208,7 +207,6 @@ namespace MonoTests.System.Resources Assert.AreEqual (1, entryCount, "#4"); } } -#endif [Test] // bug #79976 public void ByteArray () @@ -217,19 +215,10 @@ namespace MonoTests.System.Resources Stream stream = null; -#if NET_2_0 // we currently do not support writing v2 resource files stream = new MemoryStream (); stream.Write (byte_resource_v2, 0, byte_resource_v2.Length); stream.Position = 0; -#else - using (IResourceWriter rw = new ResourceWriter (_tempResourceFile)) { - rw.AddResource ("byteArrayTest", content); - rw.Generate (); - } - - stream = File.OpenRead (_tempResourceFile); -#endif using (stream) { int entryCount = 0; diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/InternalsVisibleToAttributeTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/InternalsVisibleToAttributeTest.cs index 8864be68a33..4f5ec5129f5 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/InternalsVisibleToAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/InternalsVisibleToAttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System.Runtime.CompilerServices; @@ -79,4 +78,3 @@ namespace MonoTests.System.Runtime.CompilerServices { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionCas.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionCas.cs index 1d9cee3ae4e..8efd9d7dcd6 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionCas.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -91,4 +90,3 @@ namespace MonoCasTests.System.Runtime.CompilerServices { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionTest.cs b/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionTest.cs index 421dbd9c3da..b71bc746a6f 100644 --- a/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.CompilerServices/RuntimeWrappedExceptionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -87,4 +86,3 @@ namespace MonoTests.System.Runtime.CompilerServices { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs index 28943159aa1..cecdc6437c2 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/MarshalTest.cs @@ -497,7 +497,6 @@ namespace MonoTests.System.Runtime.InteropServices Marshal.FreeCoTaskMem (ptr); } } -#if NET_2_0 private const string NotSupported = "Not supported before Windows 2000 Service Pack 3"; private static char[] PlainText = new char[] { 'a', 'b', 'c' }; private static byte[] AsciiPlainText = new byte[] { (byte) 'a', (byte) 'b', (byte) 'c' }; @@ -663,7 +662,6 @@ namespace MonoTests.System.Runtime.InteropServices Assert.Ignore (NotSupported); } } -#endif #if !NET_2_1 [Test] @@ -780,7 +778,6 @@ namespace MonoTests.System.Runtime.InteropServices Assert.IsNull (Marshal.PtrToStructure (IntPtr.Zero, typeof (SimpleStruct2))); } -#if NET_2_0 [Test] public void TestGetExceptionForHR () { @@ -793,7 +790,6 @@ namespace MonoTests.System.Runtime.InteropServices ex = Marshal.GetExceptionForHR (E_INVALIDARG); Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "E_INVALIDARG"); } -#endif bool RunningOnUnix { get { int p = (int) Environment.OSVersion.Platform; diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentCas.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentCas.cs index cb58afe577c..0de0009f8a6 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentCas.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/RuntimeEnvironmentCas.cs @@ -54,12 +54,7 @@ namespace MonoCasTests.System.Runtime.InteropServices { public void PartialTrust_DenyUnrestricted_Success () { Assembly corlib = typeof (int).Assembly; -#if NET_2_0 Assert.IsTrue (RuntimeEnvironment.FromGlobalAccessCache (corlib), "corlib"); -#else - // note: mscorlib.dll wasn't in the GAC for 1.x - Assert.IsFalse (RuntimeEnvironment.FromGlobalAccessCache (corlib), "corlib"); -#endif Assembly corlib_test = Assembly.GetExecutingAssembly (); Assert.IsFalse (RuntimeEnvironment.FromGlobalAccessCache (corlib_test), "corlib_test"); } diff --git a/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs b/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs index 3c986d0d57d..a196bcd0cd4 100644 --- a/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.InteropServices/SafeHandleTest.cs @@ -6,7 +6,6 @@ // // Copyright (C) 2004-2006 Novell, Inc (http://www.novell.com) // -#if NET_2_0 using NUnit.Framework; using System; using System.Runtime.InteropServices; @@ -249,4 +248,3 @@ namespace MonoTests.System.Runtime.InteropServices } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.Remoting.Channels/ChannelServicesTest.cs b/mcs/class/corlib/Test/System.Runtime.Remoting.Channels/ChannelServicesTest.cs index b8c05456c69..3d18f9ebd81 100644 --- a/mcs/class/corlib/Test/System.Runtime.Remoting.Channels/ChannelServicesTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Remoting.Channels/ChannelServicesTest.cs @@ -39,7 +39,6 @@ namespace MonoTests.System.Runtime.Remoting.Channels [TestFixture] public class ChannelServicesTest { -#if NET_2_0 [Test] [ExpectedException (typeof (RemotingException))] public void ConstructorEnsureSecurity () @@ -82,6 +81,5 @@ namespace MonoTests.System.Runtime.Remoting.Channels set { } } } -#endif } } diff --git a/mcs/class/corlib/Test/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs b/mcs/class/corlib/Test/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs index 6cca9fafa2b..3b09a530364 100644 --- a/mcs/class/corlib/Test/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinaryTest.cs @@ -106,7 +106,6 @@ namespace MonoTests.System.Runtime.Remoting.Metadata.W3cXsd2001 SoapHexBinary shb; xsdHexBinary = "3f789ABG"; -#if NET_2_0 try { SoapHexBinary.Parse (xsdHexBinary); Assert.Fail ("#A1"); @@ -119,13 +118,6 @@ namespace MonoTests.System.Runtime.Remoting.Metadata.W3cXsd2001 Assert.IsTrue (ex.Message.IndexOf ("xsd:hexBinary") != -1, "#A5"); Assert.IsTrue (ex.Message.IndexOf (xsdHexBinary) != -1, "#A6"); } -#else - shb = SoapHexBinary.Parse (xsdHexBinary); - Assert.AreEqual ("hexBinary", shb.GetXsdType (), "#A1"); - Assert.AreEqual ("3F789AB0", shb.ToString (), "#A2"); - Assert.AreEqual (new byte [] { 63, 120, 154, 176 }, shb.Value, "#A3"); - -#endif xsdHexBinary = "3f789AbCE"; try { @@ -142,7 +134,6 @@ namespace MonoTests.System.Runtime.Remoting.Metadata.W3cXsd2001 } xsdHexBinary = "3f789GbC"; -#if NET_2_0 try { shb = SoapHexBinary.Parse (xsdHexBinary); Assert.Fail ("#C1"); @@ -155,15 +146,8 @@ namespace MonoTests.System.Runtime.Remoting.Metadata.W3cXsd2001 Assert.IsTrue (ex.Message.IndexOf ("xsd:hexBinary") != -1, "#C5"); Assert.IsTrue (ex.Message.IndexOf (xsdHexBinary) != -1, "#C6"); } -#else - shb = SoapHexBinary.Parse (xsdHexBinary); - Assert.AreEqual ("hexBinary", shb.GetXsdType (), "#C1"); - Assert.AreEqual ("3F7890BC", shb.ToString (), "#C2"); - Assert.AreEqual (new byte [] { 63, 120, 144, 188 }, shb.Value, "#C3"); -#endif xsdHexBinary = "3f-89ABC"; -#if NET_2_0 try { shb = SoapHexBinary.Parse (xsdHexBinary); Assert.Fail ("#D1"); @@ -176,12 +160,6 @@ namespace MonoTests.System.Runtime.Remoting.Metadata.W3cXsd2001 Assert.IsTrue (ex.Message.IndexOf ("xsd:hexBinary") != -1, "#D5"); Assert.IsTrue (ex.Message.IndexOf (xsdHexBinary) != -1, "#D6"); } -#else - shb = SoapHexBinary.Parse (xsdHexBinary); - Assert.AreEqual ("hexBinary", shb.GetXsdType (), "#D1"); - Assert.AreEqual ("3F089ABC", shb.ToString (), "#D2"); - Assert.AreEqual (new byte [] { 63, 8, 154, 188 }, shb.Value, "#D3"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization.Formatters.Binary/BinaryFormatterTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization.Formatters.Binary/BinaryFormatterTest.cs index 641f2d7c25d..7cf781c6531 100644 --- a/mcs/class/corlib/Test/System.Runtime.Serialization.Formatters.Binary/BinaryFormatterTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Serialization.Formatters.Binary/BinaryFormatterTest.cs @@ -311,11 +311,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Binary public void Constructor_Default () { BinaryFormatter bf = new BinaryFormatter (); -#if NET_2_0 Assert.AreEqual (FormatterAssemblyStyle.Simple, bf.AssemblyFormat, "AssemblyFormat"); -#else - Assert.AreEqual (FormatterAssemblyStyle.Full, bf.AssemblyFormat, "AssemblyFormat"); -#endif Assert.IsNull (bf.Binder, "Binder"); Assert.AreEqual (StreamingContextStates.All, bf.Context.State, "Context"); Assert.AreEqual (TypeFilterLevel.Full, bf.FilterLevel, "FilterLevel"); @@ -328,11 +324,7 @@ namespace MonoTests.System.Runtime.Serialization.Formatters.Binary { SurrogateSelector ss = new SurrogateSelector (); BinaryFormatter bf = new BinaryFormatter (ss, new StreamingContext (StreamingContextStates.CrossMachine)); -#if NET_2_0 Assert.AreEqual (FormatterAssemblyStyle.Simple, bf.AssemblyFormat, "AssemblyFormat"); -#else - Assert.AreEqual (FormatterAssemblyStyle.Full, bf.AssemblyFormat, "AssemblyFormat"); -#endif Assert.IsNull (bf.Binder, "Binder"); Assert.AreEqual (StreamingContextStates.CrossMachine, bf.Context.State, "Context"); Assert.AreEqual (TypeFilterLevel.Full, bf.FilterLevel, "FilterLevel"); diff --git a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationCallbackTest.cs b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationCallbackTest.cs index 7c0aa7cd617..c883d52397e 100644 --- a/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationCallbackTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Serialization/SerializationCallbackTest.cs @@ -4,7 +4,6 @@ // Author: Robert Jordan (robertj@gmx.net) // -#if NET_2_0 using System; using System.Diagnostics; @@ -238,4 +237,3 @@ namespace MonoTests.System.Runtime.Serialization } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeCas.cs b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeCas.cs index 73420b20592..bdd767c439c 100644 --- a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeCas.cs +++ b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeCas.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.Reflection; @@ -74,4 +73,3 @@ namespace MonoCasTests.System.Runtime.Versioning { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeTest.cs b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeTest.cs index 8e278f8612b..4ba38693e5a 100644 --- a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceConsumptionAttributeTest.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.Runtime.Versioning; @@ -87,4 +86,3 @@ namespace MonoTests.System.Runtime.Versioning { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeCas.cs b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeCas.cs index ef51eeb0c42..f2e9982e261 100644 --- a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeCas.cs +++ b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeCas.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.Reflection; @@ -72,4 +71,3 @@ namespace MonoCasTests.System.Runtime.Versioning { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeTest.cs b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeTest.cs index 85ac3d0a33e..106f7f5ce6c 100644 --- a/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Versioning/ResourceExposureAttributeTest.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.Runtime.Versioning; @@ -60,4 +59,3 @@ namespace MonoTests.System.Runtime.Versioning { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperCas.cs b/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperCas.cs index 5a42139244f..0f650dd5beb 100644 --- a/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperCas.cs +++ b/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperCas.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.Reflection; @@ -76,4 +75,3 @@ namespace MonoCasTests.System.Runtime.Versioning { } } -#endif diff --git a/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperTest.cs b/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperTest.cs index 6a313021b66..1c37e8d0c62 100644 --- a/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperTest.cs +++ b/mcs/class/corlib/Test/System.Runtime.Versioning/VersioningHelperTest.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.Runtime.Versioning; @@ -159,4 +158,3 @@ namespace MonoTests.System.Runtime.Versioning { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs index 59998c37221..50dfe0e157d 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CapiTest.cs @@ -130,17 +130,10 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { byte[] hash = { 0xD6,0x2F,0x48,0xD0,0x13,0xEE,0x7F,0xB5,0x8B,0x79,0x07,0x45,0x12,0x67,0x0D,0x9C,0x5B,0x3A,0x5D,0xA9 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("D62F48D013EE7FB58B79074512670D9C5B3A5DA9", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("03/12/1996 18:38:47", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("03/12/1997 18:38:46", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("03/12/1996 10:38:47", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("03/12/1997 10:38:46", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-701544240, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=\"RSA Data Security, Inc.\", OU=Secure Server Certification Authority", x509.GetIssuerName (), "GetIssuerName"); @@ -156,17 +149,11 @@ namespace MonoTests.System.Security.Cryptography.X509Certificates { Assert.AreEqual (ToString (cert), x509.GetRawCertDataString (), "GetRawCertDataString"); byte[] serial = { 0xE8,0x06,0x00,0x72,0x02 }; Assert.AreEqual (serial, x509.GetSerialNumber (), "GetSerialNumber"); -#if NET_2_0 Assert.AreEqual ("02720006E8", x509.GetSerialNumberString (), "GetSerialNumberString"); -#else - Assert.AreEqual ("E806007202", x509.GetSerialNumberString (), "GetSerialNumberString"); -#endif } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void ConstructorIntPtrZero () { X509Certificate spc = new X509Certificate (IntPtr.Zero); diff --git a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateCas.cs b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateCas.cs index 456f1e7c773..b2cef567465 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateCas.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateCas.cs @@ -122,16 +122,10 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { byte[] hash = { 0xD6,0x2F,0x48,0xD0,0x13,0xEE,0x7F,0xB5,0x8B,0x79,0x07,0x45,0x12,0x67,0x0D,0x9C,0x5B,0x3A,0x5D,0xA9 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("D62F48D013EE7FB58B79074512670D9C5B3A5DA9", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("03/12/1996 18:38:47", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("03/12/1997 18:38:46", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("03/12/1996 10:38:47", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("03/12/1997 10:38:46", x509.GetExpirationDateString (), "GetExpirationDateString"); -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-701544240, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=\"RSA Data Security, Inc.\", OU=Secure Server Certification Authority", x509.GetIssuerName (), "GetIssuerName"); @@ -147,11 +141,7 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { Assert.IsNotNull (x509.GetRawCertDataString (), "GetRawCertDataString"); byte[] serial = { 0xE8,0x06,0x00,0x72,0x02 }; Assert.AreEqual (serial, x509.GetSerialNumber (), "GetSerialNumber"); -#if NET_2_0 Assert.AreEqual ("02720006E8", x509.GetSerialNumberString (), "GetSerialNumberString"); -#else - Assert.AreEqual ("E806007202", x509.GetSerialNumberString (), "GetSerialNumberString"); -#endif Assert.IsNotNull (x509.ToString (true), "ToString"); } @@ -195,11 +185,7 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { [Test] [SecurityPermission (SecurityAction.Deny, UnmanagedCode = true)] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (SecurityException))] -#endif public void ConstructorIntPtr_DenyUnmanagedCode () { // will fail before calling the constructor @@ -208,9 +194,7 @@ namespace MonoCasTests.System.Security.Cryptography.X509Certificates { [Test] [SecurityPermission (SecurityAction.PermitOnly, UnmanagedCode = true)] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void ConstructorIntPtr_PermitOnlyUnmanagedCode () { // will fail _when_ calling the constructor diff --git a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs index 90402780c7c..24cf2b4ccc4 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography.X509Certificates/X509CertificateTest.cs @@ -74,18 +74,10 @@ public void Equality () X509Certificate x509 = new X509Certificate (cert); Assert.IsFalse (x509.Equals (null), "#1"); -#if !NET_2_0 - X509Certificate nullobj = new X509Certificate (IntPtr.Zero); - Assert.IsFalse (x509.Equals (nullobj), "#2"); - Assert.IsFalse (nullobj.Equals (null), "#3"); - Assert.IsFalse (nullobj.Equals (x509), "#4"); -#endif } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void ConstructorX509CertificateNull () { X509Certificate nullcopy = new X509Certificate ((X509Certificate) null); @@ -124,19 +116,11 @@ public void Certificate1 () byte[] hash = { 0xD6,0x2F,0x48,0xD0,0x13,0xEE,0x7F,0xB5,0x8B,0x79,0x07,0x45,0x12,0x67,0x0D,0x9C,0x5B,0x3A,0x5D,0xA9 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("D62F48D013EE7FB58B79074512670D9C5B3A5DA9", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("03/12/1996 18:38:47", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("03/12/1997 18:38:46", until.ToString (), "GetExpirationDateString"); Assert.AreEqual ("02720006E8", x509.GetSerialNumberString (), "GetSerialNumberString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("03/12/1996 10:38:47", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("03/12/1997 10:38:46", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) - Assert.AreEqual ("E806007202", x509.GetSerialNumberString (), "GetSerialNumberString"); -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-701544240, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=\"RSA Data Security, Inc.\", OU=Secure Server Certification Authority", x509.GetIssuerName (), "GetIssuerName"); @@ -160,10 +144,8 @@ public void Certificate1 () 0x30,0x31,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("OU=Secure Server Certification Authority, O=\"RSA Data Security, Inc.\", C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("OU=Server Certification Authority, O=CommerceNet, S=California, C=US", x509.Subject, "Subject"); -#endif } @@ -197,17 +179,10 @@ public void Certificate2 () byte[] hash = { 0x9E,0x87,0x80,0x3E,0xC5,0x68,0x9A,0xEF,0xE7,0x7F,0x92,0xF9,0x1A,0xBF,0xA7,0x46,0x7C,0x76,0xED,0x02 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("9E87803EC5689AEFE77F92F91ABFA7467C76ED02", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("01/18/1996 21:03:52", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("01/16/2001 21:03:52", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("01/18/1996 13:03:52", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("01/16/2001 13:03:52", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-1635286978, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=AT&T, OU=Directory Services", x509.GetIssuerName (), "GetIssuerName"); @@ -233,10 +208,8 @@ public void Certificate2 () 0x35,0x36,0x44,0x30,0x32,0x30,0x31,0x30,0x46,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("OU=Directory Services, O=AT&T, C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("OU=Directory Services, O=AT&T, C=US", x509.Subject, "Subject"); -#endif } @@ -273,19 +246,11 @@ public void Certificate3 () byte[] hash = { 0x39,0x5F,0xBB,0xFC,0x14,0x89,0x33,0x27,0x76,0x89,0xB7,0x59,0x3A,0x7D,0x1C,0xFF,0xF1,0x56,0xF1,0x62 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("395FBBFC148933277689B7593A7D1CFFF156F162", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("08/07/1996 00:00:00", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("08/31/1996 23:59:59", until.ToString (), "GetExpirationDateString"); Assert.AreEqual ("0353D78BDB3E16158055C4054002734D0C20F80D88005F657AACBA86BD1CD7E4", x509.GetSerialNumberString (), "GetSerialNumberString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("08/06/1996 16:00:00", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("08/31/1996 15:59:59", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) - Assert.AreEqual ("E4D71CBD86BAAC7A655F00880DF8200C4D73024005C4558015163EDB8BD75303", x509.GetSerialNumberString (), "GetSerialNumberString"); -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (962575356, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=CCA - Unique ID, CN=Brand Name:Product Type", x509.GetIssuerName (), "GetIssuerName"); @@ -309,10 +274,8 @@ public void Certificate3 () 0x30,0x33,0x30,0x31,0x30,0x30,0x30,0x31,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("CN=Brand Name:Product Type, O=CCA - Unique ID, C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("CN=\"0+WKJx+wYEZabSSPVX9kLsnx92s=\", OU=Issuing Financial Institution, O=BrandID, C=US", x509.Subject, "Subject"); -#endif } @@ -347,19 +310,11 @@ public void Certificate4 () byte[] hash = { 0x0D,0x97,0x44,0x61,0x70,0x37,0x13,0xCB,0x74,0x93,0x2D,0x2A,0x75,0xAC,0xBC,0x71,0x4B,0x28,0x12,0x66 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("0D974461703713CB74932D2A75ACBC714B281266", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("11/09/1994 23:54:17", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("12/31/1999 23:54:17", until.ToString (), "GetExpirationDateString"); Assert.AreEqual ("0241000001", x509.GetSerialNumberString (), "GetSerialNumberString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("11/09/1994 15:54:17", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("12/31/1999 15:54:17", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) - Assert.AreEqual ("0100004102", x509.GetSerialNumberString (), "GetSerialNumberString"); -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (228017249, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=\"RSA Data Security, Inc.\", OU=Secure Server Certification Authority", x509.GetIssuerName (), "GetIssuerName"); @@ -384,10 +339,8 @@ public void Certificate4 () 0x33,0x35,0x30,0x38,0x39,0x35,0x36,0x39,0x38,0x34,0x38,0x42,0x39,0x31,0x44,0x41,0x37,0x32,0x39,0x31,0x41,0x31,0x33,0x32,0x45,0x34,0x41,0x31,0x31,0x35,0x39,0x39,0x43,0x31,0x45,0x31,0x35,0x44,0x35,0x34,0x39,0x35,0x34,0x32,0x43,0x37,0x33,0x33,0x41,0x36,0x39,0x38,0x32,0x42,0x31,0x39,0x37,0x33,0x39,0x39,0x43,0x36,0x44,0x37,0x30,0x36,0x37,0x34,0x38,0x45,0x35,0x44,0x44,0x32,0x44,0x44,0x36,0x43,0x38,0x31,0x45,0x37,0x42,0x30,0x32,0x30,0x33,0x30,0x31,0x30,0x30,0x30,0x31,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("OU=Secure Server Certification Authority, O=\"RSA Data Security, Inc.\", C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("OU=Secure Server Certification Authority, O=\"RSA Data Security, Inc.\", C=US", x509.Subject, "Subject"); -#endif } @@ -431,17 +384,10 @@ public void Certificate5 () byte[] hash = { 0x63,0xDB,0x7A,0x42,0x67,0x39,0x75,0x39,0x2A,0xC6,0xA4,0xFA,0xE3,0xD7,0x84,0x46,0xB4,0x67,0xC3,0x26 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("63DB7A42673975392AC6A4FAE3D78446B467C326", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("07/15/1997 00:00:00", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("07/15/2004 00:00:00", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("07/14/1997 16:00:00", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("07/14/2004 16:00:00", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (1675328066, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=SET Root", x509.GetIssuerName (), "GetIssuerName"); @@ -470,10 +416,8 @@ public void Certificate5 () 0x45,0x37,0x43,0x33,0x30,0x33,0x33,0x37,0x37,0x46,0x44,0x35,0x44,0x45,0x30,0x35,0x37,0x30,0x44,0x36,0x43,0x31,0x39,0x33,0x39,0x30,0x32,0x30,0x33,0x30,0x31,0x30,0x30,0x30,0x31,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("O=SET Root, C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("O=SET Root, C=US", x509.Subject, "Subject"); -#endif } @@ -506,17 +450,10 @@ public void Certificate6 () byte[] hash = { 0x95,0xD4,0xE2,0xEA,0x34,0x0B,0xBF,0x33,0x27,0x1C,0x1F,0xBA,0x8B,0x52,0x9F,0x17,0x72,0x1F,0x8A,0x99 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("95D4E2EA340BBF33271C1FBA8B529F17721F8A99", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("01/18/1996 21:03:52", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("01/16/2001 21:03:52", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("01/18/1996 13:03:52", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("01/16/2001 13:03:52", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-1781210390, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=AT&T, OU=Directory Services", x509.GetIssuerName (), "GetIssuerName"); @@ -542,10 +479,8 @@ public void Certificate6 () 0x35,0x36,0x44,0x30,0x32,0x30,0x31,0x30,0x46,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("OU=Directory Services, O=AT&T, C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("OU=Directory Services, O=AT&T, C=US", x509.Subject, "Subject"); -#endif } @@ -613,17 +548,10 @@ public void Certificate8 () byte[] hash = { 0xA3,0x0A,0x06,0xB1,0xB0,0xD4,0xF8,0x71,0x67,0x8A,0x60,0xC5,0x4E,0xE4,0xD8,0x66,0x36,0x06,0xCC,0xE6 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("A30A06B1B0D4F871678A60C54EE4D8663606CCE6", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("10/25/2000 00:00:00", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("01/01/2003 00:00:00", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("10/24/2000 16:00:00", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("12/31/2002 16:00:00", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-1559624015, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=U.S. Government, OU=DoD, CN=Armed Forces Root", x509.GetIssuerName (), "GetIssuerName"); @@ -657,10 +585,8 @@ public void Certificate8 () 0x43,0x42,0x42,0x38,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("CN=Armed Forces Root, OU=DoD, O=U.S. Government, C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("CN=Armed Forces Root, OU=DoD, O=U.S. Government, C=US", x509.Subject, "Subject"); -#endif } @@ -714,19 +640,11 @@ public void Certificate9 () byte[] hash = { 0x52,0xD1,0x84,0x8F,0x6A,0x16,0x1B,0xA5,0xC6,0xC1,0x90,0x07,0xF8,0x16,0x46,0x68,0xF5,0xA3,0xB2,0xCF }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("52D1848F6A161BA5C6C19007F8164668F5A3B2CF", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("08/21/1996 00:00:00", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("08/20/1997 23:59:59", until.ToString (), "GetExpirationDateString"); Assert.AreEqual ("200B355ECEC4B063B7DEC634B9703444", x509.GetSerialNumberString (), "GetSerialNumberString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("08/20/1996 16:00:00", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("08/20/1997 15:59:59", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) - Assert.AreEqual ("443470B934C6DEB763B0C4CE5E350B20", x509.GetSerialNumberString (), "GetSerialNumberString"); -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (1389462671, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("L=Internet, O=\"VeriSign, Inc.\", OU=VeriSign Class 1 CA - Individual Subscriber", x509.GetIssuerName (), "GetIssuerName"); @@ -751,10 +669,8 @@ public void Certificate9 () 0x34,0x34,0x34,0x41,0x43,0x34,0x38,0x39,0x43,0x39,0x38,0x33,0x43,0x46,0x38,0x38,0x39,0x46,0x36,0x46,0x45,0x32,0x33,0x32,0x33,0x35,0x30,0x32,0x30,0x33,0x30,0x31,0x30,0x30,0x30,0x31,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("OU=VeriSign Class 1 CA - Individual Subscriber, O=\"VeriSign, Inc.\", L=Internet", x509.Issuer, "Issuer"); Assert.AreEqual ("E=david@formal.ie, CN=David T. Gray, OU=Digital ID Class 1 - Netscape, OU=\"www.verisign.com/repository/CPS Incorp. by Ref.,LIAB.LTD(c)96\", OU=VeriSign Class 1 CA - Individual Subscriber, O=\"VeriSign, Inc.\", L=Internet", x509.Subject, "Subject"); -#endif } @@ -789,17 +705,10 @@ public void Certificate10 () byte[] hash = { 0xE0,0xA0,0x0A,0xBE,0xB2,0xCC,0xA8,0x45,0x40,0xC2,0x1A,0x75,0xE0,0xB3,0xA4,0x06,0xF9,0xA6,0x24,0xAC }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("E0A00ABEB2CCA84540C21A75E0B3A406F9A624AC", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("05/07/1996 00:00:00", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("05/07/1999 00:00:00", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("05/06/1996 16:00:00", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("05/06/1999 16:00:00", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-526382402, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=CA, CN=Keywitness Canada Inc., OID.1.3.6.1.4.1.42.2.11.2.1=keywitness@keywitness.ca", x509.GetIssuerName (), "GetIssuerName"); @@ -826,10 +735,8 @@ public void Certificate10 () 0x39,0x39,0x33,0x30,0x32,0x30,0x31,0x30,0x33,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("OID.1.3.6.1.4.1.42.2.11.2.1=keywitness@keywitness.ca, CN=Keywitness Canada Inc., C=CA", x509.Issuer, "Issuer"); Assert.AreEqual ("OID.1.3.6.1.4.1.42.2.11.2.1=keywitness@keywitness.ca, CN=Keywitness Canada Inc., C=CA", x509.Subject, "Subject"); -#endif } @@ -864,17 +771,10 @@ public void Certificate11 () byte[] hash = { 0xA2,0x75,0xE0,0x26,0xAC,0xD8,0x54,0x79,0x4A,0x4A,0xA2,0xCB,0x53,0xF6,0x62,0x33,0x12,0x9C,0x55,0xB6 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("A275E026ACD854794A4AA2CB53F66233129C55B6", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("02/23/1996 19:15:00", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("12/31/1999 23:59:00", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("02/23/1996 11:15:00", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("12/31/1999 15:59:00", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (-1569333210, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=GTE Corporation, CN=GTE CyberTrust Root", x509.GetIssuerName (), "GetIssuerName"); @@ -900,10 +800,8 @@ public void Certificate11 () 0x31,0x32,0x37,0x34,0x41,0x42,0x35,0x36,0x44,0x30,0x36,0x38,0x30,0x36,0x33,0x33,0x39,0x43,0x34,0x41,0x32,0x35,0x45,0x33,0x38,0x30,0x33,0x30,0x32,0x30,0x33,0x30,0x31,0x30,0x30,0x30,0x31,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("CN=GTE CyberTrust Root, O=GTE Corporation, C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("CN=GTE CyberTrust Root, O=GTE Corporation, C=US", x509.Subject, "Subject"); -#endif } @@ -943,19 +841,11 @@ public void Certificate12 () byte[] hash = { 0x28,0x2D,0x98,0x06,0xC3,0xDF,0x73,0x45,0x92,0x9F,0x64,0xF5,0x89,0x5E,0xF2,0xEA,0x4A,0xC2,0x93,0x02 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("282D9806C3DF7345929F64F5895EF2EA4AC29302", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("05/25/2002 00:55:48", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("11/25/2003 01:05:48", until.ToString (), "GetExpirationDateString"); Assert.AreEqual ("61071143000000000034", x509.GetSerialNumberString (), "GetSerialNumberString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual ("05/24/2002 16:55:48", x509.GetEffectiveDateString (), "GetEffectiveDateString"); - Assert.AreEqual ("11/24/2003 17:05:48", x509.GetExpirationDateString (), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) - Assert.AreEqual ("34000000000043110761", x509.GetSerialNumberString (), "GetSerialNumberString"); -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (674076678, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, S=Washington, L=Redmond, O=Microsoft Corporation, OU=Copyright (c) 2000 Microsoft Corp., CN=Microsoft Code Signing PCA", x509.GetIssuerName (), "GetIssuerName"); @@ -985,10 +875,8 @@ public void Certificate12 () 0x45,0x33,0x45,0x36,0x46,0x42,0x35,0x31,0x34,0x39,0x38,0x36,0x42,0x38,0x33,0x43,0x44,0x30,0x32,0x35,0x35,0x46,0x44,0x36,0x45,0x43,0x39,0x45,0x30,0x33,0x36,0x31,0x38,0x37,0x41,0x39,0x36,0x38,0x34,0x30,0x43,0x37,0x46,0x38,0x45,0x32,0x30,0x33,0x45,0x36,0x43,0x46,0x30,0x35,0x30,0x32,0x30,0x33,0x30,0x31,0x30,0x30,0x30,0x31,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("CN=Microsoft Code Signing PCA, OU=Copyright (c) 2000 Microsoft Corp., O=Microsoft Corporation, L=Redmond, S=Washington, C=US", x509.Issuer, "Issuer"); Assert.AreEqual ("CN=Microsoft Corporation, OU=Copyright (c) 2002 Microsoft Corp., O=Microsoft Corporation, L=Redmond, S=Washington, C=US", x509.Subject, "Subject"); -#endif } @@ -998,9 +886,7 @@ public void Certificate12 () // - has NO parameters (shared group is present in issuer certificate) // !!! MS bugs when using constructor X509Certificate(X509Certificate) !!! [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void Certificate13 () { // certificate can be loaded by constructor @@ -1027,17 +913,10 @@ public void Certificate13 () byte[] hash = { 0x0E,0x29,0xCD,0xDC,0xA5,0xE7,0x32,0xA2,0x0D,0xCE,0xD8,0x7B,0x3D,0x00,0x24,0x46,0x85,0x3E,0xBB,0xD1 }; Assert.AreEqual (hash, x509.GetCertHash (), "GetCertHash"); Assert.AreEqual ("0E29CDDCA5E732A20DCED87B3D002446853EBBD1", x509.GetCertHashString (), "GetCertHashString"); -#if NET_2_0 DateTime from = DateTime.ParseExact (x509.GetEffectiveDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("04/19/2001 14:57:20", from.ToString (), "GetEffectiveDateString"); DateTime until = DateTime.ParseExact (x509.GetExpirationDateString (), "MM/dd/yyyy HH:mm:ss", null).ToUniversalTime (); Assert.AreEqual ("04/19/2011 14:57:20", until.ToString (), "GetExpirationDateString"); -#else - // fx 1.x has a bug where the returned dates were always in the Seattle time zone - Assert.AreEqual (DateTime.Parse ("04/19/2001 06:57:20"), DateTime.Parse (x509.GetEffectiveDateString ()), "GetEffectiveDateString"); - Assert.AreEqual (DateTime.Parse ("04/19/2011 06:57:20"), DateTime.Parse (x509.GetExpirationDateString ()), "GetExpirationDateString"); - // which was making it easier to test the dates ;-) -#endif Assert.AreEqual ("X509", x509.GetFormat (), "GetFormat"); Assert.AreEqual (237620700, x509.GetHashCode (), "GetHashCode"); Assert.AreEqual ("C=US, O=Test Certificates, CN=DSA CA", x509.GetIssuerName (), "GetIssuerName"); @@ -1062,10 +941,8 @@ public void Certificate13 () 0x36,0x46,0x30,0x35,0x33,0x43,0x45,0x34,0x33,0x38,0x38,0x42,0x39,0x30,0x39,0x39,0x39,0x30,0x38,0x33,0x43,0x39,0x30,0x41,0x46,0x30,0x31,0x45,0x38,0x44,0x39,0x33,0x32,0x35,0x44,0x45,0x44,0x35,0x36,0x30,0x32,0x43,0x46,0x36,0x30,0x44,0x32,0x30,0x31,0x33,0x41,0x45,0x33,0x30,0x41,0x32,0x42,0x39,0x45,0x39,0x31,0x34,0x31,0x46,0x36,0x43,0x37,0x37,0x43,0x44,0x45,0x36,0x43,0x39,0x39,0x36,0x33,0x30,0x30,0x30,0x45,0x0D,0x0A,0x0D,0x0A }; string tsa = Encoding.Default.GetString (ToStringArray).Replace ("\r\n", Environment.NewLine); //Assert.AreEqual (tsa, x509.ToString (true), "ToString(true)"); -#if NET_2_0 Assert.AreEqual ("C=US, O=\"RSA Data Security, Inc.\", OU=Secure Server Certification Authority", x509.Issuer, "Issuer"); Assert.AreEqual ("C=US, S=California, O=CommerceNet, OU=Server Certification Authority", x509.Subject, "Subject"); -#endif } diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CipherModeTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CipherModeTest.cs index 533bab775d3..660d99af24e 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/CipherModeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/CipherModeTest.cs @@ -173,28 +173,12 @@ namespace MonoTests.System.Security.Cryptography { Assert.AreEqual ("F2-90-00-B6-2A-49-9F-D0-A9-F3-9A-6A-DD-2E-77-80-D4-E9-69-25-C0-BF-CF-FB-52-F8-A1-87-EE-77-4A-AB-C3-28-91-ED-46-6E-6F-98-C1-4D-65-14-ED-9D-1E-5B", Roundtrip (Rijndael.Create (), CipherMode.CBC), "Encrypted data"); } -#if NET_2_0 [Test] public void Rijndael_CFB () { Assert.AreEqual ("F2-90-00-B6-2A-49-9F-D0-A9-F3-9A-6A-DD-2E-77-80-D4-E9-69-25-C0-BF-CF-FB-52-F8-A1-87-EE-77-4A-AB-26-03-7F-B7-B5-88-AE-0A-F8-AF-1E-CF-9C-F5-3A-8A", Roundtrip (Rijndael.Create (), CipherMode.CFB), "Encrypted data"); } -#else - // CFB was confused with OFB in Fx 1.0 and 1.1 (and wasn't supported because of that) - // However Mono does support it (because the same code is executed for all managed ciphers). - [Test] - public void Rijndael_CFB () - { - try { - Assert.AreEqual ("F2-90-00-B6-2A-49-9F-D0-A9-F3-9A-6A-DD-2E-77-80-D4-E9-69-25-C0-BF-CF-FB-52-F8-A1-87-EE-77-4A-AB-26-03-7F-B7-B5-88-AE-0A-F8-AF-1E-CF-9C-F5-3A-8A", - Roundtrip (Rijndael.Create (), CipherMode.CFB), "Encrypted data"); - } - catch (CryptographicException) { - // we assume this is the bugged MS implementation - } - } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public void Rijndael_OFB () diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs index 4890c1a2083..e141fa9e90f 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoConfigTest.cs @@ -168,7 +168,6 @@ public class CryptoConfigTest { CreateFromName ("http://www.w3.org/2000/09/xmldsig# KeyValue/DSAKeyValue", "System.Security.Cryptography.Xml.DSAKeyValue"); CreateFromName ("http://www.w3.org/2000/09/xmldsig# KeyValue/RSAKeyValue", "System.Security.Cryptography.Xml.RSAKeyValue"); CreateFromName ("http://www.w3.org/2000/09/xmldsig# RetrievalMethod", "System.Security.Cryptography.Xml.KeyInfoRetrievalMethod"); -#if NET_2_0 CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha256", "System.Security.Cryptography.SHA256Managed"); CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha384", null); CreateFromName ("http://www.w3.org/2001/04/xmlenc#sha512", "System.Security.Cryptography.SHA512Managed"); @@ -177,47 +176,30 @@ public class CryptoConfigTest { CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#hmac-sha384", "System.Security.Cryptography.HMACSHA384"); CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#hmac-sha512", "System.Security.Cryptography.HMACSHA512"); CreateFromName ("http://www.w3.org/2001/04/xmldsig-more#hmac-ripemd160", "System.Security.Cryptography.HMACRIPEMD160"); -#endif } [Test] public void CreateFromName_UpperCase () { CreateFromName ("SHA", "System.Security.Cryptography.SHA1CryptoServiceProvider"); -#if NET_2_0 CreateFromName ("SYSTEM.SECURITY.CRYPTOGRAPHY.TRIPLEDES", "System.Security.Cryptography.TripleDESCryptoServiceProvider"); CreateFromName ("HTTP://WWW.W3.ORG/2000/09/XMLDSIG#DSA-SHA1", "System.Security.Cryptography.DSASignatureDescription"); -#else - CreateFromName ("SYSTEM.SECURITY.CRYPTOGRAPHY.TRIPLEDES", null); - CreateFromName ("HTTP://WWW.W3.ORG/2000/09/XMLDSIG#DSA-SHA1", null); -#endif } [Test] public void CreateFromName_LowerCase () { -#if NET_2_0 CreateFromName ("sha", "System.Security.Cryptography.SHA1CryptoServiceProvider"); CreateFromName ("system.security.cryptography.tripledes", "System.Security.Cryptography.TripleDESCryptoServiceProvider"); -#else - CreateFromName ("sha", null); - CreateFromName ("system.security.cryptography.tripledes", null); -#endif CreateFromName ("http://www.w3.org/2000/09/xmldsig#dsa-sha1", "System.Security.Cryptography.DSASignatureDescription"); } [Test] public void CreateFromName_MixedCase () { -#if NET_2_0 CreateFromName ("ShA", "System.Security.Cryptography.SHA1CryptoServiceProvider"); CreateFromName ("SyStEm.SeCuRiTy.CrYpToGrApHy.TrIpLeDeS", "System.Security.Cryptography.TripleDESCryptoServiceProvider"); CreateFromName ("hTtP://wWw.W3.oRg/2000/09/xMlDsIg#dSa-sHa1", "System.Security.Cryptography.DSASignatureDescription"); -#else - CreateFromName ("ShA", null); - CreateFromName ("SyStEm.SeCuRiTy.CrYpToGrApHy.TrIpLeDeS", null); - CreateFromName ("hTtP://wWw.W3.oRg/2000/09/xMlDsIg#dSa-sHa1", null); -#endif } // Tests created using "A Layer Man Guide to ASN.1" from RSA, page 19-20 @@ -228,11 +210,7 @@ public class CryptoConfigTest { static byte[] oidmd5withRSAEncryption = { 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04 }; [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void EncodeOIDNull () { byte[] o = CryptoConfig.EncodeOID (null); @@ -329,7 +307,6 @@ public class CryptoConfigTest { MapNameToOID ("MD5", "1.2.840.113549.2.5"); MapNameToOID ("System.Security.Cryptography.MD5", "1.2.840.113549.2.5"); MapNameToOID ("System.Security.Cryptography.MD5CryptoServiceProvider", "1.2.840.113549.2.5"); -#if NET_2_0 MapNameToOID ("SHA256", "2.16.840.1.101.3.4.2.1"); MapNameToOID ("System.Security.Cryptography.SHA256", "2.16.840.1.101.3.4.2.1"); MapNameToOID ("System.Security.Cryptography.SHA256Managed", "2.16.840.1.101.3.4.2.1"); @@ -342,33 +319,12 @@ public class CryptoConfigTest { MapNameToOID ("RIPEMD160", "1.3.36.3.2.1"); MapNameToOID ("System.Security.Cryptography.RIPEMD160", "1.3.36.3.2.1"); MapNameToOID ("System.Security.Cryptography.RIPEMD160Managed", "1.3.36.3.2.1"); -#else - MapNameToOID ("SHA256", "2.16.840.1.101.3.4.1"); -// MapNameToOID ("SHA-256", "2.16.840.1.101.3.4.1"); - MapNameToOID ("System.Security.Cryptography.SHA256", "2.16.840.1.101.3.4.1"); - MapNameToOID ("System.Security.Cryptography.SHA256Managed", "2.16.840.1.101.3.4.1"); - MapNameToOID ("SHA384", "2.16.840.1.101.3.4.2"); -// MapNameToOID ("SHA-384", "2.16.840.1.101.3.4.2"); - MapNameToOID ("System.Security.Cryptography.SHA384", "2.16.840.1.101.3.4.2"); - MapNameToOID ("System.Security.Cryptography.SHA384Managed", "2.16.840.1.101.3.4.2"); - MapNameToOID ("SHA512", "2.16.840.1.101.3.4.3"); -// MapNameToOID ("SHA-512", "2.16.840.1.101.3.4.3"); - MapNameToOID ("System.Security.Cryptography.SHA512", "2.16.840.1.101.3.4.3"); - MapNameToOID ("System.Security.Cryptography.SHA512Managed", "2.16.840.1.101.3.4.3"); -#endif // LAMESPEC: only documentated in ".NET Framework Security" book MapNameToOID ("TripleDESKeyWrap", "1.2.840.113549.1.9.16.3.6"); -#if NET_2_0 // new OID defined in Fx 2.0 MapNameToOID ("DES", "1.3.14.3.2.7"); MapNameToOID ("TripleDES", "1.2.840.113549.3.7"); MapNameToOID ("RC2", "1.2.840.113549.3.2"); -#else - // no OID defined before Fx 2.0 - MapNameToOID ("DES", null); - MapNameToOID ("TripleDES", null); - MapNameToOID ("RC2", null); -#endif MapNameToOID ("RSA", null); MapNameToOID ("DSA", null); MapNameToOID ("3DES", null); @@ -387,7 +343,6 @@ public class CryptoConfigTest { MapNameToOID ("RandomNumberGenerator", null); MapNameToOID ("System.Security.Cryptography.RandomNumberGenerator", null); MapNameToOID ("System.Security.Cryptography.KeyedHashAlgorithm", null); -#if NET_2_0 MapNameToOID ("HMAC", null); MapNameToOID ("System.Security.Cryptography.HMAC", null); MapNameToOID ("HMACMD5", null); @@ -400,7 +355,6 @@ public class CryptoConfigTest { MapNameToOID ("System.Security.Cryptography.HMACSHA384", null); MapNameToOID ("HMACSHA512", null); MapNameToOID ("System.Security.Cryptography.HMACSHA512", null); -#endif MapNameToOID ("HMACSHA1", null); MapNameToOID ("System.Security.Cryptography.HMACSHA1", null); MapNameToOID ("MACTripleDES", null); @@ -413,35 +367,21 @@ public class CryptoConfigTest { public void MapNameToOID_UpperCase () { MapNameToOID ("SHA1", "1.3.14.3.2.26"); -#if NET_2_0 MapNameToOID ("SYSTEM.SECURITY.CRYPTOGRAPHY.MD5CRYPTOSERVICEPROVIDER", "1.2.840.113549.2.5"); -#else - MapNameToOID ("SYSTEM.SECURITY.CRYPTOGRAPHY.MD5CRYPTOSERVICEPROVIDER", null); -#endif } [Test] public void MapNameToOID_LowerCase () { -#if NET_2_0 MapNameToOID ("sha1", "1.3.14.3.2.26"); MapNameToOID ("system.security.cryptography.md5cryptoserviceprovider", "1.2.840.113549.2.5"); -#else - MapNameToOID ("sha1", null); - MapNameToOID ("system.security.cryptography.md5cryptoserviceprovider", null); -#endif } [Test] public void MapNameToOID_MixedCase () { -#if NET_2_0 MapNameToOID ("sHa1", "1.3.14.3.2.26"); MapNameToOID ("SySteM.SeCuRiTy.CrYpToGrApHy.Md5cRyPtOsErViCePrOvIdEr", "1.2.840.113549.2.5"); -#else - MapNameToOID ("sHa1", null); - MapNameToOID ("SySteM.SeCuRiTy.CrYpToGrApHy.Md5cRyPtOsErViCePrOvIdEr", null); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs index 3ad6cce71f9..986a37780a5 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/CryptoStreamTest.cs @@ -299,11 +299,7 @@ namespace MonoTests.System.Security.Cryptography { [Test] // LAMESPEC or MS BUG [ExpectedException (typeof (ObjectDisposedException))] -#if NET_2_0 [ExpectedException (typeof (NotSupportedException))] -#else - [ExpectedException (typeof (ArgumentNullException))] -#endif public void FlushFinalBlock_Disposed () { // do no corrupt writeStream in further tests @@ -333,13 +329,8 @@ namespace MonoTests.System.Security.Cryptography { #if !NET_2_1 [Test] // MS BUG [ExpectedException (typeof (ObjectDisposedException))] -#if NET_2_0 [Category ("NotWorking")] [ExpectedException (typeof (IndexOutOfRangeException))] -#else - [Category ("NotDotNet")] // Test cause System.ExecutionEngineException on MS runtime - [ExpectedException (typeof (ArgumentNullException))] // should fail like previous test case -#endif public void Read_Disposed_Break () { // do no corrupt readStream in further tests @@ -437,13 +428,8 @@ namespace MonoTests.System.Security.Cryptography { #if !NET_2_1 [Test] // MS BUG [ExpectedException (typeof (ObjectDisposedException))] -#if NET_2_0 [Category ("NotWorking")] [ExpectedException (typeof (IndexOutOfRangeException))] -#else - [Category ("NotDotNet")] // Test cause System.ExecutionEngineException on MS runtime - [ExpectedException (typeof (ArgumentNullException))] // to match exception throw by Read in a similar case -#endif public void Write_Disposed () { // do no corrupt writeStream in further tests @@ -839,9 +825,7 @@ namespace MonoTests.System.Security.Cryptography { Assert.AreEqual ("ximian", Encoding.Unicode.GetString (data, 0, len), "Unicode DES Roundtrip"); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void DecryptPartial_TransformFinalBlock_2Pass () { @@ -868,9 +852,7 @@ namespace MonoTests.System.Security.Cryptography { } // based on http://www.c-sharpcorner.com/Code/2002/May/FileEncryption.asp -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void WriteByteReadByte () { @@ -1262,9 +1244,7 @@ namespace MonoTests.System.Security.Cryptography { byte[] digest = hash.Hash; Assert.AreEqual ("71-04-12-D1-95-01-CF-F9-8D-8F-F8-0D-F9-AA-11-7D", BitConverter.ToString (digest), "Hash"); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void CascadedCryptoStream_Read () { @@ -1385,10 +1365,8 @@ namespace MonoTests.System.Security.Cryptography { WriteByte (PaddingMode.None, false); WriteByte (PaddingMode.Zeros, false); WriteByte (PaddingMode.PKCS7, true); // related to bug #81597 -#if NET_2_0 WriteByte (PaddingMode.ANSIX923, true); WriteByte (PaddingMode.ISO10126, true); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/CspProviderFlagsTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/CspProviderFlagsTest.cs index 02224d2f5e6..667db43c6d7 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/CspProviderFlagsTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/CspProviderFlagsTest.cs @@ -38,34 +38,25 @@ namespace MonoTests.System.Security.Cryptography { [Test] public void Values () { -#if NET_2_0 Assert.AreEqual ((int)CspProviderFlags.NoFlags, 0, "NoFlags"); -#endif Assert.AreEqual ((int)CspProviderFlags.UseMachineKeyStore, 1, "UseMachineKeyStore"); Assert.AreEqual ((int)CspProviderFlags.UseDefaultKeyContainer, 2, "UseDefaultKeyContainer"); -#if NET_2_0 Assert.AreEqual ((int)CspProviderFlags.NoPrompt, 64, "NoPrompt"); Assert.AreEqual ((int)CspProviderFlags.UseArchivableKey, 16, "UseArchivableKey"); Assert.AreEqual ((int)CspProviderFlags.UseExistingKey, 8, "UseExistingKey"); Assert.AreEqual ((int)CspProviderFlags.UseNonExportableKey, 4, "UseNonExportableKey"); Assert.AreEqual ((int)CspProviderFlags.UseUserProtectedKey, 32, "UseUserProtectedKey"); -#endif } [Test] public void Flags () { CspProviderFlags cpf = CspProviderFlags.UseDefaultKeyContainer | CspProviderFlags.UseMachineKeyStore -#if NET_2_0 | CspProviderFlags.NoFlags | CspProviderFlags.NoPrompt | CspProviderFlags.UseArchivableKey | CspProviderFlags.UseExistingKey | CspProviderFlags.UseNonExportableKey | CspProviderFlags.UseUserProtectedKey; int expected = 127; -#else - ; - int expected = 3; -#endif Assert.AreEqual (expected, (int)cpf, "All"); } } diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/DESCryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/DESCryptoServiceProviderTest.cs index c2c71801f61..e7e7f8115b9 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/DESCryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/DESCryptoServiceProviderTest.cs @@ -62,11 +62,7 @@ namespace MonoTests.System.Security.Cryptography { // (in DESTest.cs) but executed here [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void CreateEncryptor_KeyNull () { ICryptoTransform encryptor = des.CreateEncryptor (null, des.IV); @@ -116,11 +112,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void CreateDecryptor_KeyNull () { ICryptoTransform encryptor = des.CreateEncryptor (des.Key, des.IV); @@ -185,18 +177,14 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateEncryptor_IV_Zero () { CreateEncryptor_IV (0); } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateEncryptor_IV_TooSmall () { int size = (des.BlockSize >> 3) - 1; @@ -230,18 +218,14 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateDecryptor_IV_Zero () { CreateDecryptor_IV (0); } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateDecryptor_IV_TooSmall () { int size = (des.BlockSize >> 3) - 1; diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs index b10cbf36934..574b4b3c64d 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/DESTest.cs @@ -1086,11 +1086,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void IsWeakKey_Null () { DES.IsWeakKey (null); @@ -4193,11 +4189,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void IsSemiWeakKey_Null () { DES.IsSemiWeakKey (null); diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureDeformatterTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureDeformatterTest.cs index d34d72b131f..119a7a60859 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureDeformatterTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureDeformatterTest.cs @@ -65,9 +65,7 @@ public class DSASignatureDeformatterTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Constructor_Null () { DSASignatureDeformatter def = new DSASignatureDeformatter (null); @@ -109,9 +107,7 @@ public class DSASignatureDeformatterTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void SetKey_Null () { def.SetKey (null); diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureFormatterTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureFormatterTest.cs index ef90ffeb9d6..8ea4f7a2a94 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureFormatterTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/DSASignatureFormatterTest.cs @@ -68,9 +68,7 @@ public class DSASignatureFormatterTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Constructor_Null () { DSASignatureFormatter fmt = new DSASignatureFormatter (null); @@ -105,9 +103,7 @@ public class DSASignatureFormatterTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void SetKey_Null () { fmt.SetKey (null); diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/DSATest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/DSATest.cs index e9600c1d604..849b2f773f8 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/DSATest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/DSATest.cs @@ -33,7 +33,6 @@ using System.Security.Cryptography; namespace MonoTests.System.Security.Cryptography { -#if NET_2_0 public class NonAbstractDSAForUnitTests : DSA { protected DSAParameters dsa; @@ -89,7 +88,6 @@ namespace MonoTests.System.Security.Cryptography { protected override void Dispose (bool disposing) { } } -#endif [TestFixture] public class DSATest { @@ -103,11 +101,7 @@ namespace MonoTests.System.Security.Cryptography { [SetUp] public void SetUp () { -#if NET_2_0 dsa = new NonAbstractDSAForUnitTests (); -#else - dsa = new DSACryptoServiceProvider (); -#endif } public void AssertEquals (string msg, byte [] array1, byte [] array2) @@ -158,11 +152,7 @@ namespace MonoTests.System.Security.Cryptography { // importing and exporting a DSA key (including private key) [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [ExpectedException (typeof (CryptographicException))] -#endif public void DSAImportPublicExportPrivate () { DSAParameters input = AllTests.GetKey (false); diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HMACMD5Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HMACMD5Test.cs index eb248213bb0..538dfdb5d31 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HMACMD5Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HMACMD5Test.cs @@ -8,7 +8,6 @@ // Copyright (C) 2006, 2007 Novell, Inc (http://www.novell.com) // -#if NET_2_0 using NUnit.Framework; using System; @@ -214,4 +213,3 @@ namespace MonoTests.System.Security.Cryptography { } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HMACRIPEMD160Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HMACRIPEMD160Test.cs index 7a99bfdc320..ecb745aab2f 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HMACRIPEMD160Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HMACRIPEMD160Test.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -435,4 +434,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA1Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA1Test.cs index 0f769b2a6bf..0227a7b70fc 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA1Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA1Test.cs @@ -35,7 +35,6 @@ using System.Text; namespace MonoTests.System.Security.Cryptography { -#if NET_2_0 public class HS160 : HMACSHA1 { public int BlockSize { @@ -43,7 +42,6 @@ namespace MonoTests.System.Security.Cryptography { set { base.BlockSizeValue = value; } } } -#endif // References: // a. The Keyed-Hash Message Authentication Code (HMAC) @@ -93,25 +91,12 @@ public class HMACSHA1Test : KeyedHashAlgorithmTest { Assert.AreEqual ("System.Security.Cryptography.HMACSHA1", algo.ToString (), "HMACSHA1.ToString()"); } -#if NET_2_0 [Test] public void BlockSize () { HS160 hmac = new HS160 (); Assert.AreEqual (64, hmac.BlockSize, "BlockSizeValue"); } -#else - // this is legal in .NET 2.0 because HMACSHA1 derives from HMAC - [Test] - [ExpectedException (typeof (InvalidCastException))] - public void InvalidHashName () - { - algo = new HMACSHA1 (); - algo.HashName = "MD5"; - byte[] data = Encoding.Default.GetBytes ("MD5"); - byte[] hmac = algo.ComputeHash (data); - } -#endif public void Check (string testName, byte[] key, byte[] data, byte[] result) { @@ -126,11 +111,7 @@ public class HMACSHA1Test : KeyedHashAlgorithmTest { public void CheckA (string testName, byte[] key, byte[] data, byte[] result) { -#if NET_2_0 algo = new HMACSHA1 (key, true); -#else - algo = new HMACSHA1 (key); -#endif byte[] hmac = algo.ComputeHash (data); Assert.AreEqual (result, hmac, testName + "a1"); Assert.AreEqual (result, algo.Hash, testName + "a2"); @@ -138,11 +119,7 @@ public class HMACSHA1Test : KeyedHashAlgorithmTest { public void CheckB (string testName, byte[] key, byte[] data, byte[] result) { -#if NET_2_0 algo = new HMACSHA1 (key, false); -#else - algo = new HMACSHA1 (key); -#endif byte[] hmac = algo.ComputeHash (data, 0, data.Length); Assert.AreEqual (result, hmac, testName + "b1"); Assert.AreEqual (result, algo.Hash, testName + "b2"); diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA256Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA256Test.cs index 99216b04340..abcf01f70c8 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA256Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA256Test.cs @@ -8,7 +8,6 @@ // Copyright (C) 2006, 2007 Novell, Inc (http://www.novell.com) // -#if NET_2_0 using NUnit.Framework; using System; @@ -254,4 +253,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA384Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA384Test.cs index e243712d80c..6877448cad9 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA384Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HMACSHA384Test.cs @@ -8,7 +8,6 @@ // Copyright (C) 2006, 2007 Novell, Inc (http://www.novell.com) // -#if NET_2_0 using NUnit.Framework; using System; @@ -380,4 +379,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs index 9feea2b3385..e5c7b938fc7 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/HashAlgorithmTest.cs @@ -278,11 +278,7 @@ public class HashAlgorithmTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public void TransformBlock_OutputOffset_Negative () { byte[] input = new byte [8]; @@ -291,11 +287,7 @@ public class HashAlgorithmTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public void TransformBlock_OutputOffset_Overflow () { byte[] input = new byte [8]; diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/PKCS1MaskGenerationMethodTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/PKCS1MaskGenerationMethodTest.cs index 222ed82a1e4..15775ebefe1 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/PKCS1MaskGenerationMethodTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/PKCS1MaskGenerationMethodTest.cs @@ -105,9 +105,6 @@ namespace MonoTests.System.Security.Cryptography { // This test will FAIL with MS framework 1.0 and 1.1 as their MGF1 implementation is buggy // see ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1-vec.zip for RSA tests vector [Test] -#if ! NET_2_0 - [Category ("NotDotNet")] // Known to fail under MS runtime - both 1.0 and 1.1 -#endif public void PKCS1v21TestVector () { pkcs1.HashName = "SHA1"; diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/PaddingModeTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/PaddingModeTest.cs index f06d90830d0..543e4837d0a 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/PaddingModeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/PaddingModeTest.cs @@ -362,10 +362,8 @@ namespace MonoTests.System.Security.Cryptography { [Test] public void PaddingModeEnum () { -#if NET_2_0 Assert.AreEqual (4, (int)PaddingMode.ANSIX923, "ANSIX923"); Assert.AreEqual (5, (int)PaddingMode.ISO10126, "ISO10126"); -#endif Assert.AreEqual (1, (int)PaddingMode.None, "None"); Assert.AreEqual (2, (int)PaddingMode.PKCS7, "PKCS7"); Assert.AreEqual (3, (int)PaddingMode.Zeros, "Zeros"); @@ -405,7 +403,6 @@ namespace MonoTests.System.Security.Cryptography { // a. encrypt data larger than one block with a padding mode "X" // b. decrypt the data with padding mode "None" // c. compare the last (padding) bytes with the expected padding -#if NET_2_0 private void ANSIX923_Full (SymmetricAlgorithm sa) { int bs = (sa.BlockSize >> 3); @@ -485,7 +482,6 @@ namespace MonoTests.System.Security.Cryptography { // now validate padding - ISO10126 is all random except last byte (length) Assert.AreEqual (pd, decdata [decdata.Length - 1], "last byte"); } -#endif private void PKCS7_Full (SymmetricAlgorithm sa) { int bs = (sa.BlockSize >> 3); @@ -569,7 +565,6 @@ namespace MonoTests.System.Security.Cryptography { for (int i = 0; i < pd; i++) Assert.AreEqual (0x00, decdata [decdata.Length - pd + i], i.ToString ()); } -#if NET_2_0 // ANSI X.923 [Test] @@ -669,7 +664,6 @@ namespace MonoTests.System.Security.Cryptography { { ISO10126_Partial (TripleDES.Create ()); } -#endif // PKCS #7 [Test] @@ -810,7 +804,6 @@ namespace MonoTests.System.Security.Cryptography { } return result; } -#if NET_2_0 [Test] public void ANSIX923_ISO10126 () { @@ -870,15 +863,10 @@ namespace MonoTests.System.Security.Cryptography { { Assert.AreEqual (4, Mismatch (PaddingMode.None, PaddingMode.ISO10126)); } -#endif [Test] public void None_PKCS7 () { -#if NET_2_0 Assert.AreEqual (4, Mismatch (PaddingMode.None, PaddingMode.PKCS7)); -#else - Assert.AreEqual (0, Mismatch (PaddingMode.None, PaddingMode.PKCS7)); -#endif } [Test] @@ -886,7 +874,6 @@ namespace MonoTests.System.Security.Cryptography { { Assert.AreEqual (0, Mismatch (PaddingMode.None, PaddingMode.Zeros)); } -#if NET_2_0 [Test] public void PKCS7_ANSIX923 () { @@ -898,7 +885,6 @@ namespace MonoTests.System.Security.Cryptography { { Assert.AreEqual (0, Mismatch (PaddingMode.PKCS7, PaddingMode.ISO10126)); } -#endif [Test] public void PKCS7_None () { @@ -910,7 +896,6 @@ namespace MonoTests.System.Security.Cryptography { { Assert.AreEqual (1, Mismatch (PaddingMode.PKCS7, PaddingMode.Zeros)); } -#if NET_2_0 [Test] public void Zeros_ANSIX923 () { @@ -922,7 +907,6 @@ namespace MonoTests.System.Security.Cryptography { { Assert.AreEqual (4, Mismatch (PaddingMode.Zeros, PaddingMode.ISO10126)); } -#endif [Test] public void Zeros_None () { @@ -932,15 +916,10 @@ namespace MonoTests.System.Security.Cryptography { [Test] public void Zeros_PKCS7 () { -#if NET_2_0 Assert.AreEqual (4, Mismatch (PaddingMode.Zeros, PaddingMode.PKCS7)); -#else - Assert.AreEqual (0, Mismatch (PaddingMode.Zeros, PaddingMode.PKCS7)); -#endif } // MACTripleDES tests -#if NET_2_0 private string MAC (PaddingMode padding, int length) { byte[] key = new byte [24] { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08 }; @@ -1015,6 +994,5 @@ namespace MonoTests.System.Security.Cryptography { byte[] decdata = dec.TransformFinalBlock (encdata, 0, encdata.Length); Assert.AreEqual (data, decdata); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs index 39ab03b052e..d8d9ac8c352 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/PasswordDeriveBytesTest.cs @@ -46,9 +46,7 @@ public class PasswordDeriveBytesTest { // Constructors [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Ctor_PasswordNullSalt () { string pwd = null; @@ -74,11 +72,7 @@ public class PasswordDeriveBytesTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [Category ("NotWorking")] // CspParameters aren't supported by Mono (requires CryptoAPI) -#endif public void Ctor_PasswordNullSaltCspParameters () { string pwd = null; @@ -119,9 +113,7 @@ public class PasswordDeriveBytesTest { #endif [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#endif public void Ctor_PasswordNullSaltHashIteration () { string pwd = null; @@ -177,11 +169,7 @@ public class PasswordDeriveBytesTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentNullException))] -#else - [Category ("NotWorking")] // CspParameters aren't supported by Mono (requires CryptoAPI) -#endif public void Ctor_PasswordNullSaltHashIterationCspParameters () { string pwd = null; @@ -266,10 +254,6 @@ public class PasswordDeriveBytesTest { } [Test] -#if !NET_2_0 - // Fixed in 2.0 beta 1 - [ExpectedException (typeof (NullReferenceException))] -#endif public void Property_Salt () { PasswordDeriveBytes pdb = new PasswordDeriveBytes ("s3kr3t", salt); @@ -290,19 +274,6 @@ public class PasswordDeriveBytesTest { // 1.0/1.1 compatibility -#if !NET_2_0 - // 1.0/1.1 accepted a null password as valid - but throw the - // ArgumentNullException when GetBytes is called - // byte stream from the null input. Check that we can do the same... - [Test] - [ExpectedException (typeof (ArgumentNullException))] - public void GetBytes_PasswordNull () - { - string pwd = null; - PasswordDeriveBytes pdb = new PasswordDeriveBytes (pwd, salt); - pdb.GetBytes (24); - } -#endif // Old tests @@ -674,51 +645,14 @@ public class PasswordDeriveBytesTest { } pd.Reset (); -#if NET_2_0 // finally a useful reset :) pd.HashName = "SHA256"; pd.Salt = expectedKey; pd.IterationCount = 10; -#else - // same thing after Reset - try { - pd.HashName = "SHA256"; - Assert.Fail ("PKCS#5 can't set HashName after Reset - expected CryptographicException but got none"); - } - catch (CryptographicException) { - // do nothing, this is what we expect - } - catch (Exception e) { - Assert.Fail ("PKCS#5 can't set HashName after Reset - expected CryptographicException but got " + e.ToString ()); - } - try { - pd.Salt = expectedKey; - Assert.Fail ("PKCS#5 can't set Salt after Reset - expected CryptographicException but got none"); - } - catch (CryptographicException) { - // do nothing, this is what we expect - } - catch (Exception e) { - Assert.Fail ("PKCS#5 can't set Salt after Reset - expected CryptographicException but got " + e.ToString ()); - } - try { - pd.IterationCount = 10; - Assert.Fail ("PKCS#5 can't set IterationCount after Reset - expected CryptographicException but got none"); - } - catch (CryptographicException) { - // do nothing, this is what we expect - } - catch (Exception e) { - Assert.Fail ("PKCS#5 can't set IterationCount after Reset - expected CryptographicException but got " + e.ToString ()); - } -#endif } // FIXME: should we treat this as a bug or as a feature ? [Test] -#if ! NET_2_0 - [ExpectedException (typeof (NullReferenceException))] -#endif public void StrangeBehaviour () { // create object with a salt... diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RC2CryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RC2CryptoServiceProviderTest.cs index 08bda332de9..1a201c3e22c 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RC2CryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RC2CryptoServiceProviderTest.cs @@ -46,11 +46,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (ArgumentNullException))] -#endif public void CreateEncryptor_KeyNull () { ICryptoTransform encryptor = rc2.CreateEncryptor (null, rc2.IV); @@ -100,11 +96,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (ArgumentNullException))] -#endif public void CreateDecryptor_KeyNull () { ICryptoTransform encryptor = rc2.CreateEncryptor (rc2.Key, rc2.IV); @@ -170,9 +162,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateEncryptor_IV_Zero () { int size = (rc2.BlockSize >> 3) - 1; @@ -180,9 +170,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateEncryptor_IV_TooSmall () { int size = (rc2.BlockSize >> 3) - 1; @@ -217,9 +205,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateDecryptor_IV_Zero () { int size = (rc2.BlockSize >> 3) - 1; @@ -227,9 +213,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateDecryptor_IV_TooSmall () { int size = (rc2.BlockSize >> 3) - 1; diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160ManagedTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160ManagedTest.cs index 2e2a65d62ab..ec8e284cfed 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160ManagedTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160ManagedTest.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using NUnit.Framework; @@ -49,4 +48,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160Test.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160Test.cs index 1707e49d919..676ea914171 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160Test.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RIPEMD160Test.cs @@ -28,7 +28,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -278,4 +277,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs index 6cf1637d085..56f9a9be336 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/RSACryptoServiceProviderTest.cs @@ -93,9 +93,7 @@ public class RSACryptoServiceProviderTest { // test default key size Assert.AreEqual (1024, rsa.KeySize, "ConstructorEmpty"); Assert.IsFalse (rsa.PersistKeyInCsp, "PersistKeyInCsp"); -#if NET_2_0 Assert.IsFalse (rsa.PublicOnly, "PublicOnly"); -#endif } [Test] @@ -105,9 +103,7 @@ public class RSACryptoServiceProviderTest { // test default key size Assert.AreEqual (minKeySize, rsa.KeySize, "ConstructorKeySize"); Assert.IsFalse (rsa.PersistKeyInCsp, "PersistKeyInCsp"); -#if NET_2_0 Assert.IsFalse (rsa.PublicOnly, "PublicOnly"); -#endif } [Test] @@ -119,9 +115,7 @@ public class RSACryptoServiceProviderTest { // test default key size Assert.AreEqual (1024, rsa.KeySize, "ConstructorCspParameters"); Assert.IsTrue (rsa.PersistKeyInCsp, "PersistKeyInCsp"); -#if NET_2_0 Assert.IsFalse (rsa.PublicOnly, "PublicOnly"); -#endif } [Test] @@ -132,9 +126,7 @@ public class RSACryptoServiceProviderTest { rsa = new RSACryptoServiceProvider (keySize, csp); Assert.AreEqual (keySize, rsa.KeySize, "ConstructorCspParameters"); Assert.IsTrue (rsa.PersistKeyInCsp, "PersistKeyInCsp"); -#if NET_2_0 Assert.IsFalse (rsa.PublicOnly, "PublicOnly"); -#endif } [Test] @@ -163,13 +155,11 @@ public class RSACryptoServiceProviderTest { public void TooSmallKeyPair () { rsa = new RSACryptoServiceProvider (256); -#if NET_2_0 // in 2.0 MS delay the creation of the key pair until it is required // (same trick that Mono almost always used ;-) but they also delay // the parameter validation (what Mono didn't). So here we must "get" // the key (export) to trigger the exception rsa.ToXmlString (true); -#endif } [Test] @@ -177,13 +167,11 @@ public class RSACryptoServiceProviderTest { public void TooBigKeyPair () { rsa = new RSACryptoServiceProvider (32768); -#if NET_2_0 // in 2.0 MS delay the creation of the key pair until it is required // (same trick that Mono almost always used ;-) but they also delay // the parameter validation (what Mono didn't). So here we must "get" // the key (export) to trigger the exception rsa.ToXmlString (true); -#endif } [Test] @@ -432,7 +420,7 @@ public class RSACryptoServiceProviderTest { rsa.VerifyHash (hash, "1.3.14.3.2.26", null); } -#if NET_2_0 && !NET_2_1 +#if !NET_2_1 [Test] [Category ("NotWorking")] public void ImportDisposed () @@ -1131,9 +1119,7 @@ public class RSACryptoServiceProviderTest { { rsa = new RSACryptoServiceProvider (); rsa.FromXmlString ("<RSAKeyValue><Modulus>iSObDmmhDgrl4NiLaviFcpv4NdysBWJcqiVz3AQbPdajtXaQQ8VJdfRkixah132yKOFGCWZhHS3EuPMh8dcNwGwta2nh+m2IV6ktzI4+mZ7CSNAsmlDY0JI+H8At1vKvNArlC5jkVGuliYroJeSU/NLPLNYgspi7TtXGy9Rfug8=</Modulus><Exponent>EQ==</Exponent></RSAKeyValue>"); -#if NET_2_0 Assert.IsTrue (rsa.PublicOnly, "PublicOnly"); -#endif string b64 = @"YgyAhscnTTIcDeLJTZcOYYyHVxNhV6d03jeZYjq0sPMEsfCCbE/NcFyYHD9BTuiduqPplCLbGpfZIZYJ6vAP9m5z4Q9eEw79kmEFCsm8wSKEo/gKiptVpwQ78VOPrWd/wEkTTeeg2nVim3JIsTKGFlV7rKxIWQhGN9aAqgP8nZI="; byte [] bytes = Convert.FromBase64String (b64); rsa.Decrypt (bytes, true); @@ -1161,7 +1147,6 @@ public class RSACryptoServiceProviderTest { Assert.IsNotNull (r.Decrypt (bytes, true)); } -#if NET_2_0 #if !NET_2_1 [Test] [Category ("NotWorking")] @@ -1404,7 +1389,6 @@ public class RSACryptoServiceProviderTest { rsa = new RSACryptoServiceProvider (minKeySize); rsa.ImportCspBlob (blob); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/Rfc2898DeriveBytesTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/Rfc2898DeriveBytesTest.cs index 3852cb6c040..2ec2819c0a9 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/Rfc2898DeriveBytesTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/Rfc2898DeriveBytesTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -368,4 +367,3 @@ namespace MonoTests.System.Security.Cryptography { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTransformTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTransformTest.cs index 756ad8521bc..3396c98281c 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTransformTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/SymmetricAlgorithmTransformTest.cs @@ -81,7 +81,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock (CipherMode.CBC, PaddingMode.Zeros); } -#if NET_2_0 [Test] public void DontDecryptLastBlock_CBC_ANSIX923 () { @@ -93,7 +92,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock (CipherMode.CBC, PaddingMode.ISO10126); } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptLastBlock_CFB_None () @@ -113,7 +111,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock (CipherMode.CFB, PaddingMode.Zeros); } -#if NET_2_0 [Test] public void DontDecryptLastBlock_CFB_ANSIX923 () { @@ -125,7 +122,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock (CipherMode.CFB, PaddingMode.ISO10126); } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptLastBlock_ECB_None () @@ -145,7 +141,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock (CipherMode.ECB, PaddingMode.Zeros); } -#if NET_2_0 [Test] public void DontDecryptLastBlock_ECB_ANSIX923 () { @@ -157,7 +152,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock (CipherMode.ECB, PaddingMode.ISO10126); } -#endif // see bug #80439 (2nd try, reopened) // same as DontDecryptLastBlock except // a. the encryption transform was final (padding was added) @@ -208,7 +202,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock_Final (CipherMode.CBC, PaddingMode.Zeros); } -#if NET_2_0 [Test] public void DontDecryptLastBlock_Final_CBC_ANSIX923 () { @@ -220,7 +213,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock_Final (CipherMode.CBC, PaddingMode.ISO10126); } -#endif [Test] public virtual void DontDecryptLastBlock_Final_CFB_None () { @@ -238,7 +230,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock_Final (CipherMode.CFB, PaddingMode.Zeros); } -#if NET_2_0 [Test] public void DontDecryptLastBlock_Final_CFB_ANSIX923 () { @@ -250,7 +241,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock_Final (CipherMode.CFB, PaddingMode.ISO10126); } -#endif [Test] public void DontDecryptLastBlock_Final_ECB_None () { @@ -268,7 +258,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock_Final (CipherMode.ECB, PaddingMode.Zeros); } -#if NET_2_0 [Test] public void DontDecryptLastBlock_Final_ECB_ANSIX923 () { @@ -280,7 +269,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptLastBlock_Final (CipherMode.ECB, PaddingMode.ISO10126); } -#endif // similar to previous case but here we try to skip several blocks // i.e. encdata.Length versus decdata.Length public void DontDecryptMultipleBlock (CipherMode mode, PaddingMode padding) @@ -307,11 +295,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public virtual void DontDecryptMultipleBlock_CBC_PKCS7 () { DontDecryptMultipleBlock (CipherMode.CBC, PaddingMode.PKCS7); @@ -323,7 +307,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock (CipherMode.CBC, PaddingMode.Zeros); } -#if NET_2_0 [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_CBC_ANSIX923 () @@ -337,7 +320,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock (CipherMode.CBC, PaddingMode.ISO10126); } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public virtual void DontDecryptMultipleBlock_CFB_None () @@ -346,11 +328,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public virtual void DontDecryptMultipleBlock_CFB_PKCS7 () { DontDecryptMultipleBlock (CipherMode.CFB, PaddingMode.PKCS7); @@ -362,7 +340,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock (CipherMode.CFB, PaddingMode.Zeros); } -#if NET_2_0 [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_CFB_ANSIX923 () @@ -376,7 +353,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock (CipherMode.CFB, PaddingMode.ISO10126); } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_ECB_None () @@ -385,11 +361,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public virtual void DontDecryptMultipleBlock_ECB_PKCS7 () { DontDecryptMultipleBlock (CipherMode.ECB, PaddingMode.PKCS7); @@ -401,7 +373,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock (CipherMode.ECB, PaddingMode.Zeros); } -#if NET_2_0 [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_ECB_ANSIX923 () @@ -415,7 +386,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock (CipherMode.ECB, PaddingMode.ISO10126); } -#endif // similar to previous case but here the encryption transform was final public void DontDecryptMultipleBlock_Final (CipherMode mode, PaddingMode padding) { @@ -448,11 +418,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public virtual void DontDecryptMultipleBlock_Final_CBC_PKCS7 () { DontDecryptMultipleBlock_Final (CipherMode.CBC, PaddingMode.PKCS7); @@ -464,7 +430,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock_Final (CipherMode.CBC, PaddingMode.Zeros); } -#if NET_2_0 [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_Final_CBC_ANSIX923 () @@ -478,7 +443,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock_Final (CipherMode.CBC, PaddingMode.ISO10126); } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public virtual void DontDecryptMultipleBlock_Final_CFB_None () @@ -487,11 +451,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public virtual void DontDecryptMultipleBlock_Final_CFB_PKCS7 () { DontDecryptMultipleBlock_Final (CipherMode.CFB, PaddingMode.PKCS7); @@ -503,7 +463,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock_Final (CipherMode.CFB, PaddingMode.Zeros); } -#if NET_2_0 [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_Final_CFB_ANSIX923 () @@ -517,7 +476,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock_Final (CipherMode.CFB, PaddingMode.ISO10126); } -#endif [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_Final_ECB_None () @@ -526,11 +484,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (IndexOutOfRangeException))] -#endif public virtual void DontDecryptMultipleBlock_Final_ECB_PKCS7 () { DontDecryptMultipleBlock_Final (CipherMode.ECB, PaddingMode.PKCS7); @@ -542,7 +496,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock_Final (CipherMode.ECB, PaddingMode.Zeros); } -#if NET_2_0 [Test] [ExpectedException (typeof (CryptographicException))] public void DontDecryptMultipleBlock_Final_ECB_ANSIX923 () @@ -556,7 +509,6 @@ namespace MonoTests.System.Security.Cryptography { { DontDecryptMultipleBlock_Final (CipherMode.ECB, PaddingMode.ISO10126); } -#endif private void TransformBlock_One (ICryptoTransform ct, int expected) { @@ -626,7 +578,6 @@ namespace MonoTests.System.Security.Cryptography { Encryptor_TransformBlock_One (PaddingMode.None, CipherMode.CFB, BlockSize); } -#if NET_2_0 [Test] public void CreateEncryptor_TransformBlock_One_ANSIX923_ECB () { @@ -662,7 +613,6 @@ namespace MonoTests.System.Security.Cryptography { { Encryptor_TransformBlock_One (PaddingMode.ISO10126, CipherMode.CFB, BlockSize); } -#endif public void Decryptor_TransformBlock_One (PaddingMode padding, CipherMode mode, int expected) { @@ -725,7 +675,6 @@ namespace MonoTests.System.Security.Cryptography { { Decryptor_TransformBlock_One (PaddingMode.None, CipherMode.CFB, BlockSize); } -#if NET_2_0 [Test] public void CreateDecryptor_TransformBlock_One_ANSIX923_ECB () { @@ -761,7 +710,6 @@ namespace MonoTests.System.Security.Cryptography { { Decryptor_TransformBlock_One (PaddingMode.ISO10126, CipherMode.CFB, 0); } -#endif } [TestFixture] @@ -836,7 +784,6 @@ namespace MonoTests.System.Security.Cryptography { { EncryptEncryptDecryptDecrypt (CipherMode.CBC, PaddingMode.Zeros); } -#if NET_2_0 [Test] public void EncryptEncryptDecryptDecrypt_CBC_ANSIX923 () { @@ -848,7 +795,6 @@ namespace MonoTests.System.Security.Cryptography { { EncryptEncryptDecryptDecrypt (CipherMode.CBC, PaddingMode.ISO10126); } -#endif } [TestFixture] diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESCryptoServiceProviderTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESCryptoServiceProviderTest.cs index e08f85b3d27..f8467f6cb48 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESCryptoServiceProviderTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESCryptoServiceProviderTest.cs @@ -46,11 +46,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void CreateEncryptor_KeyNull () { ICryptoTransform encryptor = tdes.CreateEncryptor (null, tdes.IV); @@ -100,11 +96,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void CreateDecryptor_KeyNull () { ICryptoTransform encryptor = tdes.CreateEncryptor (tdes.Key, tdes.IV); @@ -170,9 +162,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateEncryptor_IV_Zero () { int size = (tdes.BlockSize >> 3) - 1; @@ -180,9 +170,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateEncryptor_IV_TooSmall () { int size = (tdes.BlockSize >> 3) - 1; @@ -217,9 +205,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateDecryptor_IV_Zero () { int size = (tdes.BlockSize >> 3) - 1; @@ -227,9 +213,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#endif public void CreateDecryptor_IV_TooSmall () { int size = (tdes.BlockSize >> 3) - 1; diff --git a/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs b/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs index f07e4d51f22..b80282976be 100644 --- a/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs +++ b/mcs/class/corlib/Test/System.Security.Cryptography/TripleDESTest.cs @@ -128,11 +128,7 @@ namespace MonoTests.System.Security.Cryptography { } [Test] -#if NET_2_0 [ExpectedException (typeof (CryptographicException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void IsSemiWeakKey_Null () { TripleDES.IsWeakKey (null); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionAttributeTest.cs index ffccb093ef0..769eecf6f55 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionAttributeTest.cs @@ -53,13 +53,8 @@ namespace MonoTests.System.Security.Permissions { Assert.IsFalse (a.Unrestricted, "Unrestricted"); EnvironmentPermission p = (EnvironmentPermission) a.CreatePermission (); -#if NET_2_0 Assert.AreEqual (String.Empty, p.GetPathList (EnvironmentPermissionAccess.Read), "GetPathList(Read)"); Assert.AreEqual (String.Empty, p.GetPathList (EnvironmentPermissionAccess.Write), "GetPathList(Write)"); -#else - Assert.IsNull (p.GetPathList (EnvironmentPermissionAccess.Read), "GetPathList(Read)"); - Assert.IsNull (p.GetPathList (EnvironmentPermissionAccess.Write), "GetPathList(Write)"); -#endif Assert.IsFalse (p.IsUnrestricted (), "CreatePermission-IsUnrestricted"); } @@ -121,11 +116,7 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (attr.Write, "Write=null"); EnvironmentPermission p = (EnvironmentPermission) attr.CreatePermission (); Assert.AreEqual (envar, p.GetPathList (EnvironmentPermissionAccess.Read), "Read=EnvironmentPermission-Read"); -#if NET_2_0 Assert.AreEqual (String.Empty, p.GetPathList (EnvironmentPermissionAccess.Write), "Read=EnvironmentPermission-Write"); -#else - Assert.IsNull (p.GetPathList (EnvironmentPermissionAccess.Write), "Read=EnvironmentPermission-Write"); -#endif } [Test] @@ -136,11 +127,7 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (attr.Read, "Read=null"); Assert.AreEqual (envar, attr.Write, "Write=Write"); EnvironmentPermission p = (EnvironmentPermission) attr.CreatePermission (); -#if NET_2_0 Assert.AreEqual (String.Empty, p.GetPathList (EnvironmentPermissionAccess.Read), "Write=EnvironmentPermission-Read"); -#else - Assert.IsNull (p.GetPathList (EnvironmentPermissionAccess.Read), "Write=EnvironmentPermission-Read"); -#endif Assert.AreEqual (envar, p.GetPathList (EnvironmentPermissionAccess.Write), "Write=EnvironmentPermission-Write"); } diff --git a/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionTest.cs index c7db78d0c88..8ff06994bf3 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/EnvironmentPermissionTest.cs @@ -142,13 +142,8 @@ namespace MonoTests.System.Security.Permissions { public void GetPathList () { EnvironmentPermission ep = new EnvironmentPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (String.Empty, ep.GetPathList (EnvironmentPermissionAccess.Read), "GetPathList-Read-Empty"); Assert.AreEqual (String.Empty, ep.GetPathList (EnvironmentPermissionAccess.Write), "GetPathList-Write-Empty"); -#else - Assert.IsNull (ep.GetPathList (EnvironmentPermissionAccess.Read), "GetPathList-Read-Empty"); - Assert.IsNull (ep.GetPathList (EnvironmentPermissionAccess.Write), "GetPathList-Write-Empty"); -#endif ep.AddPathList (EnvironmentPermissionAccess.Read, "UID"); ep.AddPathList (EnvironmentPermissionAccess.Write, "PROMPT"); Assert.AreEqual ("UID", ep.GetPathList (EnvironmentPermissionAccess.Read), "GetPathList-Read"); @@ -203,9 +198,7 @@ namespace MonoTests.System.Security.Permissions { ep.FromXml (se2); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void FromXml () @@ -242,9 +235,7 @@ namespace MonoTests.System.Security.Permissions { ep3 = (EnvironmentPermission) ep2.Union (ep1); Assert.IsTrue (ep3.IsUnrestricted (), "EP2 U Unrestricted == Unrestricted"); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Union () { diff --git a/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionAttributeTest.cs index da05dc9a8ba..33aab083b89 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/FileIOPermissionAttributeTest.cs @@ -52,12 +52,10 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (a.PathDiscovery, "PathDiscovery"); Assert.IsNull (a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNotNull (a.AllFiles, "AllFiles"); Assert.IsNotNull (a.AllLocalFiles, "AllLocalFiles"); Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId"); Assert.IsFalse (a.Unrestricted, "Unrestricted"); @@ -108,12 +106,10 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (filename, attr.PathDiscovery, "All=PathDiscovery"); Assert.AreEqual (filename, attr.Read, "All=Read"); Assert.AreEqual (filename, attr.Write, "All=Write"); -#if NET_2_0 Assert.IsNotNull (attr.AllFiles, "AllFiles"); Assert.IsNotNull (attr.AllLocalFiles, "AllLocalFiles"); Assert.IsNull (attr.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (attr.ViewAccessControl, "ViewAccessControl"); -#endif FileIOPermission p = (FileIOPermission)attr.CreatePermission (); filename = Path.GetFullPath (filename); Assert.AreEqual (filename, p.GetPathList (FileIOPermissionAccess.Append) [0], "All=FileIOPermissionAttribute-Append"); @@ -140,12 +136,10 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (attr.PathDiscovery, "PathDiscovery=null"); Assert.IsNull (attr.Read, "Read=null"); Assert.IsNull (attr.Write, "Write=null"); -#if NET_2_0 Assert.IsNotNull (attr.AllFiles, "AllFiles"); Assert.IsNotNull (attr.AllLocalFiles, "AllLocalFiles"); Assert.IsNull (attr.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (attr.ViewAccessControl, "ViewAccessControl"); -#endif FileIOPermission p = (FileIOPermission)attr.CreatePermission (); filename = Path.GetFullPath (filename); Assert.AreEqual (filename, p.GetPathList (FileIOPermissionAccess.Append) [0], "Append=FileIOPermissionAttribute-Append"); @@ -164,12 +158,10 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (filename, attr.PathDiscovery, "PathDiscovery=PathDiscovery"); Assert.IsNull (attr.Read, "Read=null"); Assert.IsNull (attr.Write, "Write=null"); -#if NET_2_0 Assert.IsNotNull (attr.AllFiles, "AllFiles"); Assert.IsNotNull (attr.AllLocalFiles, "AllLocalFiles"); Assert.IsNull (attr.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (attr.ViewAccessControl, "ViewAccessControl"); -#endif FileIOPermission p = (FileIOPermission)attr.CreatePermission (); filename = Path.GetFullPath (filename); Assert.IsNull (p.GetPathList (FileIOPermissionAccess.Append), "PathDiscovery=FileIOPermissionAttribute-Append"); @@ -188,12 +180,10 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (attr.PathDiscovery, "PathDiscovery=null"); Assert.AreEqual (filename, attr.Read, "Read=Read"); Assert.IsNull (attr.Write, "Write=null"); -#if NET_2_0 Assert.IsNotNull (attr.AllFiles, "AllFiles"); Assert.IsNotNull (attr.AllLocalFiles, "AllLocalFiles"); Assert.IsNull (attr.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (attr.ViewAccessControl, "ViewAccessControl"); -#endif FileIOPermission p = (FileIOPermission)attr.CreatePermission (); filename = Path.GetFullPath (filename); Assert.IsNull (p.GetPathList (FileIOPermissionAccess.Append), "PathDiscovery=FileIOPermissionAttribute-Append"); @@ -202,7 +192,6 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (p.GetPathList (FileIOPermissionAccess.Write), "PathDiscovery=FileIOPermissionAttribute-Write"); } -#if NET_2_0 [Test] public void ChangeAccessControl () { @@ -274,7 +263,6 @@ namespace MonoTests.System.Security.Permissions { a.ViewAndModify = "mono"; Assert.AreEqual ("ViewAndModify", "mono", a.ViewAndModify); } -#endif [Test] public void Write () diff --git a/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionAttributeTest.cs index 009e4b0f9c8..24c05741cc2 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionAttributeTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -107,4 +106,3 @@ namespace MonoTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionTest.cs index 6d0f2a41f8c..342aa798db8 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/GacIdentityPermissionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -238,4 +237,3 @@ namespace MonoTests.System.Security.Permissions { } } -#endif
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Security.Permissions/HostProtectionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/HostProtectionAttributeTest.cs index ec2af94a509..c44be64c93c 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/HostProtectionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/HostProtectionAttributeTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -360,4 +359,3 @@ namespace MonoTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs index 79477a38a3f..ff6f57a07f5 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/IBuiltInPermissionTest.cs @@ -127,58 +127,37 @@ namespace MonoTests.System.Security.Permissions { public void PublisherIdentity () { IPermission p = (IPermission) new PublisherIdentityPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (10, GetTokenIndex (p)); -#else - Assert.AreEqual (9, GetTokenIndex (p)); -#endif } [Test] public void SiteIdentity () { IPermission p = (IPermission) new SiteIdentityPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (11, GetTokenIndex (p)); -#else - Assert.AreEqual (10, GetTokenIndex (p)); -#endif } [Test] public void StrongNameIdentity () { IPermission p = (IPermission) new StrongNameIdentityPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (12, GetTokenIndex (p)); -#else - Assert.AreEqual (11, GetTokenIndex (p)); -#endif } [Test] public void UrlIdentity () { IPermission p = (IPermission) new UrlIdentityPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (13, GetTokenIndex (p)); -#else - Assert.AreEqual (12, GetTokenIndex (p)); -#endif } [Test] public void ZoneIdentity () { IPermission p = (IPermission) new ZoneIdentityPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (14, GetTokenIndex (p)); -#else - Assert.AreEqual (13, GetTokenIndex (p)); -#endif } -#if NET_2_0 [Test] public void GacIdentity () { @@ -192,6 +171,5 @@ namespace MonoTests.System.Security.Permissions { IPermission p = (IPermission)new KeyContainerPermission (PermissionState.None); Assert.AreEqual (16, GetTokenIndex (p)); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs index 04fda01e39b..9fdeaf5629c 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/IsolatedStorageFilePermissionTest.cs @@ -200,7 +200,6 @@ namespace MonoTests.System.Security.Permissions { intersect = (IsolatedStorageFilePermission)union.Intersect (small); Assert.AreEqual (small.UsageAllowed, intersect.UsageAllowed, "Intersect-UsageAllowed-2"); Assert.AreEqual (small.UserQuota, intersect.UserQuota, "Intersect-UserQuota-2"); -#if NET_2_0 small.UsageAllowed = IsolatedStorageContainment.ApplicationIsolationByUser; small.UserQuota = 3; union = (IsolatedStorageFilePermission)union.Union (small); @@ -252,7 +251,6 @@ namespace MonoTests.System.Security.Permissions { intersect = (IsolatedStorageFilePermission)union.Intersect (small); Assert.AreEqual (small.UsageAllowed, intersect.UsageAllowed, "Intersect-UsageAllowed-6"); Assert.AreEqual (small.UserQuota, intersect.UserQuota, "Intersect-UserQuota-6"); -#endif small.UsageAllowed = IsolatedStorageContainment.DomainIsolationByRoamingUser; small.UserQuota = 7; union = (IsolatedStorageFilePermission)union.Union (small); @@ -280,7 +278,6 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (IsolatedStorageContainment.AssemblyIsolationByRoamingUser, union.UsageAllowed, "AssemblyIsolationByRoamingUser"); Assert.AreEqual (7, union.UserQuota, "7c"); Assert.IsFalse (union.IsUnrestricted (), "IsUnrestricted-7c"); -#if NET_2_0 small.UsageAllowed = IsolatedStorageContainment.ApplicationIsolationByRoamingUser; small.UserQuota = 8; union = (IsolatedStorageFilePermission)union.Union (small); @@ -293,7 +290,6 @@ namespace MonoTests.System.Security.Permissions { intersect = (IsolatedStorageFilePermission)union.Intersect (small); Assert.AreEqual (small.UsageAllowed, intersect.UsageAllowed, "Intersect-UsageAllowed-8"); Assert.AreEqual (small.UserQuota, intersect.UserQuota, "Intersect-UserQuota-8"); -#endif small.UsageAllowed = IsolatedStorageContainment.AdministerIsolatedStorageByUser; small.UserQuota = 9; union = (IsolatedStorageFilePermission)union.Union (small); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/KeyContainerPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/KeyContainerPermissionAttributeTest.cs index a6972debfed..d8192e94ac1 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/KeyContainerPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/KeyContainerPermissionAttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -204,4 +203,3 @@ namespace MonoTests.System.Security.Permissions { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Permissions/PermissionSetAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/PermissionSetAttributeTest.cs index e87a260c6b9..9744b1fc54b 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/PermissionSetAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/PermissionSetAttributeTest.cs @@ -45,9 +45,7 @@ namespace MonoTests.System.Security.Permissions { { PermissionSetAttribute a = new PermissionSetAttribute (SecurityAction.Assert); Assert.IsNull (a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.IsNull (a.Name, "Name"); Assert.IsNull (a.XML, "XML"); Assert.IsFalse (a.UnicodeEncoded, "UnicodeEncoded"); @@ -97,21 +95,16 @@ namespace MonoTests.System.Security.Permissions { PermissionSetAttribute a = new PermissionSetAttribute (SecurityAction.Assert); a.File = "mono"; Assert.AreEqual ("mono", a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.IsNull (a.Name, "Name"); Assert.IsNull (a.XML, "XML"); a.File = null; Assert.IsNull (a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.IsNull (a.Name, "Name"); Assert.IsNull (a.XML, "XML"); } -#if NET_2_0 [Test] public void Hex () { @@ -176,7 +169,6 @@ namespace MonoTests.System.Security.Permissions { PermissionSet psbeu = a.CreatePermissionSet (); Assert.IsTrue (ps.Equals (psbeu), "HEX-BIGENDIAN-UNICODE"); } -#endif [Test] public void Name () @@ -184,16 +176,12 @@ namespace MonoTests.System.Security.Permissions { PermissionSetAttribute a = new PermissionSetAttribute (SecurityAction.Assert); a.Name = "mono"; Assert.IsNull (a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.AreEqual ("mono", a.Name, "Name"); Assert.IsNull (a.XML, "XML"); a.Name = null; Assert.IsNull (a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.IsNull (a.Name, "Name"); Assert.IsNull (a.XML, "XML"); } @@ -204,16 +192,12 @@ namespace MonoTests.System.Security.Permissions { PermissionSetAttribute a = new PermissionSetAttribute (SecurityAction.Assert); a.XML = "mono"; Assert.IsNull (a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.IsNull (a.Name, "Name"); Assert.AreEqual ("mono", a.XML, "XML"); a.XML = null; Assert.IsNull (a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.IsNull (a.Name, "Name"); Assert.IsNull (a.XML, "XML"); } @@ -234,9 +218,7 @@ namespace MonoTests.System.Security.Permissions { PermissionSetAttribute a = new PermissionSetAttribute (SecurityAction.Assert); a.Unrestricted = true; Assert.IsNull (a.File, "File"); -#if NET_2_0 Assert.IsNull (a.Hex, "Hex"); -#endif Assert.IsNull (a.Name, "Name"); Assert.IsNull (a.XML, "XML"); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionAttributeTest.cs index 12a443fd05c..fa40b05df14 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionAttributeTest.cs @@ -208,11 +208,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#else [Category ("NotWorking")] -#endif public void Unrestricted () { PublisherIdentityPermissionAttribute a = new PublisherIdentityPermissionAttribute (SecurityAction.Assert); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionTest.cs index fe2fb00c6f5..54209efcb3c 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/PublisherIdentityPermissionTest.cs @@ -101,7 +101,6 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (se.Attribute("Unrestricted"), "ToXml-Unrestricted"); Assert.IsNull (p.Certificate, "Certificate==null"); } -#if NET_2_0 [Test] [Category ("NotWorking")] public void PermissionStateUnrestricted () @@ -118,15 +117,6 @@ namespace MonoTests.System.Security.Permissions { // and they aren't equals to None Assert.IsTrue (!p.Equals (new PublisherIdentityPermission (PermissionState.None))); } -#else - [Test] - [ExpectedException (typeof (ArgumentException))] - public void PermissionStateUnrestricted () - { - // Unrestricted isn't permitted for identity permissions - PublisherIdentityPermission p = new PublisherIdentityPermission (PermissionState.Unrestricted); - } -#endif [Test] public void Certificate () { @@ -231,16 +221,13 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void Union_DifferentCertificates () { PublisherIdentityPermission p1 = new PublisherIdentityPermission (x509); X509Certificate x2 = new X509Certificate (cert2); PublisherIdentityPermission p2 = new PublisherIdentityPermission (x2); IPermission p = p1.Union (p2); -#if NET_2_0 // new XML format is used to contain more than one X.509 certificate SecurityElement se = p.ToXml (); Assert.AreEqual (2, se.Children.Count, "Childs"); @@ -248,9 +235,6 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ((se.Children [1] as SecurityElement).Attribute ("X509v3Certificate"), p2.ToXml ().Attribute ("X509v3Certificate"), "Cert#2"); // strangely it is still versioned as 'version="1"'. Assert.AreEqual ("1", se.Attribute ("version"), "Version"); -#else - Assert.IsNull (p, "cert1 U cert2 == null"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionAttributeTest.cs index bc10d58ee33..1c132454a93 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionAttributeTest.cs @@ -45,23 +45,15 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (a.Create, "Create"); Assert.IsNull (a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif Assert.AreEqual (a.ToString (), a.TypeId.ToString (), "TypeId"); Assert.IsFalse (a.Unrestricted, "Unrestricted"); RegistryPermission perm = (RegistryPermission) a.CreatePermission (); -#if NET_2_0 Assert.AreEqual (String.Empty, perm.GetPathList (RegistryPermissionAccess.Create), "Create"); Assert.AreEqual (String.Empty, perm.GetPathList (RegistryPermissionAccess.Read), "Read"); Assert.AreEqual (String.Empty, perm.GetPathList (RegistryPermissionAccess.Write), "Write"); -#else - Assert.IsNull (perm.GetPathList (RegistryPermissionAccess.Create), "Create"); - Assert.IsNull (perm.GetPathList (RegistryPermissionAccess.Read), "Read"); - Assert.IsNull (perm.GetPathList (RegistryPermissionAccess.Write), "Write"); -#endif } [Test] @@ -102,19 +94,15 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ("mono", a.Create, "Create"); Assert.AreEqual ("mono", a.Read, "Read"); Assert.AreEqual ("mono", a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif a.All = null; Assert.IsNull (a.Create, "Create"); Assert.IsNull (a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif } [Test] @@ -134,19 +122,15 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ("mono", a.Create, "Create"); Assert.IsNull (a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif a.Create = null; Assert.IsNull (a.Create, "Create"); Assert.IsNull (a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif } [Test] @@ -157,22 +141,17 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (a.Create, "Create"); Assert.AreEqual ("mono", a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif a.Read = null; Assert.IsNull (a.Create, "Create"); Assert.IsNull (a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif } -#if NET_2_0 [Test] public void ChangeAccessControl () { @@ -238,7 +217,6 @@ namespace MonoTests.System.Security.Permissions { a.ViewAndModify = "mono"; Assert.AreEqual ("ViewAndModify", "mono", a.ViewAndModify); } -#endif [Test] public void Write () @@ -248,19 +226,15 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (a.Create, "Create"); Assert.IsNull (a.Read, "Read"); Assert.AreEqual ("mono", a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif a.Write = null; Assert.IsNull (a.Create, "Create"); Assert.IsNull (a.Read, "Read"); Assert.IsNull (a.Write, "Write"); -#if NET_2_0 Assert.IsNull (a.ChangeAccessControl, "ChangeAccessControl"); Assert.IsNull (a.ViewAccessControl, "ViewAccessControl"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionTest.cs index f95691c7f54..32892bc4c1f 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/RegistryPermissionTest.cs @@ -167,15 +167,10 @@ namespace MonoTests.System.Security.Permissions { public void GetPathList () { RegistryPermission ep = new RegistryPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (String.Empty, ep.GetPathList (RegistryPermissionAccess.Create), "GetPathList-Create-Empty"); Assert.AreEqual (String.Empty, ep.GetPathList (RegistryPermissionAccess.Read), "GetPathList-Read-Empty"); Assert.AreEqual (String.Empty, ep.GetPathList (RegistryPermissionAccess.Write), "GetPathList-Write-Empty"); -#else - Assert.IsNull (ep.GetPathList (RegistryPermissionAccess.Create), "GetPathList-Create-Empty"); - Assert.IsNull (ep.GetPathList (RegistryPermissionAccess.Read), "GetPathList-Read-Empty"); - Assert.IsNull (ep.GetPathList (RegistryPermissionAccess.Write), "GetPathList-Write-Empty"); -#endif + ep.AddPathList (RegistryPermissionAccess.Create, keyLocalMachine); ep.AddPathList (RegistryPermissionAccess.Create, keyCurrentUser); Assert.AreEqual (keyLocalMachine + ";" + keyCurrentUser, ep.GetPathList (RegistryPermissionAccess.Create), "GetPathList-Read"); @@ -235,9 +230,7 @@ namespace MonoTests.System.Security.Permissions { ep.FromXml (se2); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void FromXml () { @@ -279,9 +272,7 @@ namespace MonoTests.System.Security.Permissions { Assert.IsTrue (ep3.IsUnrestricted (), "EP2 U Unrestricted == Unrestricted"); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Union () { @@ -294,9 +285,7 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (ep4.ToXml ().ToString (), ep5.ToXml ().ToString (), "EP1 U EP2 U EP3 == EP1+2+3"); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Union_Subset () { @@ -364,9 +353,7 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (keyLocalMachine, ep3.GetPathList (RegistryPermissionAccess.Write), "Intersect-AllAccess-Write"); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Intersect_Subset () { diff --git a/mcs/class/corlib/Test/System.Security.Permissions/SecurityPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/SecurityPermissionAttributeTest.cs index 0c79a630584..7164402d8d2 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/SecurityPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/SecurityPermissionAttributeTest.cs @@ -46,9 +46,7 @@ namespace MonoTests.System.Security.Permissions { { SecurityPermissionAttribute a = new SecurityPermissionAttribute (SecurityAction.Assert); Assert.IsFalse (a.Assertion, "Assertion"); -#if NET_2_0 Assert.IsFalse (a.BindingRedirects, "BindingRedirects"); -#endif Assert.IsFalse (a.ControlAppDomain, "ControlAppDomain"); Assert.IsFalse (a.ControlDomainPolicy, "ControlDomainPolicy"); Assert.IsFalse (a.ControlEvidence, "ControlEvidence"); @@ -104,9 +102,7 @@ namespace MonoTests.System.Security.Permissions { { SecurityPermissionAttribute a = new SecurityPermissionAttribute (SecurityAction.Assert); a.Assertion = false; -#if NET_2_0 a.BindingRedirects = false; -#endif a.ControlAppDomain = false; a.ControlDomainPolicy = false; a.ControlEvidence = false; @@ -132,7 +128,6 @@ namespace MonoTests.System.Security.Permissions { a.Assertion = false; Assert.AreEqual (SecurityPermissionFlag.NoFlags, a.Flags, "Flags=NoFlags"); } -#if NET_2_0 [Test] public void BindingRedirects () { @@ -142,7 +137,6 @@ namespace MonoTests.System.Security.Permissions { a.BindingRedirects = false; Assert.AreEqual (SecurityPermissionFlag.NoFlags, a.Flags, "Flags=NoFlags"); } -#endif [Test] public void ControlAppDomain () { @@ -280,10 +274,8 @@ namespace MonoTests.System.Security.Permissions { SecurityPermissionAttribute a = new SecurityPermissionAttribute (SecurityAction.Assert); a.Flags = SecurityPermissionFlag.Assertion; Assert.IsTrue (a.Assertion, "Assertion"); -#if NET_2_0 a.Flags |= SecurityPermissionFlag.BindingRedirects; Assert.IsTrue (a.BindingRedirects, "BindingRedirects"); -#endif a.Flags |= SecurityPermissionFlag.ControlAppDomain; Assert.IsTrue (a.ControlAppDomain, "ControlAppDomain"); a.Flags |= SecurityPermissionFlag.ControlDomainPolicy; @@ -313,10 +305,8 @@ namespace MonoTests.System.Security.Permissions { a.Flags &= ~SecurityPermissionFlag.Assertion; Assert.IsFalse (a.Assertion, "Assertion-False"); -#if NET_2_0 a.Flags &= ~SecurityPermissionFlag.BindingRedirects; Assert.IsFalse (a.BindingRedirects, "BindingRedirects-False"); -#endif a.Flags &= ~SecurityPermissionFlag.ControlAppDomain; Assert.IsFalse (a.ControlAppDomain, "ControlAppDomain-False"); a.Flags &= ~SecurityPermissionFlag.ControlDomainPolicy; diff --git a/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionAttributeTest.cs index 6f618079d27..069100f2840 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionAttributeTest.cs @@ -48,11 +48,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (NullReferenceException))] -#else [Category ("NotWorking")] -#endif public void DefaultPermission () { SiteIdentityPermissionAttribute a = new SiteIdentityPermissionAttribute (SecurityAction.Assert); @@ -108,11 +104,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#else [Category ("NotWorking")] -#endif public void Unrestricted () { SiteIdentityPermissionAttribute a = new SiteIdentityPermissionAttribute (SecurityAction.Assert); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionTest.cs index a415b29eb85..6ea768095f9 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/SiteIdentityPermissionTest.cs @@ -56,16 +56,12 @@ namespace MonoTests.System.Security.Permissions { "www.*.com", }; -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void PermissionState_None () { SiteIdentityPermission sip = new SiteIdentityPermission (PermissionState.None); -#if NET_2_0 Assert.AreEqual (String.Empty, sip.Site, "Site"); -#endif SecurityElement se = sip.ToXml (); // only class and version are present Assert.AreEqual (2, se.Attributes.Count, "Xml-Attributes"); @@ -74,7 +70,6 @@ namespace MonoTests.System.Security.Permissions { Assert.IsFalse (Object.ReferenceEquals (sip, copy), "ReferenceEquals"); } -#if NET_2_0 [Category ("NotWorking")] [Test] public void PermissionStateUnrestricted () @@ -90,14 +85,6 @@ namespace MonoTests.System.Security.Permissions { // and they aren't equals to None Assert.IsFalse (sip.Equals (new SiteIdentityPermission (PermissionState.None))); } -#else - [Test] - [ExpectedException (typeof (ArgumentException))] - public void PermissionState_Unrestricted () - { - SiteIdentityPermission sip = new SiteIdentityPermission (PermissionState.Unrestricted); - } -#endif [Test] [ExpectedException (typeof (ArgumentException))] public void PermissionState_Bad () @@ -317,35 +304,21 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (s, union.Site, s); } } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Union_Self () { SiteIdentityPermission sip = new SiteIdentityPermission (PermissionState.None); SiteIdentityPermission union = (SiteIdentityPermission)sip.Union (sip); -#if NET_2_0 Assert.IsNull (union, "None U None"); -#else - Assert.IsNotNull (union, "None U None"); // can't get null Site property - foreach (string s in GoodSites) { - sip.Site = s; - union = (SiteIdentityPermission)sip.Union (sip); - Assert.AreEqual (s, union.Site, s); - } -#endif } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Union_Different () { SiteIdentityPermission sip1 = new SiteIdentityPermission (GoodSites [0]); SiteIdentityPermission sip2 = new SiteIdentityPermission (GoodSites [1]); SiteIdentityPermission result = (SiteIdentityPermission)sip1.Union (sip2); -#if NET_2_0 Assert.IsNotNull (result, "Mono U Novell"); // new XML format is used to contain more than one site SecurityElement se = result.ToXml (); @@ -354,12 +327,7 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ((se.Children [1] as SecurityElement).Attribute ("Site"), sip2.Site, "Site#2"); // strangely it is still versioned as 'version="1"'. Assert.AreEqual ("1", se.Attribute ("version"), "Version"); -#else - // It's null for FX 1.0 and 1.1 - Assert.IsNull (result, "Mono U Novell"); -#endif } -#if NET_2_0 [Test] [Category ("NotWorking")] [ExpectedException (typeof (NotSupportedException))] @@ -371,7 +339,6 @@ namespace MonoTests.System.Security.Permissions { // it's not possible to return many sites using the Site property so it throws Assert.IsNull (result.Site); } -#endif [Test] [ExpectedException (typeof (ArgumentNullException))] public void FromXml_Null () diff --git a/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionAttributeTest.cs index b079461c02f..1a3dd016552 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionAttributeTest.cs @@ -199,11 +199,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#else [Category ("NotWorking")] -#endif public void Unrestricted () { StrongNameIdentityPermissionAttribute a = new StrongNameIdentityPermissionAttribute (SecurityAction.Assert); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionTest.cs index b24c16e06cd..82da81edfa9 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/StrongNameIdentityPermissionTest.cs @@ -39,7 +39,6 @@ namespace MonoTests.System.Security.Permissions { static byte[] ecma = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -#if NET_2_0 private StrongNameIdentityPermission GetUnion () { StrongNamePublicKeyBlob blob = new StrongNamePublicKeyBlob (ecma); @@ -48,7 +47,6 @@ namespace MonoTests.System.Security.Permissions { StrongNameIdentityPermission diffPk = new StrongNameIdentityPermission (blob2, "mono", new Version (1, 2, 3, 4)); return (StrongNameIdentityPermission)snip.Union (diffPk); } -#endif [Test] public void PermissionStateNone () @@ -59,27 +57,17 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ("0.0", snip.Version.ToString (), "Version"); SecurityElement se = snip.ToXml (); -#if NET_2_0 Assert.IsNull (se.Attribute ("Name"), "Xml-Name"); Assert.IsNull (se.Attribute ("AssemblyVersion"), "Xml-AssemblyVersion"); -#else - Assert.AreEqual (String.Empty, se.Attribute ("Name"), "Xml-Name"); - Assert.AreEqual ("0.0", se.Attribute ("AssemblyVersion"), "Xml-AssemblyVersion"); -#endif Assert.IsNull (se.Attribute ("PublicKeyBlob"), "Xml-PublicKeyBlob"); // because Name == String.Empty, which is illegal using the other constructor StrongNameIdentityPermission copy = (StrongNameIdentityPermission) snip.Copy (); Assert.AreEqual (String.Empty, copy.Name, "Copy-Name"); -#if NET_2_0 // Strangely once copied the Name becomes equals to String.Empty in 2.0 [FDBK19351] Assert.IsNull (se.Attribute ("AssemblyVersion"), "Copy-Version"); -#else - Assert.AreEqual ("0.0", copy.Version.ToString (), "Copy-Version"); -#endif Assert.IsNull (copy.PublicKey, "Copy-PublicKey"); } -#if NET_2_0 [Test] public void PermissionStateUnrestricted () { @@ -98,14 +86,6 @@ namespace MonoTests.System.Security.Permissions { // and they aren't equals to None Assert.IsFalse (snip.Equals (new StrongNameIdentityPermission (PermissionState.None)), "Not Equals None"); } -#else - [Test] - [ExpectedException (typeof (ArgumentException))] - public void PermissionStateUnrestricted () - { - StrongNameIdentityPermission snip = new StrongNameIdentityPermission (PermissionState.Unrestricted); - } -#endif [Test] [ExpectedException (typeof (ArgumentException))] public void PermissionStateInvalid () @@ -142,9 +122,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void StrongNameIdentityPermission_NameEmpty () { StrongNamePublicKeyBlob blob = new StrongNamePublicKeyBlob (ecma); @@ -204,20 +182,14 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void Name_Empty () { StrongNamePublicKeyBlob blob = new StrongNamePublicKeyBlob (ecma); StrongNameIdentityPermission snip = new StrongNameIdentityPermission (blob, "mono", new Version (1, 2, 3, 4)); snip.Name = String.Empty; -#if !NET_2_0 - Assert.AreEqual (String.Empty, snip.Name, "Name"); -#endif } -#if NET_2_0 [Test] [ExpectedException (typeof (NotSupportedException))] public void Name_Multiple_Get () @@ -235,7 +207,6 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (union.PublicKey, "PublicKey"); Assert.AreEqual ("0.0", union.Version.ToString (), "Version"); } -#endif [Test] [ExpectedException (typeof (ArgumentNullException))] @@ -245,7 +216,6 @@ namespace MonoTests.System.Security.Permissions { StrongNameIdentityPermission snip = new StrongNameIdentityPermission (blob, "mono", new Version (1, 2, 3, 4)); snip.PublicKey = null; } -#if NET_2_0 [Test] [ExpectedException (typeof (NotSupportedException))] public void PublicKey_Multiple_Get () @@ -263,7 +233,6 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNotNull (union.PublicKey, "PublicKey"); Assert.AreEqual ("0.0", union.Version.ToString (), "Version"); } -#endif [Test] public void Version () { @@ -275,7 +244,6 @@ namespace MonoTests.System.Security.Permissions { snip.Version = new Version (1, 2, 3); Assert.AreEqual ("1.2.3", snip.Version.ToString (), "Version-3"); } -#if NET_2_0 [Test] [ExpectedException (typeof (NotSupportedException))] public void Version_Multiple_Get () @@ -293,7 +261,6 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (union.PublicKey, "PublicKey"); Assert.AreEqual ("1.2.3.4", union.Version.ToString (), "Version"); } -#endif [Test] public void Copy_NameEmpty () { @@ -304,11 +271,7 @@ namespace MonoTests.System.Security.Permissions { // because Name == String.Empty, which is illegal using the other constructor // but (somewhat) required to copy the teo other informations StrongNameIdentityPermission copy = (StrongNameIdentityPermission)snip.Copy (); -#if NET_2_0 Assert.IsTrue (copy.Equals (snip), "Equals"); -#else - Assert.AreEqual (copy.ToXml ().ToString (), snip.ToXml ().ToString (), "Equals-XML"); -#endif } private void Compare (StrongNameIdentityPermission p1, StrongNameIdentityPermission p2, string prefix) @@ -330,11 +293,7 @@ namespace MonoTests.System.Security.Permissions { StrongNameIdentityPermission empty = new StrongNameIdentityPermission (PermissionState.None); intersect = (StrongNameIdentityPermission)snip.Intersect (empty); -#if NET_2_0 Assert.IsNull (intersect, "snip N empty"); -#else - Compare (empty, intersect, "snip U empty"); -#endif intersect = (StrongNameIdentityPermission)snip.Intersect (snip); Compare (snip, intersect, "snip U snip"); @@ -345,9 +304,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void Intersect_DifferentPermissions () { StrongNameIdentityPermission a = new StrongNameIdentityPermission (PermissionState.None); @@ -415,17 +372,9 @@ namespace MonoTests.System.Security.Permissions { StrongNameIdentityPermission samePk = new StrongNameIdentityPermission (blob, null, null); union = (StrongNameIdentityPermission)snip.Union (samePk); -#if !NET_2_0 - // can't compare the properties with multiple entries - Compare (snip, union, "snip U samePk"); -#endif Assert.IsTrue (snip.IsSubsetOf (union), "snip.IsSubsetOf (union)"); union = (StrongNameIdentityPermission)samePk.Union (snip); -#if !NET_2_0 - // can't compare the properties with multiple entries - Compare (snip, union, "samePk U snip"); -#endif Assert.IsTrue (samePk.IsSubsetOf (union), "snip.IsSubsetOf (union)"); } @@ -437,7 +386,6 @@ namespace MonoTests.System.Security.Permissions { StrongNamePublicKeyBlob blob2 = new StrongNamePublicKeyBlob (new byte [16]); StrongNameIdentityPermission diffPk = new StrongNameIdentityPermission (blob2, "mono", new Version (1, 2, 3, 4)); StrongNameIdentityPermission result = (StrongNameIdentityPermission) snip.Union (diffPk); -#if NET_2_0 Assert.IsNotNull (result, "DifferentPk"); // new XML format is used to contain more than one site SecurityElement se = result.ToXml (); @@ -446,9 +394,6 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ("00000000000000000000000000000000", (se.Children [1] as SecurityElement).Attribute ("PublicKeyBlob"), "Blob#2"); // strangely it is still versioned as 'version="1"'. Assert.AreEqual ("1", se.Attribute ("version"), "Version"); -#else - Assert.IsNull (result, "DifferentPk"); -#endif } [Test] @@ -458,7 +403,6 @@ namespace MonoTests.System.Security.Permissions { StrongNameIdentityPermission snip = new StrongNameIdentityPermission (blob, "mono", new Version (1, 2, 3, 4)); StrongNameIdentityPermission diffName = new StrongNameIdentityPermission (blob, "novell", null); StrongNameIdentityPermission result = (StrongNameIdentityPermission) snip.Union (diffName); -#if NET_2_0 Assert.IsNotNull (result, "DifferentName"); // new XML format is used to contain more than one site SecurityElement se = result.ToXml (); @@ -467,9 +411,6 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ("novell", (se.Children [1] as SecurityElement).Attribute ("Name"), "Name#2"); // strangely it is still versioned as 'version="1"'. Assert.AreEqual ("1", se.Attribute ("version"), "Version"); -#else - Assert.IsNull (result, "DifferentName"); -#endif } [Test] @@ -479,7 +420,6 @@ namespace MonoTests.System.Security.Permissions { StrongNameIdentityPermission snip = new StrongNameIdentityPermission (blob, "mono", new Version (1, 2, 3, 4)); StrongNameIdentityPermission diffVersion = new StrongNameIdentityPermission (blob, null, new Version (1, 2)); StrongNameIdentityPermission result = (StrongNameIdentityPermission) snip.Union (diffVersion); -#if NET_2_0 Assert.IsNotNull (result, "DifferentVersion"); // new XML format is used to contain more than one site SecurityElement se = result.ToXml (); @@ -488,9 +428,6 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual ("1.2", (se.Children [1] as SecurityElement).Attribute ("AssemblyVersion"), "AssemblyVersion#2"); // strangely it is still versioned as 'version="1"'. Assert.AreEqual ("1", se.Attribute ("version"), "Version"); -#else - Assert.IsNull (result, "DifferentVersion"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionAttributeTest.cs index 7b1f176e00b..4cc9c400ae3 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionAttributeTest.cs @@ -48,9 +48,6 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (NullReferenceException))] -#endif public void DefaultPermission () { UrlIdentityPermissionAttribute a = new UrlIdentityPermissionAttribute (SecurityAction.Assert); @@ -61,14 +58,10 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNotNull (perm, "CreatePermission(null url)"); // ... but this doesn't! string url = perm.Url; -#if NET_2_0 Assert.AreEqual (String.Empty, url, "Url-2"); -#endif } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Action () { @@ -112,11 +105,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#else [Category ("NotWorking")] -#endif public void Unrestricted () { UrlIdentityPermissionAttribute a = new UrlIdentityPermissionAttribute (SecurityAction.Assert); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs index f9a7d8ae21a..9a79fbe2a6f 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/UrlIdentityPermissionTest.cs @@ -55,31 +55,17 @@ namespace MonoTests.System.Security.Permissions { public void PermissionState_None () { UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None); -#if NET_2_0 // that cause a NullReferenceException before 2.0 Assert.AreEqual (String.Empty, uip.Url, "Url"); -#endif SecurityElement se = uip.ToXml (); // only class and version are present Assert.AreEqual (2, se.Attributes.Count, "Xml-Attributes"); Assert.IsNull (se.Children, "Xml-Children"); -#if NET_2_0 UrlIdentityPermission copy = (UrlIdentityPermission)uip.Copy (); Assert.IsFalse (Object.ReferenceEquals (uip, copy), "ReferenceEquals"); -#endif } -#if !NET_2_0 - [Test] - [ExpectedException (typeof (NullReferenceException))] - public void PermissionState_None_Url () - { - UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None); - Assert.IsNull (uip.Url, "Url"); - } -#endif -#if NET_2_0 [Test] [Category ("NotWorking")] public void PermissionStateUnrestricted () @@ -94,14 +80,6 @@ namespace MonoTests.System.Security.Permissions { // and they aren't equals to None Assert.IsFalse (uip.Equals (new UrlIdentityPermission (PermissionState.None))); } -#else - [Test] - [ExpectedException (typeof (ArgumentException))] - public void PermissionState_Unrestricted () - { - UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.Unrestricted); - } -#endif [Test] [ExpectedException (typeof (ArgumentException))] public void PermissionState_Bad () @@ -122,16 +100,10 @@ namespace MonoTests.System.Security.Permissions { UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None); foreach (string s in GoodUrls) { uip.Url = s; -#if NET_2_0 Assert.AreEqual (s, uip.Url, s); -#else - // Fx 1.0/1.1 adds a '/' at the end, while 2.0 keeps the original format - // so we only compare the start of the url -#endif } } -#if NET_2_0 [Test] public void Url_Null () { @@ -139,15 +111,6 @@ namespace MonoTests.System.Security.Permissions { uip.Url = null; Assert.AreEqual (String.Empty, uip.Url, "Url"); } -#else - [Test] - [ExpectedException (typeof (ArgumentNullException))] - public void Url_Null () - { - UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None); - uip.Url = null; - } -#endif [Test] public void Copy () @@ -163,9 +126,6 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (NullReferenceException))] -#endif public void Copy_None () { UrlIdentityPermission uip = new UrlIdentityPermission (PermissionState.None); @@ -182,9 +142,7 @@ namespace MonoTests.System.Security.Permissions { Assert.IsNull (uip.Intersect (null), s); } } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Intersect_None () { @@ -236,9 +194,7 @@ namespace MonoTests.System.Security.Permissions { } } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void IsSubset_None () { @@ -331,16 +287,13 @@ namespace MonoTests.System.Security.Permissions { Assert.IsTrue (union.Url.StartsWith (uip.Url), s); } } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Union_Different () { UrlIdentityPermission uip1 = new UrlIdentityPermission (GoodUrls [0]); UrlIdentityPermission uip2 = new UrlIdentityPermission (GoodUrls [1]); UrlIdentityPermission result = (UrlIdentityPermission)uip1.Union (uip2); -#if NET_2_0 Assert.IsNotNull (result, "Mono U Novell"); // new XML format is used to contain more than one site SecurityElement se = result.ToXml (); @@ -349,9 +302,6 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (GoodUrls [1], (se.Children [1] as SecurityElement).Attribute ("Url"), "Url#2"); // strangely it is still versioned as 'version="1"'. Assert.AreEqual ("1", se.Attribute ("version"), "Version"); -#else - Assert.IsNull (result, "Mono U Novell"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs index 4a42d34e6e7..748295a096b 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionAttributeTest.cs @@ -115,11 +115,7 @@ namespace MonoTests.System.Security.Permissions { } [Test] -#if NET_2_0 [Category ("NotWorking")] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void Unrestricted () { ZoneIdentityPermissionAttribute a = new ZoneIdentityPermissionAttribute (SecurityAction.Assert); diff --git a/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionTest.cs b/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionTest.cs index 8a347753843..bab59edb5ae 100644 --- a/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Permissions/ZoneIdentityPermissionTest.cs @@ -42,7 +42,6 @@ namespace MonoTests.System.Security.Permissions { ZoneIdentityPermission zip = new ZoneIdentityPermission (PermissionState.None); Assert.AreEqual (SecurityZone.NoZone, zip.SecurityZone); } -#if NET_2_0 [Test] [Category ("NotWorking")] public void PermissionStateUnrestricted () @@ -55,14 +54,6 @@ namespace MonoTests.System.Security.Permissions { // and they aren't equals to None Assert.IsFalse (zip.Equals (new ZoneIdentityPermission (PermissionState.None))); } -#else - [Test] - [ExpectedException (typeof (ArgumentException))] - public void PermissionStateUnrestricted () - { - ZoneIdentityPermission zip = new ZoneIdentityPermission (PermissionState.Unrestricted); - } -#endif [Test] [ExpectedException (typeof (ArgumentException))] public void PermissionStateInvalid () @@ -72,11 +63,7 @@ namespace MonoTests.System.Security.Permissions { private bool Same (ZoneIdentityPermission zip1, ZoneIdentityPermission zip2) { -#if NET_2_0 return zip1.Equals (zip2); -#else - return (zip1.SecurityZone == zip2.SecurityZone); -#endif } private ZoneIdentityPermission BasicTestZone (SecurityZone zone, bool special) @@ -217,16 +204,13 @@ namespace MonoTests.System.Security.Permissions { Assert.IsTrue (Same (a, z), "NoZone+Trusted"); Assert.IsFalse (Object.ReferenceEquals (a, z), "!ReferenceEquals4"); } -#if NET_2_0 [Category ("NotWorking")] -#endif [Test] public void Union_DifferentIdentities () { ZoneIdentityPermission a = new ZoneIdentityPermission (SecurityZone.Trusted); ZoneIdentityPermission b = new ZoneIdentityPermission (SecurityZone.Untrusted); IPermission result = a.Union (b); -#if NET_2_0 Assert.IsNotNull (result, "Union"); // new XML format is used to contain more than one site SecurityElement se = result.ToXml (); @@ -235,9 +219,6 @@ namespace MonoTests.System.Security.Permissions { Assert.AreEqual (b.SecurityZone.ToString (), (se.Children [1] as SecurityElement).Attribute ("Zone"), "Zone#2"); // strangely it is still versioned as 'version="1"'. Assert.AreEqual ("1", se.Attribute ("version"), "Version"); -#else - Assert.IsNull (result); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Policy/ApplicationDirectoryTest.cs b/mcs/class/corlib/Test/System.Security.Policy/ApplicationDirectoryTest.cs index 4da723565bc..784ea6b6f79 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/ApplicationDirectoryTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/ApplicationDirectoryTest.cs @@ -62,9 +62,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif public void ApplicationDirectory_Invalid () { new ApplicationDirectory (Invalid (false)); @@ -74,11 +71,7 @@ namespace MonoTests.System.Security.Policy { public void ApplicationDirectory_String () { ApplicationDirectory ad = new ApplicationDirectory ("mono"); -#if NET_2_0 Assert.AreEqual ("mono", ad.Directory, "Directory"); -#else - Assert.AreEqual ("file://MONO", ad.Directory, "Directory"); -#endif } [Test] @@ -99,11 +92,7 @@ namespace MonoTests.System.Security.Policy { public void Copy () { ApplicationDirectory ad = new ApplicationDirectory ("novell"); -#if NET_2_0 Assert.AreEqual ("novell", ad.Directory, "Directory"); -#else - Assert.AreEqual ("file://NOVELL", ad.Directory, "Directory"); -#endif ApplicationDirectory copy = (ApplicationDirectory)ad.Copy (); Assert.IsTrue (ad.Equals (copy), "ad.Equals(copy)"); Assert.IsTrue (copy.Equals (ad), "copy.Equals(ad)"); @@ -132,23 +121,13 @@ namespace MonoTests.System.Security.Policy { { string linux = "/unix/path/mono"; ApplicationDirectory ad1 = new ApplicationDirectory (linux); -#if NET_2_0 Assert.AreEqual (linux, ad1.Directory); Assert.AreEqual (linux.GetHashCode (), ad1.GetHashCode (), "GetHashCode-Linux"); -#else - Assert.AreEqual ("file://UNIX/PATH/mono", ad1.Directory); - Assert.AreEqual ("file://UNIX/PATH/mono".GetHashCode (), ad1.GetHashCode (), "GetHashCode-Linux"); -#endif string windows = "\\windows\\path\\mono"; ApplicationDirectory ad2 = new ApplicationDirectory (windows); -#if NET_2_0 Assert.AreEqual (windows, ad2.Directory); Assert.AreEqual (windows.GetHashCode (), ad2.GetHashCode (), "GetHashCode-Windows"); -#else - Assert.AreEqual ("file://WINDOWS/PATH/mono", ad2.Directory); - Assert.AreEqual ("file://WINDOWS/PATH/mono".GetHashCode (), ad2.GetHashCode (), "GetHashCode-Windows"); -#endif } [Test] @@ -161,7 +140,6 @@ namespace MonoTests.System.Security.Policy { Assert.IsTrue (ts.IndexOf ("<Directory>file://MONO</Directory>") > 0, "Directory"); } -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentException))] public void Equals_Invalid () @@ -186,6 +164,5 @@ namespace MonoTests.System.Security.Policy { { new ApplicationDirectory (Invalid (true)).ToString (); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs b/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs index 29103621206..7a14586e78b 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/ApplicationMembershipConditionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -235,4 +234,3 @@ namespace MonoTests.System.Security.Policy { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerCas.cs b/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerCas.cs index 1a9de58433a..1e616e96da9 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerCas.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerCas.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -159,4 +158,3 @@ namespace MonoCasTests.System.Security.Policy { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerTest.cs b/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerTest.cs index 4b9030777e1..3467826c54b 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/ApplicationSecurityManagerTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -169,4 +168,3 @@ namespace MonoTests.System.Security.Policy { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Policy/ApplicationTrustTest.cs b/mcs/class/corlib/Test/System.Security.Policy/ApplicationTrustTest.cs index 3c1bf692c42..453cf8b27a7 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/ApplicationTrustTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/ApplicationTrustTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; @@ -255,4 +254,3 @@ namespace MonoTests.System.Security.Policy { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs b/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs index ab45c90881a..74a33793349 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/DomainApplicationMembershipConditionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -208,4 +207,3 @@ namespace MonoTests.System.Security.Policy { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Policy/GacMembershipConditionTest.cs b/mcs/class/corlib/Test/System.Security.Policy/GacMembershipConditionTest.cs index 610eecb5327..4afc024174d 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/GacMembershipConditionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/GacMembershipConditionTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -201,4 +200,3 @@ namespace MonoTests.System.Security.Policy { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Policy/GacTest.cs b/mcs/class/corlib/Test/System.Security.Policy/GacTest.cs index b0a28441a88..5c302c165d0 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/GacTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/GacTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -92,4 +91,3 @@ namespace MonoTests.System.Security.Policy { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security.Policy/HashTest.cs b/mcs/class/corlib/Test/System.Security.Policy/HashTest.cs index 00cc9526441..931d74b9476 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/HashTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/HashTest.cs @@ -109,9 +109,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // Current hashing is compatible with Fx 2.0 but not with Fx 1.0/1.1 -#endif public void MD5_Property () { Hash h = new Hash (wellKnownAssembly); @@ -119,9 +116,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // Current hashing is compatible with Fx 2.0 but not with Fx 1.0/1.1 -#endif public void SHA1_Property () { Hash h = new Hash (wellKnownAssembly); @@ -129,9 +123,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // Current hashing is compatible with Fx 2.0 but not with Fx 1.0/1.1 -#endif public void GenerateHash_MD5 () { Hash h = new Hash (wellKnownAssembly); @@ -140,9 +131,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // Current hashing is compatible with Fx 2.0 but not with Fx 1.0/1.1 -#endif public void GenerateHash_SHA1 () { Hash h = new Hash (wellKnownAssembly); @@ -151,9 +139,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // Current hashing is compatible with Fx 2.0 but not with Fx 1.0/1.1 -#endif public void GenerateHash_SHA256 () { Hash h = new Hash (wellKnownAssembly); @@ -162,9 +147,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // Current hashing is compatible with Fx 2.0 but not with Fx 1.0/1.1 -#endif public void GenerateHash_SHA384 () { Hash h = new Hash (wellKnownAssembly); @@ -173,9 +155,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [Category ("NotDotNet")] // Current hashing is compatible with Fx 2.0 but not with Fx 1.0/1.1 -#endif public void GenerateHash_SHA512 () { Hash h = new Hash (wellKnownAssembly); @@ -183,7 +162,6 @@ namespace MonoTests.System.Security.Policy { Assert.AreEqual ("C0-05-76-29-F9-E7-32-A9-8D-73-4B-90-12-6A-85-3F-5C-D3-5B-EF-A6-F2-A6-15-38-9C-22-FA-7E-72-CA-10-B0-21-E0-B6-0B-B8-AB-9E-0E-9F-64-0E-C6-F3-48-96-01-7B-A6-20-07-2F-03-6A-51-03-0F-3F-C4-70-B3-0F", BitConverter.ToString (result)); } -#if NET_2_0 [Test] public void GenerateHash_RIPEMD160 () { @@ -251,6 +229,5 @@ namespace MonoTests.System.Security.Policy { Hash h = Hash.CreateSHA1 (new byte [0]); string ts = h.ToString (); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security.Policy/IBuiltInEvidenceTest.cs b/mcs/class/corlib/Test/System.Security.Policy/IBuiltInEvidenceTest.cs index cba3abfd532..4b79c949de9 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/IBuiltInEvidenceTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/IBuiltInEvidenceTest.cs @@ -101,7 +101,6 @@ namespace MonoTests.System.Security.Policy { Assert.AreEqual (21, GetRequiredSize (ad, true), "GetRequiredSize-true-2"); Assert.AreEqual (19, GetRequiredSize (ad, false), "GetRequiredSize-false-2"); } -#if NET_2_0 [Test] public void GacInstalled_GetRequiredSize () { @@ -169,7 +168,6 @@ namespace MonoTests.System.Security.Policy { GacInstalled g = new GacInstalled (); OutputToBuffer (g, buffer, 1, false); } -#endif [Test] public void Hash_GetRequiredSize () { diff --git a/mcs/class/corlib/Test/System.Security.Policy/NetCodeGroupTest.cs b/mcs/class/corlib/Test/System.Security.Policy/NetCodeGroupTest.cs index 438982b1500..a6f3760d1d6 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/NetCodeGroupTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/NetCodeGroupTest.cs @@ -54,13 +54,8 @@ namespace MonoTests.System.Security.Policy { Assert.IsNull (cg.PolicyStatement, "PolicyStatement"); // documented as always null Assert.IsNull (cg.AttributeString, "AttributeString"); -#if NET_2_0 // seems it's easier to change code than to change code ;) Assert.AreEqual ("Same site Web", cg.PermissionSetName, "PermissionSetName"); -#else - // documented as always "Same site Web" but it's "Same site Web." (missing .) - Assert.AreEqual ("Same site Web.", cg.PermissionSetName, "PermissionSetName"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Policy/PermissionRequestEvidenceTest.cs b/mcs/class/corlib/Test/System.Security.Policy/PermissionRequestEvidenceTest.cs index 88d01e6c86f..1b926cf0d5f 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/PermissionRequestEvidenceTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/PermissionRequestEvidenceTest.cs @@ -42,11 +42,9 @@ namespace MonoTests.System.Security.Policy { private string AdjustNewLine (string s) { -#if NET_2_0 // no spaces are used in Fx 2.0 while (s.IndexOf ("\r\n ") != -1) s = s.Replace ("\r\n ", "\r\n"); -#endif if (Environment.NewLine != "\r\n") s = s.Replace ("\r\n", Environment.NewLine); return s; diff --git a/mcs/class/corlib/Test/System.Security.Policy/PolicyLevelTest.cs b/mcs/class/corlib/Test/System.Security.Policy/PolicyLevelTest.cs index dbc02971838..2341b51f30b 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/PolicyLevelTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/PolicyLevelTest.cs @@ -124,9 +124,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if ! NET_2_0 - [Category ("NotDotNet")] // System.ExecutionEngineException on MS runtime (1.1) -#endif public void AddNamedPermissionSet () { PolicyLevel pl = Load (minimal, PolicyLevelType.Machine); @@ -148,9 +145,6 @@ namespace MonoTests.System.Security.Policy { [Test] [ExpectedException (typeof (ArgumentException))] -#if ! NET_2_0 - [Category ("NotDotNet")] // System.ExecutionEngineException on MS runtime (1.1) -#endif public void AddNamedPermissionSet_Duplicate () { PolicyLevel pl = Load (minimal, PolicyLevelType.Machine); @@ -162,9 +156,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if ! NET_2_0 - [Category ("NotDotNet")] // System.ExecutionEngineException on MS runtime (1.1) -#endif public void ChangeNamedPermissionSet () { PolicyLevel pl = Load (minimal, PolicyLevelType.Machine); @@ -319,9 +310,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if ! NET_2_0 - [Category ("NotDotNet")] // System.ExecutionEngineException on MS runtime (1.1) -#endif public void GetNamedPermissionSet () { PolicyLevel pl = Load (minimal, PolicyLevelType.Machine); @@ -449,9 +437,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if ! NET_2_0 - [Category ("NotDotNet")] // System.ExecutionEngineException on MS runtime (1.1) -#endif public void RemoveNamedPermissionSet () { PolicyLevel pl = Load (minimal, PolicyLevelType.Machine); @@ -481,9 +466,6 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if ! NET_2_0 - [Category ("NotDotNet")] // System.ExecutionEngineException on MS runtime (1.1) -#endif public void RemoveNamedPermissionSet_String () { PolicyLevel pl = Load (minimal, PolicyLevelType.Machine); diff --git a/mcs/class/corlib/Test/System.Security.Policy/PolicyStatementTest.cs b/mcs/class/corlib/Test/System.Security.Policy/PolicyStatementTest.cs index 784e6f26018..80e63bd1ac2 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/PolicyStatementTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/PolicyStatementTest.cs @@ -189,7 +189,6 @@ namespace MonoTests.System.Security.Policy { Assert.AreEqual (ps1.ToXml ().ToString (), ps2.ToXml ().ToString (), "Xml"); } -#if NET_2_0 [Test] [Category ("NotWorking")] public void Equals () @@ -212,6 +211,5 @@ namespace MonoTests.System.Security.Policy { Assert.IsTrue (unr3.Equals (unr2), "unr3.Equals (unr2)"); Assert.IsTrue (unr2.Equals (unr3), "unr2.Equals (unr3)"); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security.Policy/PublisherTest.cs b/mcs/class/corlib/Test/System.Security.Policy/PublisherTest.cs index 8a26e87302c..35608e59296 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/PublisherTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/PublisherTest.cs @@ -56,9 +56,7 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void EmptyCertificateConstructor () { byte[] n = null; @@ -70,11 +68,7 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#else - [ExpectedException (typeof (NullReferenceException))] -#endif public void EmptyCertificateConstructor2 () { byte[] n = null; @@ -95,9 +89,6 @@ namespace MonoTests.System.Security.Policy { Assert.IsTrue ((ip is PublisherIdentityPermission), "CreateIdentityPermission"); string s = "<System.Security.Policy.Publisher version=\"1\">" + Environment.NewLine; -#if !NET_2_0 - s += " "; -#endif s += "<X509v3Certificate>3082050F308203F7A003020102020A61071143000000000034300D06092A864886F70D01010505003081A6310B3009060355040613025553311330110603550408130A57617368696E67746F6E3110300E060355040713075265646D6F6E64311E301C060355040A13154D6963726F736F667420436F72706F726174696F6E312B3029060355040B1322436F70797269676874202863292032303030204D6963726F736F667420436F72702E312330210603550403131A4D6963726F736F667420436F6465205369676E696E6720504341301E170D3032303532353030353534385A170D3033313132353031303534385A3081A1310B3009060355040613025553311330110603550408130A57617368696E67746F6E3110300E060355040713075265646D6F6E64311E301C060355040A13154D6963726F736F667420436F72706F726174696F6E312B3029060355040B1322436F70797269676874202863292032303032204D6963726F736F667420436F72702E311E301C060355040313154D6963726F736F667420436F72706F726174696F6E30820122300D06092A864886F70D01010105000382010F003082010A0282010100AA99BD39A81827F42B3D0B4C3F"; s += "7C772EA7CBB5D18C0DC23A74D793B5E0A04B3F595ECE454F9A7929F149CC1A47EE55C2083E1220F855F2EE5FD3E0CA96BC30DEFE58C82732D08554E8F09110BBF32BBE19E5039B0B861DF3B0398CB8FD0B1D3C7326AC572BCA29A215908215E277A34052038B9DC270BA1FE934F6F335924E5583F8DA30B620DE5706B55A4206DE59CBF2DFA6BD154771192523D2CB6F9B1979DF6A5BF176057929FCC356CA8F440885558ACBC80F464B55CB8C96774A87E8A94106C7FF0DE968576372C36957B443CF323A30DC1BE9D543262A79FE95DB226724C92FD034E3E6FB514986B83CD0255FD6EC9E036187A96840C7F8E203E6CF050203010001A38201403082013C300E0603551D0F0101FF0404030206C030130603551D25040C300A06082B06010505070303301D0603551D0E041604146BC8C65120F0B42FD3A0B6AE7F5E26B2B88752293081A90603551D230481A130819E8014295CB91BB6CD33EEBB9E597DF7E5CA2EC40D3428A174A4723070312B3029060355040B1322436F70797269676874202863292031393937204D6963726F736F667420436F72702E311E301C060355040B13154D6963726F736F667420436F72706F726174696F6E3121301F060355040313184D6963726F736F667420526F6F7420417574686F7269747982106A0B994FC000DEAA11D4D8"; s += "409AA8BEE6304A0603551D1F04433041303FA03DA03B8639687474703A2F2F63726C2E6D6963726F736F66742E636F6D2F706B692F63726C2F70726F64756374732F436F64655369676E5043412E63726C300D06092A864886F70D010105050003820101003523FD1354FCE9DCF0DD0C147AFAA7B3CEFDA73AC8BAE5E7F603FB53DBA799A9A09B369C03EB82471C21BD14CBE7674009C716910255CE4342B4CD1B5DB0F332043D12E51DA707A78FA37E4555761B96959169F0DD38F34889EF7040B7DBB55580C003C42EB628DC0A820EC743E37A485DB8068992406C6EC5DCF89AEF0BBE210A8C2F3AB5EDA7CE71876823E1B3E4187DB84701A52BC458CBB2896C5FFDD32CC46FB823B20DFF3CF2114574F209069918DD6FC0860118121D2B16AF56EF6533A1EA674EF44B82ABE90FDC01FADF607F66475DCB2C70CC7B4ED906B86E8C0CFE621E42F9937CA2AB0A9ED02310AE4D7B27916F26BE68FAA63F9F23EBC89DBB87</X509v3Certificate>" + Environment.NewLine + "</System.Security.Policy.Publisher>" + Environment.NewLine; diff --git a/mcs/class/corlib/Test/System.Security.Policy/SiteTest.cs b/mcs/class/corlib/Test/System.Security.Policy/SiteTest.cs index 18e589e7b65..ee7e717bf81 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/SiteTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/SiteTest.cs @@ -79,11 +79,7 @@ namespace MonoTests.System.Security.Policy { { Site s = new Site ("www.go-mono.com"); Assert.AreEqual ("www.go-mono.com", s.Name, "Name"); -#if NET_2_0 Assert.AreEqual ("<System.Security.Policy.Site version=\"1\">" + Environment.NewLine + "<Name>www.go-mono.com</Name>" + Environment.NewLine + "</System.Security.Policy.Site>" + Environment.NewLine, s.ToString (), "ToString"); -#else - Assert.AreEqual ("<System.Security.Policy.Site version=\"1\">" + Environment.NewLine + " <Name>www.go-mono.com</Name>" + Environment.NewLine + "</System.Security.Policy.Site>" + Environment.NewLine, s.ToString (), "ToString"); -#endif Site s2 = (Site) s.Copy (); Assert.AreEqual (s.Name, s2.Name, "Copy.Name"); Assert.AreEqual (s.GetHashCode (), s2.GetHashCode (), "Copy.GetHashCode"); @@ -101,11 +97,7 @@ namespace MonoTests.System.Security.Policy { { Site s = new Site ("*.go-mono.com"); Assert.AreEqual ("*.go-mono.com", s.Name, "Name"); -#if NET_2_0 Assert.AreEqual ("<System.Security.Policy.Site version=\"1\">" + Environment.NewLine + "<Name>*.go-mono.com</Name>" + Environment.NewLine + "</System.Security.Policy.Site>" + Environment.NewLine, s.ToString (), "ToString"); -#else - Assert.AreEqual ("<System.Security.Policy.Site version=\"1\">" + Environment.NewLine + " <Name>*.go-mono.com</Name>" + Environment.NewLine + "</System.Security.Policy.Site>" + Environment.NewLine, s.ToString (), "ToString"); -#endif Site s2 = (Site) s.Copy (); Assert.AreEqual (s.Name, s2.Name, "Copy.Name"); Assert.AreEqual (s.GetHashCode (), s2.GetHashCode (), "Copy.GetHashCode"); @@ -160,11 +152,7 @@ namespace MonoTests.System.Security.Policy { { Site s = new Site ("*"); Assert.AreEqual ("*", s.Name, "Name"); -#if NET_2_0 Assert.AreEqual ("<System.Security.Policy.Site version=\"1\">" + Environment.NewLine + "<Name>*</Name>" + Environment.NewLine + "</System.Security.Policy.Site>" + Environment.NewLine, s.ToString (), "ToString"); -#else - Assert.AreEqual ("<System.Security.Policy.Site version=\"1\">" + Environment.NewLine + " <Name>*</Name>" + Environment.NewLine + "</System.Security.Policy.Site>" + Environment.NewLine, s.ToString (), "ToString"); -#endif Site s2 = (Site) s.Copy (); Assert.AreEqual (s.Name, s2.Name, "Copy.Name"); Assert.AreEqual (s.GetHashCode (), s2.GetHashCode (), "Copy.GetHashCode"); @@ -192,19 +180,12 @@ namespace MonoTests.System.Security.Policy { // Console.WriteLine ("FAIL: {0} - {1}", i, c); } bool result = ((i == 45) // - -#if NET_2_0 || (i == 33) // ! || (i >= 35 && i <= 42) // #$%&'()* || (i >= 48 && i <= 57) // 0-9 || (i >= 94 && i <= 95) // ^_ || (i >= 97 && i <= 123) // a-z{ || (i >= 125 && i <= 126) // }~ -#else - || (i == 42) // * - || (i >= 47 && i <= 57) // /,0-9 - || (i == 95) // _ - || (i >= 97 && i <= 122) // a-z -#endif || (i >= 64 && i <= 90)); // @,A-Z Assert.IsTrue ((actual == result), "#"+i); } @@ -228,9 +209,6 @@ namespace MonoTests.System.Security.Policy { "http://www.go-mono.com", "http://*.go-mono.com", "http://www.go-mono.com:8080/index.html", -#if !NET_2_0 - "file://mono/index.html", // file:// is supported as a site (1.0/1.1) -#endif }; [Test] @@ -242,7 +220,6 @@ namespace MonoTests.System.Security.Policy { } } -#if NET_2_0 string[] invalid_urls = { "file://mono/index.html", // file:// isn't supported as a site (2.0) }; @@ -269,6 +246,5 @@ namespace MonoTests.System.Security.Policy { } } } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security.Policy/StrongNameTest.cs b/mcs/class/corlib/Test/System.Security.Policy/StrongNameTest.cs index 6a95bc4760e..e90210c41b8 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/StrongNameTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/StrongNameTest.cs @@ -68,9 +68,7 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentException))] -#endif public void EmptyNameConstructor () { StrongName sn = new StrongName (snpkb, String.Empty, version); @@ -100,11 +98,7 @@ namespace MonoTests.System.Security.Policy { string s = String.Format ("<StrongName version=\"1\"{0}{1}Key=\"00240000048000009400000006020000002400005253413100040000010001003DBD7208C62B0EA8C1C058072B635F7C9ABDCB22DB20B2A9DADAEFE800642F5D8DEB7802F7A5367728D7558D1468DBEB2409D02B131B926E2E59544AAC18CFC909023F4FA83E94001FC2F11A27477D1084F514B861621A0C66ABD24C4B9FC90F3CD8920FF5FFCED76E5C6FB1F57DD356F96727A4A5485B079344004AF8FFA4CB\"{0}{1}Name=\"StrongNameName\"{0}{1}Version=\"1.2.3.4\"/>{0}", Environment.NewLine, -#if NET_2_0 String.Empty); -#else - " "); -#endif Assert.AreEqual (s, sn.ToString (), "ToString"); } diff --git a/mcs/class/corlib/Test/System.Security.Policy/UrlMembershipConditionTest.cs b/mcs/class/corlib/Test/System.Security.Policy/UrlMembershipConditionTest.cs index bc14aa785dc..dd6e7131f5c 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/UrlMembershipConditionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/UrlMembershipConditionTest.cs @@ -118,66 +118,35 @@ namespace MonoTests.System.Security.Policy { public void Url_NoProtocol () { UrlMembershipCondition umc = new UrlMembershipCondition ("www.go-mono.com"); -#if NET_2_0 Assert.AreEqual ("www.go-mono.com", umc.Url, "Url"); Assert.AreEqual ("Url - www.go-mono.com", umc.ToString (), "ToString"); -#else - // note: no last slash here - Assert.AreEqual ("file://WWW.GO-MONO.COM", umc.Url, "Url"); - Assert.AreEqual ("Url - file://WWW.GO-MONO.COM", umc.ToString (), "ToString"); -#endif } [Test] public void Url_WellKnownProtocol () { UrlMembershipCondition umc = new UrlMembershipCondition ("http://www.go-mono.com"); -#if NET_2_0 Assert.AreEqual ("http://www.go-mono.com", umc.Url, "http-Url"); Assert.AreEqual ("Url - http://www.go-mono.com", umc.ToString (), "http-ToString"); -#else - Assert.AreEqual ("http://www.go-mono.com/", umc.Url, "http-Url"); - Assert.AreEqual ("Url - http://www.go-mono.com/", umc.ToString (), "http-ToString"); -#endif umc = new UrlMembershipCondition ("https://www.go-mono.com"); -#if NET_2_0 Assert.AreEqual ("https://www.go-mono.com", umc.Url, "https-Url"); Assert.AreEqual ("Url - https://www.go-mono.com", umc.ToString (), "https-ToString"); -#else - Assert.AreEqual ("https://www.go-mono.com/", umc.Url, "https-Url"); - Assert.AreEqual ("Url - https://www.go-mono.com/", umc.ToString (), "https-ToString"); -#endif umc = new UrlMembershipCondition ("ftp://www.go-mono.com"); -#if NET_2_0 Assert.AreEqual ("ftp://www.go-mono.com", umc.Url, "ftp-Url"); Assert.AreEqual ("Url - ftp://www.go-mono.com", umc.ToString (), "ftp-ToString"); -#else - Assert.AreEqual ("ftp://www.go-mono.com/", umc.Url, "ftp-Url"); - Assert.AreEqual ("Url - ftp://www.go-mono.com/", umc.ToString (), "ftp-ToString"); -#endif umc = new UrlMembershipCondition ("file://www.go-mono.com"); -#if NET_2_0 Assert.AreEqual ("file://www.go-mono.com", umc.Url, "file-Url"); Assert.AreEqual ("Url - file://www.go-mono.com", umc.ToString (), "file-ToString"); -#else - Assert.AreEqual ("file://WWW.GO-MONO.COM", umc.Url, "file-Url"); - Assert.AreEqual ("Url - file://WWW.GO-MONO.COM", umc.ToString (), "file-ToString"); -#endif } [Test] public void Url_UnknownProtocol () { UrlMembershipCondition umc = new UrlMembershipCondition ("mono://www.go-mono.com"); -#if NET_2_0 Assert.AreEqual ("mono://www.go-mono.com", umc.Url, "Url"); Assert.AreEqual ("Url - mono://www.go-mono.com", umc.ToString (), "ToString"); -#else - Assert.AreEqual ("mono://www.go-mono.com/", umc.Url, "Url"); - Assert.AreEqual ("Url - mono://www.go-mono.com/", umc.ToString (), "ToString"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security.Policy/UrlTest.cs b/mcs/class/corlib/Test/System.Security.Policy/UrlTest.cs index 7f62cadcc72..0cf9a442c50 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/UrlTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/UrlTest.cs @@ -56,11 +56,7 @@ namespace MonoTests.System.Security.Policy { public void Url_NoProtocol () { Url u = new Url ("index.html"); -#if NET_2_0 Assert.AreEqual ("index.html", u.Value, "Value"); -#else - Assert.AreEqual ("file://INDEX.HTML", u.Value, "Value"); -#endif } [Test] @@ -70,17 +66,10 @@ namespace MonoTests.System.Security.Policy { Url u2 = new Url ("ftp://www.go-mono.com"); Url u3 = new Url ("http://www.go-mono.com"); Url u4 = new Url ("https://www.go-mono.com"); -#if NET_2_0 Assert.AreEqual ("file://mono/index.html", u1.Value, "file.Value"); Assert.AreEqual ("ftp://www.go-mono.com", u2.Value, "ftp.Value"); Assert.AreEqual ("http://www.go-mono.com", u3.Value, "http.Value"); Assert.AreEqual ("https://www.go-mono.com", u4.Value, "https.Value"); -#else - Assert.AreEqual ("file://MONO/INDEX.HTML", u1.Value, "file.Value"); - Assert.AreEqual ("ftp://www.go-mono.com/", u2.Value, "ftp.Value"); - Assert.AreEqual ("http://www.go-mono.com/", u3.Value, "http.Value"); - Assert.AreEqual ("https://www.go-mono.com/", u4.Value, "https.Value"); -#endif } [Test] @@ -106,12 +95,8 @@ namespace MonoTests.System.Security.Policy { Url u = new Url (url); Assert.IsTrue (u.Value.StartsWith (url), "Value"); -#if NET_2_0 // no spaces in XML, no ending '/' on url Assert.AreEqual ("<System.Security.Policy.Url version=\"1\">" + Environment.NewLine + "<Url>http://www.go-mono.com</Url>" + Environment.NewLine + "</System.Security.Policy.Url>" + Environment.NewLine, u.ToString (), "ToString"); -#else - Assert.AreEqual ("<System.Security.Policy.Url version=\"1\">" + Environment.NewLine + " <Url>http://www.go-mono.com/</Url>" + Environment.NewLine + "</System.Security.Policy.Url>" + Environment.NewLine, u.ToString (), "ToString"); -#endif Url u2 = (Url) u.Copy (); Assert.AreEqual (u.Value, u2.Value, "Copy.Value"); Assert.AreEqual (u.GetHashCode (), u2.GetHashCode (), "Copy.GetHashCode"); @@ -125,15 +110,10 @@ namespace MonoTests.System.Security.Policy { } [Test] -#if !NET_2_0 - [ExpectedException (typeof (ArgumentException))] -#endif public void Url_InvalidSite () { Url u = new Url ("http://www.go-mono.*"); -#if NET_2_0 Assert.AreEqual ("http://www.go-mono.*", u.Value, "Value"); -#endif } [Test] @@ -164,13 +144,8 @@ namespace MonoTests.System.Security.Policy { public void Url_LoneStar () { Url u = new Url ("*"); -#if NET_2_0 Assert.AreEqual ("*", u.Value, "Value"); Assert.AreEqual ("<System.Security.Policy.Url version=\"1\">" + Environment.NewLine + "<Url>*</Url>" + Environment.NewLine + "</System.Security.Policy.Url>" + Environment.NewLine, u.ToString (), "ToString"); -#else - Assert.AreEqual ("file://*", u.Value, "Value"); - Assert.AreEqual ("<System.Security.Policy.Url version=\"1\">" + Environment.NewLine + " <Url>file://*</Url>" + Environment.NewLine + "</System.Security.Policy.Url>" + Environment.NewLine, u.ToString (), "ToString"); -#endif Url u2 = (Url) u.Copy (); Assert.AreEqual (u.Value, u2.Value, "Copy.Value"); Assert.AreEqual (u.GetHashCode (), u2.GetHashCode (), "Copy.GetHashCode"); diff --git a/mcs/class/corlib/Test/System.Security.Policy/ZoneMembershipConditionTest.cs b/mcs/class/corlib/Test/System.Security.Policy/ZoneMembershipConditionTest.cs index c000ad02fa3..1cf15b99176 100644 --- a/mcs/class/corlib/Test/System.Security.Policy/ZoneMembershipConditionTest.cs +++ b/mcs/class/corlib/Test/System.Security.Policy/ZoneMembershipConditionTest.cs @@ -114,9 +114,7 @@ namespace MonoTests.System.Security.Policy { Assert.IsTrue (zmc.ToString ().StartsWith ("Zone - "), "ToString-1"); Assert.IsTrue (zmc.ToString ().EndsWith (zmc.SecurityZone.ToString ()), "ToString-2"); -#if NET_2_0 Assert.AreEqual (zmc.SecurityZone.GetHashCode (), zmc.GetHashCode (), "GetHashCode"); -#endif return zmc; // for further tests } diff --git a/mcs/class/corlib/Test/System.Security.Principal/GenericIdentityTest.cs b/mcs/class/corlib/Test/System.Security.Principal/GenericIdentityTest.cs index a94c79e74f7..57ad3a6ec52 100644 --- a/mcs/class/corlib/Test/System.Security.Principal/GenericIdentityTest.cs +++ b/mcs/class/corlib/Test/System.Security.Principal/GenericIdentityTest.cs @@ -78,11 +78,7 @@ namespace MonoTests.System.Security.Principal { Assert.AreEqual (gi.IsAuthenticated, clone.IsAuthenticated, "IsAuthenticated"); } -#if NET_2_0 static byte[] identity = { 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x29, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x02, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x06, 0x6D, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x01, 0x01, 0x06, 0x02, 0x00, 0x00, 0x00, 0x04, 0x6D, 0x6F, 0x6E, 0x6F, 0x06, 0x03, 0x00, 0x00, 0x00, 0x03, 0x64, 0x6E, 0x61, 0x0B }; -#else - static byte[] identity = { 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x29, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x02, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x06, 0x6D, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x01, 0x01, 0x06, 0x02, 0x00, 0x00, 0x00, 0x04, 0x6D, 0x6F, 0x6E, 0x6F, 0x06, 0x03, 0x00, 0x00, 0x00, 0x03, 0x64, 0x6E, 0x61, 0x0B }; -#endif [Test] public void Deserialize () diff --git a/mcs/class/corlib/Test/System.Security.Principal/GenericPrincipalTest.cs b/mcs/class/corlib/Test/System.Security.Principal/GenericPrincipalTest.cs index 4d04928d4ed..bd0b26c5af1 100644 --- a/mcs/class/corlib/Test/System.Security.Principal/GenericPrincipalTest.cs +++ b/mcs/class/corlib/Test/System.Security.Principal/GenericPrincipalTest.cs @@ -78,11 +78,7 @@ namespace MonoTests.System.Security.Principal { Assert.IsFalse (gp.IsInRole ("donkey"), "IsInRole-donkey"); } -#if NET_2_0 static byte[] principal = { 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x2A, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x02, 0x00, 0x00, 0x00, 0x0A, 0x6D, 0x5F, 0x69, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x07, 0x6D, 0x5F, 0x72, 0x6F, 0x6C, 0x65, 0x73, 0x03, 0x06, 0x29, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x09, 0x02, 0x00, 0x00, 0x00, 0x09, 0x03, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x29, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x02, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x06, 0x6D, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x01, 0x01, 0x06, 0x04, 0x00, 0x00, 0x00, 0x04, 0x6D, 0x6F, 0x6E, 0x6F, 0x06, 0x05, 0x00, 0x00, 0x00, 0x03, 0x64, 0x6E, 0x61, 0x11, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x6F, 0x6E, 0x6B, 0x65, 0x79, 0x06, 0x07, 0x00, 0x00, 0x00, 0x07, 0x68, 0x61, 0x63, 0x6B, 0x65, 0x72, 0x73, 0x0B }; -#else - static byte[] principal = { 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x2A, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x02, 0x00, 0x00, 0x00, 0x0A, 0x6D, 0x5F, 0x69, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x07, 0x6D, 0x5F, 0x72, 0x6F, 0x6C, 0x65, 0x73, 0x03, 0x06, 0x29, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x09, 0x02, 0x00, 0x00, 0x00, 0x09, 0x03, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x00, 0x29, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2E, 0x50, 0x72, 0x69, 0x6E, 0x63, 0x69, 0x70, 0x61, 0x6C, 0x2E, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x69, 0x63, 0x49, 0x64, 0x65, 0x6E, 0x74, 0x69, 0x74, 0x79, 0x02, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x06, 0x6D, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x01, 0x01, 0x06, 0x04, 0x00, 0x00, 0x00, 0x04, 0x6D, 0x6F, 0x6E, 0x6F, 0x06, 0x05, 0x00, 0x00, 0x00, 0x03, 0x64, 0x6E, 0x61, 0x11, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00, 0x06, 0x6D, 0x6F, 0x6E, 0x6B, 0x65, 0x79, 0x06, 0x07, 0x00, 0x00, 0x00, 0x07, 0x68, 0x61, 0x63, 0x6B, 0x65, 0x72, 0x73, 0x0B }; -#endif [Test] public void Deserialize () diff --git a/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs b/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs index 2510e4e35ae..80336afc641 100644 --- a/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs +++ b/mcs/class/corlib/Test/System.Security/HostSecurityManagerTest.cs @@ -28,7 +28,7 @@ // // NET_2_1 profile lacks some (of the few) CAS features required to execute those tests -#if NET_2_0 && !NET_2_1 +#if !NET_2_1 using NUnit.Framework; using System; diff --git a/mcs/class/corlib/Test/System.Security/NamedPermissionSetTest.cs b/mcs/class/corlib/Test/System.Security/NamedPermissionSetTest.cs index abd5b2b3445..bfd6553b709 100644 --- a/mcs/class/corlib/Test/System.Security/NamedPermissionSetTest.cs +++ b/mcs/class/corlib/Test/System.Security/NamedPermissionSetTest.cs @@ -151,13 +151,8 @@ namespace MonoTests.System.Security { NamedPermissionSet nps = new NamedPermissionSet ("name", null); Assert.AreEqual ("name", nps.Name, "Name"); Assert.IsNull (nps.Description, "Description"); -#if NET_2_0 Assert.IsTrue (!nps.IsUnrestricted (), "IsUnrestricted"); Assert.IsTrue (nps.IsEmpty (), "IsEmpty"); -#else - Assert.IsTrue (nps.IsUnrestricted (), "IsUnrestricted"); - Assert.IsTrue (!nps.IsEmpty (), "IsEmpty"); -#endif Assert.IsTrue (!nps.IsReadOnly, "IsReadOnly"); Assert.IsTrue (!nps.IsSynchronized, "IsSynchronized"); Assert.AreEqual (0, nps.Count, "Count"); @@ -348,10 +343,8 @@ namespace MonoTests.System.Security { se = nps.ToXml (); Assert.IsNull (se.Attribute ("Name"), "Name attribute"); -#if NET_2_0 Assert.AreEqual (0, nps.GetHashCode (), "GetHashCode"); Assert.IsTrue (nps.Equals (nps), "Equals-self"); -#endif } [Test] @@ -407,7 +400,6 @@ namespace MonoTests.System.Security { Assert.IsNull ((se.Attributes ["Description"] as string), "Unrestricted.Description"); Assert.AreEqual ("true", (se.Attributes ["Unrestricted"] as string), "Unrestricted.Unrestricted"); } -#if NET_2_0 [Test] public void Equals () { @@ -442,8 +434,7 @@ namespace MonoTests.System.Security { psu.Description = sentinel; Assert.IsTrue (psu.GetHashCode () == uhc, "GetHashCode-3"); } -#endif } } -#endif
\ No newline at end of file +#endif diff --git a/mcs/class/corlib/Test/System.Security/PermissionSetCas.cs b/mcs/class/corlib/Test/System.Security/PermissionSetCas.cs index 13fc321cddb..cb8816e2c0d 100644 --- a/mcs/class/corlib/Test/System.Security/PermissionSetCas.cs +++ b/mcs/class/corlib/Test/System.Security/PermissionSetCas.cs @@ -45,7 +45,6 @@ namespace MonoCasTests.System.Security { Assert.Ignore ("SecurityManager isn't enabled"); } -#if NET_2_0 [Test] [ExpectedException (typeof (ExecutionEngineException))] public void RevertAssert_WithoutAssertion () @@ -60,6 +59,5 @@ namespace MonoCasTests.System.Security { ups.Assert (); PermissionSet.RevertAssert (); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs b/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs index 501346f0712..55d93b90355 100644 --- a/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs +++ b/mcs/class/corlib/Test/System.Security/PermissionSetCollectionTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -359,4 +358,3 @@ namespace MonoTests.System.Security { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security/PermissionSetTest.cs b/mcs/class/corlib/Test/System.Security/PermissionSetTest.cs index b3bf05debf2..d77e6503f9b 100644 --- a/mcs/class/corlib/Test/System.Security/PermissionSetTest.cs +++ b/mcs/class/corlib/Test/System.Security/PermissionSetTest.cs @@ -69,13 +69,8 @@ namespace MonoTests.System.Security { { // no exception is thrown PermissionSet ps = new PermissionSet (null); -#if NET_2_0 Assert.IsTrue (!ps.IsUnrestricted (), "PermissionStateNull.IsUnrestricted"); Assert.IsTrue (ps.IsEmpty (), "PermissionStateNull.IsEmpty"); -#else - Assert.IsTrue (ps.IsUnrestricted (), "PermissionStateNull.IsUnrestricted"); - Assert.IsTrue (!ps.IsEmpty (), "PermissionStateNull.IsEmpty"); -#endif Assert.IsTrue (!ps.IsReadOnly, "PermissionStateNull.IsReadOnly"); Assert.AreEqual (ps.ToXml ().ToString (), ps.ToString (), "PermissionStateNull.ToXml().ToString()==ToString()"); Assert.IsTrue (!ps.ContainsNonCodeAccessPermissions (), "ContainsNonCodeAccessPermissions"); @@ -150,14 +145,9 @@ namespace MonoTests.System.Security { ZoneIdentityPermission zip = new ZoneIdentityPermission (SecurityZone.MyComputer); result = ps.AddPermission (zip); Assert.IsNotNull (result, "Add(ZoneIdentityPermission)"); -#if NET_2_0 // Identity permissions aren't added to unrestricted permission sets in 2.0 Assert.AreEqual (SecurityZone.NoZone, (result as ZoneIdentityPermission).SecurityZone, "ZoneIdentityPermission"); Assert.AreEqual (0, ps.Count, "1"); -#else - Assert.AreEqual (zip.SecurityZone, (result as ZoneIdentityPermission).SecurityZone, "ZoneIdentityPermission"); - Assert.AreEqual (1, ps.Count, "1"); -#endif } [Test] @@ -291,9 +281,6 @@ namespace MonoTests.System.Security { } [Test] -#if !NET_2_0 - [Ignore ("Don't know why it doesn't work under Fx 1.1")] -#endif public void ConvertPermissionSet_BinaryToBinary () { PermissionSet ps = new PermissionSet (PermissionState.None); @@ -306,9 +293,6 @@ namespace MonoTests.System.Security { } [Test] -#if !NET_2_0 - [Ignore ("Don't know why it doesn't work under Fx 1.1")] -#endif public void ConvertPermissionSet_XmlToBinary () { PermissionSet ps = new PermissionSet (PermissionState.None); @@ -335,11 +319,7 @@ namespace MonoTests.System.Security { } [Test] -#if NET_2_0 [ExpectedException (typeof (XmlSyntaxException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void ConvertPermissionSet_XmlAsciiToXmlUnicode () { PermissionSet ps = new PermissionSet (PermissionState.Unrestricted); @@ -391,12 +371,8 @@ namespace MonoTests.System.Security { Assert.IsNotNull (result, "2.Add"); copy = ps.Copy (); Assert.IsTrue (copy.IsUnrestricted (), "3.State"); -#if NET_2_0 // Identity permissions aren't added to unrestricted permission sets in 2.0 Assert.AreEqual (0, copy.Count, "3.Count"); -#else - Assert.AreEqual (1, copy.Count, "3.Count"); -#endif } [Test] @@ -546,20 +522,11 @@ namespace MonoTests.System.Security { se.AddAttribute ("Unrestricted", "true"); ps2.FromXml (se); Assert.IsTrue (ps2.IsUnrestricted (), "FromXml-Unrestricted.IsUnrestricted"); -#if NET_2_0 Assert.AreEqual (0, ps2.Count, "Unrestricted.Count"); -#else - // IPermission not shown in XML but still present in Count - Assert.AreEqual (1, ps2.Count, "Unrestricted.Count"); -#endif } [Test] -#if NET_2_0 [ExpectedException (typeof (TypeLoadException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_PermissionWithoutNamespace () { SecurityElement child = new SecurityElement ("IPermission"); @@ -577,11 +544,7 @@ namespace MonoTests.System.Security { } [Test] -#if NET_2_0 [ExpectedException (typeof (TypeLoadException))] -#else - [ExpectedException (typeof (ArgumentException))] -#endif public void FromXml_PermissionOutsideCorlib () { SecurityElement child = new SecurityElement ("IPermission"); @@ -629,7 +592,6 @@ namespace MonoTests.System.Security { } Assert.AreEqual (1, i, "Count"); } -#if NET_2_0 [Test] public void GetHashCode_ () { @@ -641,7 +603,6 @@ namespace MonoTests.System.Security { PermissionSet copy = ps.Copy (); Assert.IsTrue (ps.GetHashCode () != copy.GetHashCode (), "Copy"); } -#endif [Test] public void GetPermission_Null () { @@ -742,14 +703,9 @@ namespace MonoTests.System.Security { Compare ("UPS1 N UPS2", ups1.Intersect (ups2), true, 0); Compare ("UPS2 N UPS1", ups2.Intersect (ups1), true, 0); ups2.AddPermission (zip); -#if NET_2_0 // Identity permissions aren't added to unrestricted permission sets in 2.0 Compare ("UPS1 N UPS2+ZIP", ups1.Intersect (ups2), true, 0); Compare ("UPS2+ZIP N UPS1", ups2.Intersect (ups1), true, 0); -#else - Compare ("UPS1 N UPS2+ZIP", ups1.Intersect (ups2), true, 1); - Compare ("UPS2+ZIP N UPS1", ups2.Intersect (ups1), true, 1); -#endif } [Test] @@ -768,12 +724,8 @@ namespace MonoTests.System.Security { PermissionSet ps = new PermissionSet (PermissionState.Unrestricted); Assert.IsTrue (!ps.IsEmpty (), "Unrestricted.IsEmpty"); ps.AddPermission (new ZoneIdentityPermission (SecurityZone.NoZone)); -#if NET_2_0 // Identity permissions aren't added to unrestricted permission sets in 2.0 Assert.AreEqual (0, ps.Count, "Count==0"); -#else - Assert.AreEqual (1, ps.Count, "Count==1"); -#endif Assert.IsTrue (!ps.IsEmpty ()); // yes empty!, "Zip.IsEmpty"); } @@ -837,12 +789,8 @@ namespace MonoTests.System.Security { Assert.IsTrue (!ups1.IsSubsetOf (ps1), "Unrestricted.IsSubset(PS1)"); PermissionSet ups2 = new PermissionSet (PermissionState.Unrestricted); -#if NET_2_0 // as ZoneIdentityPermission isn't added UPS1Z == UPS2 Assert.IsTrue (ups1.IsSubsetOf (ups2), "UPS1Z.IsSubset(UPS2)"); -#else - Assert.IsTrue (!ups1.IsSubsetOf (ups2), "UPS1Z.IsSubset(UPS2)"); -#endif Assert.IsTrue (ups2.IsSubsetOf (ups1), "UPS2.IsSubset(UPS1Z)"); ups2.AddPermission (zip); Assert.IsTrue (ups1.IsSubsetOf (ups2), "UPS1Z.IsSubset(UPS2Z)"); @@ -864,11 +812,7 @@ namespace MonoTests.System.Security { Assert.IsTrue (ps3.IsSubsetOf (ps1), "PS3.IsSubset(PS1)"); PermissionSet ups1 = new PermissionSet (PermissionState.Unrestricted); -#if NET_2_0 Assert.IsTrue (ps1.IsSubsetOf (ups1), "PS1.IsSubset(Unrestricted)"); -#else - Assert.IsTrue (!ps1.IsSubsetOf (ups1), "PS1.IsSubset(Unrestricted)"); -#endif Assert.IsTrue (!ups1.IsSubsetOf (ps1), "Unrestricted.IsSubset(PS1)"); } @@ -906,11 +850,7 @@ namespace MonoTests.System.Security { Assert.IsTrue (ps3.IsSubsetOf (ps1), "PS3.IsSubset(PS1)"); PermissionSet ups1 = new PermissionSet (PermissionState.Unrestricted); -#if NET_2_0 Assert.IsTrue (ps1.IsSubsetOf (ups1), "PS1.IsSubset(Unrestricted)"); -#else - Assert.IsTrue (!ps1.IsSubsetOf (ups1), "PS1.IsSubset(Unrestricted)"); -#endif Assert.IsTrue (!ups1.IsSubsetOf (ps1), "Unrestricted.IsSubset(PS1)"); } @@ -945,13 +885,9 @@ namespace MonoTests.System.Security { ZoneIdentityPermission zip = new ZoneIdentityPermission (SecurityZone.MyComputer); ps.AddPermission (zip); ZoneIdentityPermission removed = (ZoneIdentityPermission)ps.RemovePermission (typeof (ZoneIdentityPermission)); -#if NET_2_0 // identity permissions aren't added to unrestricted permission sets // so they cannot be removed later (hence the null) Assert.IsNull (removed, "ZoneIdentityPermission"); -#else - Assert.IsNotNull (removed, "ZoneIdentityPermission"); -#endif } [Test] @@ -1002,13 +938,9 @@ namespace MonoTests.System.Security { ZoneIdentityPermission zipr = (ZoneIdentityPermission)ps.SetPermission (zip); Assert.AreEqual (1, ps.Count, "ZoneIdentityPermission"); Assert.AreEqual (SecurityZone.MyComputer, zipr.SecurityZone, "SecurityZone"); -#if NET_2_0 // Adding a non unrestricted identity permission now results in // a permission set loosing it's unrestricted status Assert.IsTrue (!ps.IsUnrestricted (), "State-Unrestricted-2"); -#else - Assert.IsTrue (ps.IsUnrestricted (), "State-Unrestricted-2"); -#endif zip = new ZoneIdentityPermission (SecurityZone.Intranet); zipr = (ZoneIdentityPermission)ps.SetPermission (zip); Assert.AreEqual (1, ps.Count, "ZoneIdentityPermission-2"); @@ -1103,7 +1035,6 @@ namespace MonoTests.System.Security { PermissionSet ups1 = new PermissionSet (PermissionState.Unrestricted); ups1.AddPermission (zip); -#if NET_2_0 // Identity permissions aren't added to unrestricted permission sets in 2.0 Compare ("PS1 U Unrestricted", ps1.Union (ups1), true, 0); Compare ("Unrestricted U PS1", ups1.Union (ps1), true, 0); @@ -1113,18 +1044,7 @@ namespace MonoTests.System.Security { ups2.AddPermission (zip); Compare ("UPS1 U UPS2+ZIP", ups1.Union (ups2), true, 0); Compare ("UPS2+ZIP U UPS1", ups2.Union (ups1), true, 0); -#else - Compare ("PS1 U Unrestricted", ps1.Union (ups1), true, 1); - Compare ("Unrestricted U PS1", ups1.Union (ps1), true, 1); - PermissionSet ups2 = new PermissionSet (PermissionState.Unrestricted); - Compare ("UPS1 U UPS2", ups1.Union (ups1), true, 1); - Compare ("UPS2 U UPS1", ups2.Union (ups1), true, 1); - ups2.AddPermission (zip); - Compare ("UPS1 U UPS2+ZIP", ups1.Union (ups2), true, 1); - Compare ("UPS2+ZIP U UPS1", ups2.Union (ups1), true, 1); -#endif } -#if NET_2_0 [Test] [Category ("NotWorking")] // requires imperative stack modifiers [ExpectedException (typeof (ExecutionEngineException))] @@ -1141,7 +1061,6 @@ namespace MonoTests.System.Security { ups.Assert (); PermissionSet.RevertAssert (); } -#endif [Test] public void Assert_NonCasPermission () { diff --git a/mcs/class/corlib/Test/System.Security/SecureStringCas.cs b/mcs/class/corlib/Test/System.Security/SecureStringCas.cs index 3f35de5c6ce..2c60406808a 100644 --- a/mcs/class/corlib/Test/System.Security/SecureStringCas.cs +++ b/mcs/class/corlib/Test/System.Security/SecureStringCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Reflection; @@ -83,4 +82,3 @@ namespace MonoCasTests.System.Security { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security/SecureStringTest.cs b/mcs/class/corlib/Test/System.Security/SecureStringTest.cs index 976628af257..831b830e138 100644 --- a/mcs/class/corlib/Test/System.Security/SecureStringTest.cs +++ b/mcs/class/corlib/Test/System.Security/SecureStringTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Security; @@ -405,4 +404,3 @@ namespace MonoTests.System.Security { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security/SecurityContextCas.cs b/mcs/class/corlib/Test/System.Security/SecurityContextCas.cs index ec6aaa6c13f..4fe8d93f018 100644 --- a/mcs/class/corlib/Test/System.Security/SecurityContextCas.cs +++ b/mcs/class/corlib/Test/System.Security/SecurityContextCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Security; @@ -169,4 +168,3 @@ namespace MonoCasTests.System.Security { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security/SecurityElementTest.cs b/mcs/class/corlib/Test/System.Security/SecurityElementTest.cs index b199a5190bc..7ba4672d4a2 100644 --- a/mcs/class/corlib/Test/System.Security/SecurityElementTest.cs +++ b/mcs/class/corlib/Test/System.Security/SecurityElementTest.cs @@ -601,15 +601,11 @@ namespace MonoTests.System.Security { SecurityElement se = new SecurityElement ("Multiple"); se.AddAttribute ("Attribute1", "One"); se.AddAttribute ("Attribute2", "Two"); -#if NET_2_0 + string expected = String.Format ("<Multiple Attribute1=\"One\"{0}Attribute2=\"Two\"/>{0}", Environment.NewLine); -#else - string expected = String.Format ("<Multiple Attribute1=\"One\"{0} Attribute2=\"Two\"/>{0}", Environment.NewLine); -#endif Assert.AreEqual (expected, se.ToString (), "ToString()"); } -#if NET_2_0 [Test] public void Copy () { @@ -735,7 +731,6 @@ namespace MonoTests.System.Security { Assert.AreEqual ("Suds&Soda&", se.Text, "#5"); Assert.IsNull (se.Children, "#6"); } -#endif [Test] // bug #333699 (ugh, mostly a dup) public void TestToString () @@ -749,17 +744,11 @@ namespace MonoTests.System.Security { Assert.AreEqual ("<'Suds' & \"Soda\">!", infoValue.Text, "#2"); Assert.IsNull (values.Text, "#3"); -#if NET_2_0 Assert.AreEqual (String.Format ("<values>{0}<value name=\"string\"><'Suds' & "Soda">!</value>{0}</values>{0}", Environment.NewLine), values.ToString (), "#4"); -#else - Assert.AreEqual (String.Format ("<values>{0} <value name=\"string\"><'Suds' & "Soda">!</value>{0}</values>{0}", Environment.NewLine), values.ToString (), "#4"); -#endif -#if NET_2_0 SecurityElement sec = SecurityElement.FromString (values.ToString ()); Assert.AreEqual (1, sec.Children.Count, "#5"); Assert.AreEqual ("<'Suds' & \"Soda\">!", ((SecurityElement) sec.Children [0]).Text, "#6"); -#endif } } } diff --git a/mcs/class/corlib/Test/System.Security/SecurityExceptionCas.cs b/mcs/class/corlib/Test/System.Security/SecurityExceptionCas.cs index 1721b1c8974..c97abfc2f57 100644 --- a/mcs/class/corlib/Test/System.Security/SecurityExceptionCas.cs +++ b/mcs/class/corlib/Test/System.Security/SecurityExceptionCas.cs @@ -53,7 +53,6 @@ namespace MonoCasTests.System.Security { } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void GetAction () @@ -187,7 +186,6 @@ namespace MonoCasTests.System.Security { { se.FirstPermissionThatFailed = null; } -#endif [Test] [SecurityPermission (SecurityAction.PermitOnly, ControlEvidence = true, ControlPolicy = true)] public void GetGrantedSet_Pass () @@ -210,7 +208,6 @@ namespace MonoCasTests.System.Security { { string s = se.GrantedSet; } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void SetGrantedSet () @@ -247,7 +244,6 @@ namespace MonoCasTests.System.Security { { se.Method = null; } -#endif [Test] [SecurityPermission (SecurityAction.PermitOnly, ControlEvidence = true, ControlPolicy = true)] public void GetPermissionState_Pass () @@ -270,7 +266,6 @@ namespace MonoCasTests.System.Security { { string s = se.PermissionState; } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void SetPermissionState () @@ -307,7 +302,6 @@ namespace MonoCasTests.System.Security { { se.PermitOnlySetInstance = null; } -#endif [Test] [SecurityPermission (SecurityAction.PermitOnly, ControlEvidence = true, ControlPolicy = true)] public void GetRefusedSet_Pass () @@ -330,7 +324,6 @@ namespace MonoCasTests.System.Security { { string s = se.RefusedSet; } -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void SetRefusedSet () @@ -381,7 +374,6 @@ namespace MonoCasTests.System.Security { { se.Zone = SecurityZone.Untrusted; } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void ToString_Empty () diff --git a/mcs/class/corlib/Test/System.Security/SecurityManagerCas.cs b/mcs/class/corlib/Test/System.Security/SecurityManagerCas.cs index ef2d1520d21..911813826a4 100644 --- a/mcs/class/corlib/Test/System.Security/SecurityManagerCas.cs +++ b/mcs/class/corlib/Test/System.Security/SecurityManagerCas.cs @@ -72,11 +72,7 @@ namespace MonoCasTests.System.Security { [Test] [SecurityPermission (SecurityAction.Deny, ControlPolicy = true)] -#if NET_2_0 // it seems that this was removed in 2.0 - maybe because you can't turn CAS off ?!? -#else - [ExpectedException (typeof (SecurityException))] -#endif public void SecurityEnabled_DenyControlPolicy () { SecurityManager.SecurityEnabled = false; @@ -93,7 +89,6 @@ namespace MonoCasTests.System.Security { // the Deny shows that IsGranted only checks for assembly // granted set (and not the stack modifiers) -#if NET_2_0 [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void IsGranted_GacIdentityPermission () @@ -101,17 +96,12 @@ namespace MonoCasTests.System.Security { GacIdentityPermission gip = new GacIdentityPermission (); Assert.IsTrue (SecurityManager.IsGranted (gip)); } -#endif [Test] [PermissionSet (SecurityAction.Deny, Unrestricted = true)] public void IsGranted_ZoneIdentityPermission () { ZoneIdentityPermission zip = new ZoneIdentityPermission (SecurityZone.Internet); -#if NET_2_0 Assert.IsTrue (SecurityManager.IsGranted (zip)); -#else - Assert.IsFalse (SecurityManager.IsGranted (zip)); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Security/SecurityStateTest.cs b/mcs/class/corlib/Test/System.Security/SecurityStateTest.cs index 7c399c86a07..7744e7ccb7c 100644 --- a/mcs/class/corlib/Test/System.Security/SecurityStateTest.cs +++ b/mcs/class/corlib/Test/System.Security/SecurityStateTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Security; @@ -54,5 +53,4 @@ namespace MonoTests.System.Security { } } -#endif diff --git a/mcs/class/corlib/Test/System.Security/SecurityTransparentAttributeTest.cs b/mcs/class/corlib/Test/System.Security/SecurityTransparentAttributeTest.cs index 7a7e5143d4c..6dc2837aa9e 100644 --- a/mcs/class/corlib/Test/System.Security/SecurityTransparentAttributeTest.cs +++ b/mcs/class/corlib/Test/System.Security/SecurityTransparentAttributeTest.cs @@ -27,7 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -54,4 +53,3 @@ namespace MonoTests.System.Security { } } -#endif diff --git a/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs b/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs index 3cbd99e6115..4745e09b1e8 100644 --- a/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs +++ b/mcs/class/corlib/Test/System.Text/ASCIIEncodingTest.cs @@ -181,11 +181,7 @@ namespace MonoTests.System.Text Encoding encoding = Encoding.ASCII; byte [] bytes = new byte [] {0x61, 0xE1, 0xE2}; string s = encoding.GetString (bytes, 0, 3); -#if NET_2_0 Assert.AreEqual ("a??", s); -#else - Assert.AreEqual ("aab", s); -#endif } [Test] // Test Decoder diff --git a/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackBufferTest.cs b/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackBufferTest.cs index 2a597ae1a22..03735bf97ce 100644 --- a/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackBufferTest.cs +++ b/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackBufferTest.cs @@ -7,7 +7,6 @@ // Copyright (C) 2005 Novell, Inc. http://www.novell.com // -#if NET_2_0 using System; using System.IO; @@ -112,5 +111,4 @@ namespace MonoTests.System.Text } } -#endif diff --git a/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackTest.cs b/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackTest.cs index f09ba287f97..551843876fd 100644 --- a/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackTest.cs +++ b/mcs/class/corlib/Test/System.Text/DecoderReplacementFallbackTest.cs @@ -7,7 +7,6 @@ // Copyright (C) 2005 Novell, Inc. http://www.novell.com // -#if NET_2_0 using System; using System.IO; @@ -103,5 +102,4 @@ namespace MonoTests.System.Text } } -#endif diff --git a/mcs/class/corlib/Test/System.Text/DecoderTest.cs b/mcs/class/corlib/Test/System.Text/DecoderTest.cs index e48566f5403..63112d995be 100644 --- a/mcs/class/corlib/Test/System.Text/DecoderTest.cs +++ b/mcs/class/corlib/Test/System.Text/DecoderTest.cs @@ -15,7 +15,6 @@ namespace MonoTests.System.Text [TestFixture] public class DecoderTest { -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentNullException))] public void ConvertNullChars () @@ -127,7 +126,6 @@ namespace MonoTests.System.Text throw new NotSupportedException (); } } -#endif [Test] public void Bug10789 () diff --git a/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackBufferTest.cs b/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackBufferTest.cs index 5cf509377c6..8325482b555 100644 --- a/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackBufferTest.cs +++ b/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackBufferTest.cs @@ -9,7 +9,6 @@ // Copyright 2011 Xamarin Inc (http://www.xamarin.com). // -#if NET_2_0 using System; using System.IO; @@ -97,5 +96,4 @@ namespace MonoTests.System.Text } } -#endif diff --git a/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackTest.cs b/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackTest.cs index c03edc4d0b2..36f69d0fc88 100644 --- a/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackTest.cs +++ b/mcs/class/corlib/Test/System.Text/EncoderReplacementFallbackTest.cs @@ -7,7 +7,6 @@ // Copyright (C) 2005 Novell, Inc. http://www.novell.com // -#if NET_2_0 using System; using System.IO; @@ -111,5 +110,4 @@ namespace MonoTests.System.Text } } -#endif diff --git a/mcs/class/corlib/Test/System.Text/EncoderTest.cs b/mcs/class/corlib/Test/System.Text/EncoderTest.cs index 4273efc3d3a..9295b99d50f 100644 --- a/mcs/class/corlib/Test/System.Text/EncoderTest.cs +++ b/mcs/class/corlib/Test/System.Text/EncoderTest.cs @@ -15,7 +15,6 @@ namespace MonoTests.System.Text [TestFixture] public class EncoderTest { -#if NET_2_0 [Test] [ExpectedException (typeof (ArgumentNullException))] public void ConvertNullChars () @@ -143,6 +142,5 @@ namespace MonoTests.System.Text throw new NotSupportedException (); } } -#endif } } diff --git a/mcs/class/corlib/Test/System.Text/UTF32EncodingTest.cs b/mcs/class/corlib/Test/System.Text/UTF32EncodingTest.cs index bce49a5e7db..6cb02f57f1e 100644 --- a/mcs/class/corlib/Test/System.Text/UTF32EncodingTest.cs +++ b/mcs/class/corlib/Test/System.Text/UTF32EncodingTest.cs @@ -1,4 +1,3 @@ -#if NET_2_0 using System; using System.Text; @@ -277,4 +276,3 @@ namespace MonoTests.System.Text } } } -#endif diff --git a/mcs/class/corlib/Test/System.Text/UTF7EncodingTest.cs b/mcs/class/corlib/Test/System.Text/UTF7EncodingTest.cs index a115bc209f9..3b112fc57db 100644 --- a/mcs/class/corlib/Test/System.Text/UTF7EncodingTest.cs +++ b/mcs/class/corlib/Test/System.Text/UTF7EncodingTest.cs @@ -260,17 +260,11 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void TestMaxByteCount() { UTF7Encoding UTF7enc = new UTF7Encoding (); -#if NET_2_0 Assert.AreEqual (152, UTF7enc.GetMaxByteCount(50), "UTF #1"); -#else - Assert.AreEqual (136, UTF7enc.GetMaxByteCount(50), "UTF #1"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs index 8943ab6b099..54460afd4e3 100644 --- a/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs +++ b/mcs/class/corlib/Test/System.Text/UTF8EncodingTest.cs @@ -14,11 +14,7 @@ using System; using System.IO; using System.Text; -#if NET_2_0 using DecoderException = System.Text.DecoderFallbackException; -#else -using DecoderException = System.ArgumentException; -#endif using AssertType = NUnit.Framework.Assert; @@ -164,19 +160,12 @@ namespace MonoTests.System.Text UTF8Encoding u = new UTF8Encoding (true, false); byte[] data = new byte [] { 0xC0, 0xAF }; -#if NET_2_0 Assert.AreEqual (2, u.GetCharCount (data), "#A0"); string s = u.GetString (data); Assert.AreEqual ("\uFFFD\uFFFD", s, "#A1"); -#else - Assert.AreEqual (0, u.GetCharCount (data), "#A0"); - string s = u.GetString (data); - Assert.AreEqual (String.Empty, s, "#A1"); -#endif data = new byte [] { 0x30, 0x31, 0xC0, 0xAF, 0x30, 0x32 }; s = u.GetString (data); -#if NET_2_0 Assert.AreEqual (6, s.Length, "#B1"); Assert.AreEqual (0x30, (int) s [0], "#B2"); Assert.AreEqual (0x31, (int) s [1], "#B3"); @@ -184,13 +173,6 @@ namespace MonoTests.System.Text Assert.AreEqual (0xFFFD, (int) s [3], "#B5"); Assert.AreEqual (0x30, (int) s [4], "#B6"); Assert.AreEqual (0x32, (int) s [5], "#B7"); -#else - Assert.AreEqual (4, s.Length, "#B1"); - Assert.AreEqual (0x30, (int) s [0], "#B2"); - Assert.AreEqual (0x31, (int) s [1], "#B3"); - Assert.AreEqual (0x30, (int) s [2], "#B4"); - Assert.AreEqual (0x32, (int) s [3], "#B5"); -#endif } // UTF8 decoding tests from http://www.cl.cam.ac.uk/~mgk25/ @@ -758,13 +740,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_1_UTF16Surrogates_511 () { byte[] data = { 0xED, 0xA0, 0x80 }; @@ -774,13 +750,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_1_UTF16Surrogates_512 () { byte[] data = { 0xED, 0xAD, 0xBF }; @@ -790,13 +760,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_1_UTF16Surrogates_513 () { byte[] data = { 0xED, 0xAE, 0x80 }; @@ -806,13 +770,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_1_UTF16Surrogates_514 () { byte[] data = { 0xED, 0xAF, 0xBF }; @@ -822,13 +780,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_1_UTF16Surrogates_515 () { byte[] data = { 0xED, 0xB0, 0x80 }; @@ -838,13 +790,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_1_UTF16Surrogates_516 () { byte[] data = { 0xED, 0xBE, 0x80 }; @@ -854,13 +800,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_1_UTF16Surrogates_517 () { byte[] data = { 0xED, 0xBF, 0xBF }; @@ -870,13 +810,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_521 () { byte[] data = { 0xED, 0xA0, 0x80, 0xED, 0xB0, 0x80 }; @@ -887,13 +821,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_522 () { byte[] data = { 0xED, 0xA0, 0x80, 0xED, 0xBF, 0xBF }; @@ -904,13 +832,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_523 () { byte[] data = { 0xED, 0xAD, 0xBF, 0xED, 0xB0, 0x80 }; @@ -921,13 +843,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_524 () { byte[] data = { 0xED, 0xAD, 0xBF, 0xED, 0xBF, 0xBF }; @@ -938,13 +854,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_525 () { byte[] data = { 0xED, 0xAE, 0x80, 0xED, 0xB0, 0x80 }; @@ -955,13 +865,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_526 () { byte[] data = { 0xED, 0xAE, 0x80, 0xED, 0xBF, 0x8F }; @@ -972,13 +876,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_527 () { byte[] data = { 0xED, 0xAF, 0xBF, 0xED, 0xB0, 0x80 }; @@ -989,13 +887,7 @@ namespace MonoTests.System.Text } [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else -// MS Fx 1.1 accept this - [Category ("NotDotNet")] - [ExpectedException (typeof (DecoderException))] -#endif public void T5_IllegalCodePosition_2_PairedUTF16Surrogates_528 () { byte[] data = { 0xED, 0xAF, 0xBF, 0xED, 0xBF, 0xBF }; @@ -1045,7 +937,6 @@ namespace MonoTests.System.Text Assert.AreEqual ('A', chars [1], "#2"); } -#if NET_2_0 [Test] public void CloneNotReadOnly () { @@ -1054,15 +945,9 @@ namespace MonoTests.System.Text Assert.AreEqual (false, e.IsReadOnly); e.EncoderFallback = new EncoderExceptionFallback (); } -#endif [Test] -#if NET_2_0 [ExpectedException (typeof (DecoderFallbackException))] -#else - [ExpectedException (typeof (ArgumentException))] - [Category ("NotDotNet")] // MS Bug -#endif public void Bug77315 () { new UTF8Encoding (false, true).GetString ( @@ -1079,22 +964,14 @@ namespace MonoTests.System.Text e.GetBytes (chars, 0, 1, bytes, 0, false); try { int ret = e.GetBytes (chars, 1, 0, bytes, 0, true); -#if NET_2_0 Assert.AreEqual (0, ret, "drop insufficient char in 2.0: char[]"); -#else - Assert.Fail ("ArgumentException is expected: char[]"); -#endif } catch (ArgumentException) { } string s = "\uD800"; try { int ret = Encoding.UTF8.GetBytes (s, 0, 1, bytes, 0); -#if NET_2_0 Assert.AreEqual (0, ret, "drop insufficient char in 2.0: string"); -#else - Assert.Fail ("ArgumentException is expected: string"); -#endif } catch (ArgumentException) { } } @@ -1127,7 +1004,6 @@ namespace MonoTests.System.Text } } -#if NET_2_0 [Test] // bug #77550 public void DecoderFallbackSimple () { @@ -1165,7 +1041,6 @@ namespace MonoTests.System.Text Encoding.UTF8.GetString(buf); } } -#endif [Test] [ExpectedException (typeof (ArgumentException))] diff --git a/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs b/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs index df0a77631c4..8a3ad3b76ab 100644 --- a/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs +++ b/mcs/class/corlib/Test/System.Threading/AutoResetEventTest.cs @@ -12,9 +12,7 @@ using NUnit.Framework; using System; using System.Threading; -#if NET_2_0 using Microsoft.Win32.SafeHandles; -#endif namespace MonoTests.System.Threading { @@ -32,7 +30,6 @@ namespace MonoTests.System.Threading Assert.IsFalse (evt.WaitOne (1000, false), "#3"); } -#if NET_2_0 [Test] // bug #81529 public void SafeWaitHandle () { @@ -115,6 +112,5 @@ namespace MonoTests.System.Threading are1.Close (); swh1.Dispose (); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Threading/CompressedStackCas.cs b/mcs/class/corlib/Test/System.Threading/CompressedStackCas.cs index fe8900516aa..4833b16e097 100644 --- a/mcs/class/corlib/Test/System.Threading/CompressedStackCas.cs +++ b/mcs/class/corlib/Test/System.Threading/CompressedStackCas.cs @@ -28,7 +28,6 @@ // Note: the class existed in 1.1 but the only thing we know about it is that // it has a finalizer ;-) -#if NET_2_0 using System; using System.Security; @@ -106,4 +105,3 @@ namespace MonoCasTests.System.Threading { } } -#endif diff --git a/mcs/class/corlib/Test/System.Threading/EventWaitHandleTest.cs b/mcs/class/corlib/Test/System.Threading/EventWaitHandleTest.cs index c7f62c2b728..c0e50b9cb89 100644 --- a/mcs/class/corlib/Test/System.Threading/EventWaitHandleTest.cs +++ b/mcs/class/corlib/Test/System.Threading/EventWaitHandleTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Threading; @@ -47,5 +46,4 @@ namespace MonoTests.System.Threading { } } -#endif diff --git a/mcs/class/corlib/Test/System.Threading/ExecutionContextCas.cs b/mcs/class/corlib/Test/System.Threading/ExecutionContextCas.cs index da0fb6c3868..f4ecfb5d46f 100644 --- a/mcs/class/corlib/Test/System.Threading/ExecutionContextCas.cs +++ b/mcs/class/corlib/Test/System.Threading/ExecutionContextCas.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Security; @@ -169,4 +168,3 @@ namespace MonoCasTests.System.Threading { } } -#endif diff --git a/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs b/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs index 2fa3d91a04f..2d5c3697eed 100644 --- a/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ExecutionContextTest.cs @@ -27,7 +27,6 @@ // using System.Runtime.Remoting.Messaging; -#if NET_2_0 using System; using System.Security; @@ -292,4 +291,3 @@ namespace MonoTests.System.Threading { } } -#endif diff --git a/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs b/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs index 5d68a7d0e2a..ac4d7d66479 100644 --- a/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs +++ b/mcs/class/corlib/Test/System.Threading/InterlockedTest.cs @@ -66,7 +66,6 @@ namespace MonoTests.System.Threading Assert.AreEqual(obj_2, obj); } -#if NET_2_0 [Test] public void TestExchange_Int64 () { @@ -90,7 +89,6 @@ namespace MonoTests.System.Threading Assert.AreEqual(iptr_1, Interlocked.Exchange(ref iptr, iptr_2)); Assert.AreEqual(iptr_2, iptr); } -#endif [Test] public void TestCompareExchange_Int32 () @@ -116,7 +114,6 @@ namespace MonoTests.System.Threading Assert.AreEqual(obj_2, obj); } -#if NET_2_0 [Test] public void TestCompareExchange_Int64 () { @@ -140,7 +137,6 @@ namespace MonoTests.System.Threading Assert.AreEqual(iptr_1, Interlocked.CompareExchange(ref iptr, iptr_2, iptr_1)); Assert.AreEqual(iptr_2, iptr); } -#endif [Test] public void TestCompareExchange_Failed_Int32 () @@ -166,7 +162,6 @@ namespace MonoTests.System.Threading Assert.AreEqual(obj_1, obj); } -#if NET_2_0 [Test] public void TestCompareExchange_Failed_Int64 () { @@ -190,7 +185,6 @@ namespace MonoTests.System.Threading Assert.AreEqual(iptr_1, Interlocked.CompareExchange(ref iptr, iptr_2, iptr_3)); Assert.AreEqual(iptr_1, iptr); } -#endif [Test] public void TestIncrement_Int32 () @@ -224,7 +218,6 @@ namespace MonoTests.System.Threading Assert.AreEqual(int64_1 - 1, int64); } -#if NET_2_0 [Test] public void TestAdd_Int32 () { @@ -275,6 +268,5 @@ namespace MonoTests.System.Threading Assert.AreSame (b, Interlocked.Exchange<object> (ref b, a), "non-null,null"); Assert.AreSame (b, Interlocked.Exchange<object> (ref b, b), "non-null,non-null"); } -#endif } } diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs index 67bcd941d45..9bfc1c131ea 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs @@ -260,38 +260,29 @@ namespace MonoTests.System.Threading C1Test test1 = new C1Test (); Thread tA = new Thread (new ThreadStart (test1.TestMethod)); int hA1 = tA.GetHashCode (); -#if NET_2_0 Assert.IsTrue (hA1 > 0, "#A1"); -#endif tA.Start (); int hA2 = tA.GetHashCode (); Assert.AreEqual (hA1, hA2, "#A2"); tA.Join (); int hA3 = tA.GetHashCode (); Assert.AreEqual (hA1, hA3, "#A3"); -#if NET_2_0 Assert.AreEqual (hA1, tA.ManagedThreadId, "#A4"); -#endif test1 = new C1Test (); Thread tB = new Thread (new ThreadStart (test1.TestMethod)); int hB1 = tB.GetHashCode (); -#if NET_2_0 Assert.IsTrue (hB1 > 0, "#B1"); -#endif tB.Start (); int hB2 = tB.GetHashCode (); Assert.AreEqual (hB1, hB2, "#B2"); tB.Join (); int hB3 = tB.GetHashCode (); Assert.AreEqual (hB1, hB3, "#B3"); -#if NET_2_0 Assert.AreEqual (hB1, tB.ManagedThreadId, "#B4"); -#endif Assert.IsFalse (hA2 == hB2, "#B5"); } -#if NET_2_0 [Test] // bug #82700 public void ManagedThreadId () { @@ -316,7 +307,6 @@ namespace MonoTests.System.Threading Assert.AreEqual (mtB2, mtB3, "#B2"); Assert.IsFalse (mtB1 == mtA1, "#B3"); } -#endif [Test] [Category ("NotDotNet")] // it hangs. @@ -365,11 +355,7 @@ namespace MonoTests.System.Threading Assert.AreEqual (ApartmentState.Unknown, TestThread.ApartmentState, "#1"); TestThread.Start(); TestUtil.WaitForAlive (TestThread, "wait5"); -#if NET_2_0 Assert.AreEqual (ApartmentState.MTA, TestThread.ApartmentState, "#2"); -#else - Assert.AreEqual (ApartmentState.Unknown, TestThread.ApartmentState, "#3"); -#endif TestThread.Abort(); } @@ -1137,11 +1123,7 @@ namespace MonoTests.System.Threading exception_occured = true; } Assert.AreEqual (ApartmentState.Unknown, t3.ApartmentState, "Thread3 Set Invalid"); -#if NET_2_0 Assert.IsFalse (exception_occured, "Thread3 Set Invalid Exception Occured"); -#else - Assert.IsTrue (exception_occured, "Thread3 Set Invalid Exception Occured"); -#endif t1.Start (); exception_occured = false; diff --git a/mcs/class/corlib/Test/System.Threading/WaitHandleTest.cs b/mcs/class/corlib/Test/System.Threading/WaitHandleTest.cs index 0e515c2b7cf..5f8056e67ce 100644 --- a/mcs/class/corlib/Test/System.Threading/WaitHandleTest.cs +++ b/mcs/class/corlib/Test/System.Threading/WaitHandleTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Threading; @@ -399,5 +398,4 @@ namespace MonoTests.System.Threading { } } -#endif diff --git a/mcs/class/corlib/Test/System/AppDomainTest.cs b/mcs/class/corlib/Test/System/AppDomainTest.cs index 0836640057e..a9eb1d3c5c0 100644 --- a/mcs/class/corlib/Test/System/AppDomainTest.cs +++ b/mcs/class/corlib/Test/System/AppDomainTest.cs @@ -338,7 +338,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly2"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -354,13 +353,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - AppDomain.CurrentDomain.Evidence); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, Evidence) @@ -456,7 +448,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly3"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -472,13 +463,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - Path.GetTempPath ()); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, String) @@ -574,7 +558,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly4"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -591,14 +574,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - Path.GetTempPath (), - AppDomain.CurrentDomain.Evidence); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, String, Evidence) @@ -698,7 +673,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly5"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -716,15 +690,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - (PermissionSet) null, - (PermissionSet) null, - (PermissionSet) null); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, PermissionSet, PermissionSet, PermissionSet) @@ -828,7 +793,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly6"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -847,16 +811,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - AppDomain.CurrentDomain.Evidence, - (PermissionSet) null, - (PermissionSet) null, - (PermissionSet) null); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, Evidence, PermissionSet, PermissionSet, PermissionSet) @@ -964,7 +918,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly7"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -983,16 +936,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - Path.GetTempPath (), - (PermissionSet) null, - (PermissionSet) null, - (PermissionSet) null); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, String, PermissionSet, PermissionSet, PermissionSet) @@ -1100,7 +1043,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly8"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -1120,17 +1062,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - Path.GetTempPath (), - AppDomain.CurrentDomain.Evidence, - (PermissionSet) null, - (PermissionSet) null, - (PermissionSet) null); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet) @@ -1242,7 +1173,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly9"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -1263,18 +1193,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - Path.GetTempPath (), - AppDomain.CurrentDomain.Evidence, - (PermissionSet) null, - (PermissionSet) null, - (PermissionSet) null, - true); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet, Boolean) @@ -1384,14 +1302,12 @@ namespace MonoTests.System } } -#if NET_2_0 [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet, Boolean, IEnumerable<CustomAttributeBuilder>) public void DefineDynamicAssembly10_Access_Invalid () { AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly10"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -1413,19 +1329,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - Path.GetTempPath (), - AppDomain.CurrentDomain.Evidence, - (PermissionSet) null, - (PermissionSet) null, - (PermissionSet) null, - true, - new List<CustomAttributeBuilder> ()); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet, Boolean, IEnumerable<CustomAttributeBuilder>) @@ -1711,7 +1614,6 @@ namespace MonoTests.System AssemblyName name = new AssemblyName (); name.Name = "DefineDynamicAssembly11"; -#if NET_2_0 try { AppDomain.CurrentDomain.DefineDynamicAssembly ( name, AssemblyBuilderAccess.Run | @@ -1727,13 +1629,6 @@ namespace MonoTests.System Assert.IsNotNull (ex.ParamName, "#6"); Assert.AreEqual ("access", ex.ParamName, "#7"); } -#else - AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly ( - name, AssemblyBuilderAccess.Run | - (AssemblyBuilderAccess) 666, - new List<CustomAttributeBuilder> ()); - Assert.IsNotNull (ab, "#1"); -#endif } [Test] // DefineDynamicAssembly (AssemblyName name, AssemblyBuilderAccess, IEnumerable<CustomAttributeBuilder>) @@ -1888,7 +1783,6 @@ namespace MonoTests.System Assert.IsTrue (ex.Message.IndexOf (typeof (object).Assembly.FullName) != -1, "#5"); } } -#endif [Test] public void SetThreadPrincipal () @@ -2624,62 +2518,30 @@ namespace MonoTests.System aname = new AssemblyName (); aname.Name = "bug79522A"; aname.CodeBase = assemblyFile; -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#A3"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522A"; aname.CodeBase = assemblyFile; aname.Version = new Version (2, 5); -#if NET_2_0 // the version number is not considered when comparing the manifest // of the assembly found using codebase AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#A4"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522A"; aname.CodeBase = assemblyFile; aname.Version = new Version (2, 4, 1); -#if NET_2_0 // the version number is not considered when comparing the manifest // of the assembly found using codebase AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#A5"); - } catch (FileLoadException) { - } -#endif // if version is set, then culture must also be set aname = new AssemblyName (); aname.Name = "bug79522A"; aname.CodeBase = assemblyFile; aname.Version = new Version (2, 4); -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#A6"); - } catch (FileLoadException) { - } -#endif // version number does not need to be set aname = new AssemblyName (); @@ -2771,49 +2633,23 @@ namespace MonoTests.System aname = new AssemblyName (); aname.Name = "bug79522B"; aname.CodeBase = assemblyFile; -#if NET_2_0 // the version number is not considered when comparing the manifest // of the assembly found using codebase AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#B3"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522B"; aname.CodeBase = assemblyFile; aname.Version = new Version (5, 5); -#if NET_2_0 // the version number is not considered when comparing the manifest // of the assembly found using codebase AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#B3"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522B"; aname.CodeBase = assemblyFile; aname.Version = new Version (2, 4, 1); -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - // when the loaded assembly has a specific culture, then that - // culture must be set if you set the Version on the aname - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#B4"); - } catch (FileLoadException) { - } -#endif // version does not need to be set aname = new AssemblyName (); @@ -2898,15 +2734,7 @@ namespace MonoTests.System aname = new AssemblyName (); aname.Name = "bug79522C"; aname.CodeBase = assemblyFile; -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#C3"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522C"; @@ -2922,64 +2750,27 @@ namespace MonoTests.System aname.Name = "bug79522C"; aname.CodeBase = assemblyFile; aname.Version = new Version (2, 4); -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - // when the loaded assembly has a specific culture/publickey, - // then that culture/publickey must be set if you set the - // Version on the aname - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#C4"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522C"; aname.CodeBase = assemblyFile; aname.CultureInfo = new CultureInfo ("nl-BE"); aname.Version = new Version (2, 4); -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - // if loaded assembly is signed, then the public key must be set - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#C5"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522C"; aname.CodeBase = assemblyFile; aname.CultureInfo = new CultureInfo ("nl-BE"); aname.SetPublicKey (publicKey); -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - // if public key is set, then version must be set - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#C6"); - } catch (FileLoadException) { - } -#endif aname = new AssemblyName (); aname.Name = "bug79522C"; aname.CodeBase = assemblyFile; aname.CultureInfo = new CultureInfo ("nl-BE"); -#if NET_2_0 AppDomain.CurrentDomain.Load (aname); -#else - try { - AppDomain.CurrentDomain.Load (aname); - Assert.Fail ("#C7"); - } catch (FileLoadException) { - } -#endif // if culture and version are set, then the version must match aname = new AssemblyName (); @@ -3123,7 +2914,6 @@ namespace MonoTests.System AppDomain.CurrentDomain.SetData (null, "data"); } -#if NET_2_0 [Test] public void ApplyPolicy () { @@ -3238,7 +3028,6 @@ namespace MonoTests.System { return Assembly.ReflectionOnlyLoad(args.Name); } -#endif public class StuffToPick diff --git a/mcs/class/corlib/Test/System/ApplicationIdTest.cs b/mcs/class/corlib/Test/System/ApplicationIdTest.cs index 857ec081b8e..8e0a939241e 100644 --- a/mcs/class/corlib/Test/System/ApplicationIdTest.cs +++ b/mcs/class/corlib/Test/System/ApplicationIdTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -162,4 +161,3 @@ namespace MonoTests.System { } } -#endif
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System/ApplicationIdentityTest.cs b/mcs/class/corlib/Test/System/ApplicationIdentityTest.cs index 486a0a9bcb3..2b687a89d8a 100644 --- a/mcs/class/corlib/Test/System/ApplicationIdentityTest.cs +++ b/mcs/class/corlib/Test/System/ApplicationIdentityTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using NUnit.Framework; using System; @@ -63,4 +62,3 @@ namespace MonoTests.System { } } -#endif
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System/ArraySortArgChecks.cs b/mcs/class/corlib/Test/System/ArraySortArgChecks.cs index 48451bff259..fcb55d4de09 100644 --- a/mcs/class/corlib/Test/System/ArraySortArgChecks.cs +++ b/mcs/class/corlib/Test/System/ArraySortArgChecks.cs @@ -29,9 +29,7 @@ using NUnit.Framework; using System; using System.Collections; -#if NET_2_0 using System.Collections.Generic; -#endif namespace MonoTests.System { @@ -87,7 +85,6 @@ namespace MonoTests.System { Assert.Fail ("#8"); } catch (ArgumentNullException) {} -#if NET_2_0 try { Array.Sort<object> (null); Assert.Fail ("#9"); @@ -132,7 +129,6 @@ namespace MonoTests.System { Array.Sort<object> (null, new Comparison<object>(ObjComparison)); Assert.Fail ("#17"); } catch (ArgumentNullException) {} -#endif } public static int ObjComparison (object o1, object o2) { @@ -164,7 +160,6 @@ namespace MonoTests.System { Assert.Fail ("#4"); } catch (ArgumentException) {} -#if NET_2_0 try { Array.Sort<object> (arr, 1, 5); Assert.Fail ("#5"); @@ -184,7 +179,6 @@ namespace MonoTests.System { Array.Sort<object, object> (arr, null, 1, 5, null); Assert.Fail ("#8"); } catch (ArgumentException) {} -#endif } [Test] @@ -230,7 +224,6 @@ namespace MonoTests.System { Assert.Fail ("#4"); } catch (ArgumentOutOfRangeException) {} -#if NET_2_0 try { Array.Sort<object> (arr, -1, 1); Assert.Fail ("#5"); @@ -270,7 +263,6 @@ namespace MonoTests.System { Array.Sort<object, object> (arr, null, 0, -1, null); Assert.Fail ("#8"); } catch (ArgumentOutOfRangeException) {} -#endif } [Test] @@ -362,7 +354,6 @@ namespace MonoTests.System { Assert.Fail ("#8"); } catch (InvalidOperationException) {} -#if NET_2_0 try { Array.Sort<object> (arr); Assert.Fail ("#9"); @@ -402,7 +393,6 @@ namespace MonoTests.System { Array.Sort<object, object> (arr, null, 0, 3, null); Assert.Fail ("#16"); } catch (InvalidOperationException) {} -#endif } } } diff --git a/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs b/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs index 0c3cadf6755..f3efb921733 100644 --- a/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs +++ b/mcs/class/corlib/Test/System/BadImageFormatExceptionTest.cs @@ -41,9 +41,7 @@ namespace MonoTests.System { BadImageFormatException bif = new BadImageFormatException (); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNull (bif.InnerException, "#3"); Assert.IsNotNull (bif.Message, "#4"); // Format of the executable (.exe) or library (.dll) is invalid @@ -56,9 +54,7 @@ namespace MonoTests.System { BadImageFormatException bif = new BadImageFormatException ("message"); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNull (bif.InnerException, "#3"); Assert.IsNotNull (bif.Message, "#4"); @@ -73,9 +69,7 @@ namespace MonoTests.System { BadImageFormatException bif = new BadImageFormatException (string.Empty); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNull (bif.InnerException, "#3"); Assert.IsNotNull (bif.Message, "#4"); @@ -90,25 +84,14 @@ namespace MonoTests.System { BadImageFormatException bif = new BadImageFormatException ((string) null); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNull (bif.InnerException, "#3"); -#if NET_2_0 Assert.IsNotNull (bif.Message, "#4"); // Could not load file or assembly '' ... Assert.IsTrue (bif.Message.IndexOf ("''") != -1, "#5"); -#else - Assert.IsNotNull (bif.Message, "#4"); // Format of the executable (.exe) or library ... - Assert.IsFalse (bif.Message.IndexOf ("''") != -1, "#5"); -#endif Assert.IsNull (bif.FusionLog, "#5"); Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName), "#6"); -#if NET_2_0 Assert.IsTrue (bif.ToString ().IndexOf ("''") != -1, "#7"); -#else - Assert.IsFalse (bif.ToString ().IndexOf ("''") != -1, "#7"); -#endif } [Test] @@ -118,9 +101,7 @@ namespace MonoTests.System BadImageFormatException bif = new BadImageFormatException ("message", ame); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNotNull (bif.InnerException, "#3"); Assert.AreSame (ame, bif.InnerException, "#4"); @@ -137,9 +118,7 @@ namespace MonoTests.System ArithmeticException ame = new ArithmeticException ("something"); BadImageFormatException bif = new BadImageFormatException (string.Empty, ame); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNotNull (bif.InnerException, "#3"); Assert.AreSame (ame, bif.InnerException, "#4"); @@ -156,19 +135,12 @@ namespace MonoTests.System ArithmeticException ame = new ArithmeticException ("something"); BadImageFormatException bif = new BadImageFormatException ((string) null, ame); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNotNull (bif.InnerException, "#3"); Assert.AreSame (ame, bif.InnerException, "#4"); -#if NET_2_0 Assert.IsNotNull (bif.Message, "#5"); // Could not load file or assembly '' ... Assert.IsTrue (bif.Message.IndexOf ("''") != -1, "#6"); -#else - Assert.IsNotNull (bif.Message, "#5"); // Format of the executable (.exe) or library ... - Assert.IsFalse (bif.Message.IndexOf ("''") != -1, "#6"); -#endif Assert.IsNull (bif.FusionLog, "#7"); Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName), "#8"); Assert.IsTrue (bif.ToString ().IndexOf ("---> " + ame.GetType ().FullName) != -1, "#9"); @@ -181,9 +153,7 @@ namespace MonoTests.System BadImageFormatException bif = new BadImageFormatException ("message", (Exception) null); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNull (bif.InnerException, "#3"); Assert.IsNotNull (bif.Message, "#4"); @@ -199,9 +169,7 @@ namespace MonoTests.System BadImageFormatException bif = new BadImageFormatException ("message", "file.txt"); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNotNull (bif.FileName, "#2"); Assert.AreEqual ("file.txt", bif.FileName, "#3"); Assert.IsNull (bif.InnerException, "#4"); @@ -210,13 +178,8 @@ namespace MonoTests.System Assert.IsNull (bif.FusionLog, "#7"); Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName + ": message" + Environment.NewLine), "#8"); -#if NET_2_0 Assert.IsTrue (bif.ToString ().IndexOf ("'file.txt'") != -1, "#9"); Assert.IsFalse (bif.ToString ().IndexOf ("\"file.txt\"") != -1, "#9"); -#else - Assert.IsFalse (bif.ToString ().IndexOf ("'file.txt'") != -1, "#9"); - Assert.IsTrue (bif.ToString ().IndexOf ("\"file.txt\"") != -1, "#10"); -#endif } [Test] @@ -225,9 +188,7 @@ namespace MonoTests.System BadImageFormatException bif = new BadImageFormatException ("message", string.Empty); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNotNull (bif.FileName, "#2"); Assert.AreEqual (string.Empty, bif.FileName, "#3"); Assert.IsNull (bif.InnerException, "#4"); @@ -244,9 +205,7 @@ namespace MonoTests.System BadImageFormatException bif = new BadImageFormatException ("message", (string) null); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#A1"); -#endif Assert.IsNull (bif.FileName, "#A2"); Assert.IsNull (bif.InnerException, "#A3"); Assert.IsNotNull (bif.Message, "#A4"); @@ -257,9 +216,7 @@ namespace MonoTests.System bif = new BadImageFormatException (string.Empty, (string) null); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#B1"); -#endif Assert.IsNull (bif.FileName, "#B2"); Assert.IsNull (bif.InnerException, "#B3"); Assert.IsNotNull (bif.Message, "#B4"); @@ -275,9 +232,7 @@ namespace MonoTests.System BadImageFormatException bif = new BadImageFormatException (string.Empty, string.Empty); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNotNull (bif.FileName, "#2"); Assert.AreEqual (string.Empty, bif.FileName, "#3"); Assert.IsNull (bif.InnerException, "#4"); @@ -293,18 +248,11 @@ namespace MonoTests.System BadImageFormatException bif = new BadImageFormatException ((string) null, (string) null); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNull (bif.FileName, "#2"); Assert.IsNull (bif.InnerException, "#3"); -#if NET_2_0 Assert.IsNotNull (bif.Message, "#4"); // Could not load file or assembly '' ... Assert.IsTrue (bif.Message.IndexOf ("''") != -1, "#5"); -#else - Assert.IsNotNull (bif.Message, "#4"); // Format of the executable (.exe) or library ... - Assert.IsFalse (bif.Message.IndexOf ("''") != -1, "#5"); -#endif Assert.IsNull (bif.FusionLog, "#5"); Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName + ": "), "#6"); @@ -318,9 +266,7 @@ namespace MonoTests.System bif = new BadImageFormatException (string.Empty, "file.txt"); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#1"); -#endif Assert.IsNotNull (bif.FileName, "#2"); Assert.AreEqual ("file.txt", bif.FileName, "#3"); Assert.IsNull (bif.InnerException, "#4"); @@ -329,13 +275,8 @@ namespace MonoTests.System Assert.IsNull (bif.FusionLog, "#7"); Assert.IsTrue (bif.ToString ().StartsWith (bif.GetType ().FullName + ": " + Environment.NewLine), "#8"); -#if NET_2_0 Assert.IsTrue (bif.ToString ().IndexOf ("'file.txt'") != -1, "#9"); Assert.IsFalse (bif.ToString ().IndexOf ("\"file.txt\"") != -1, "#10"); -#else - Assert.IsFalse (bif.ToString ().IndexOf ("'file.txt'") != -1, "#9"); - Assert.IsTrue (bif.ToString ().IndexOf ("\"file.txt\"") != -1, "#10"); -#endif } [Test] @@ -345,9 +286,7 @@ namespace MonoTests.System bif = new BadImageFormatException ((string) null, "file.txt"); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#A1"); -#endif Assert.IsNotNull (bif.FileName, "#A2"); Assert.AreEqual ("file.txt", bif.FileName, "#A3"); Assert.IsNull (bif.InnerException, "#A4"); @@ -360,9 +299,7 @@ namespace MonoTests.System bif = new BadImageFormatException ((string) null, string.Empty); -#if NET_2_0 Assert.IsNotNull (bif.Data, "#B1"); -#endif Assert.IsNotNull (bif.FileName, "#B2"); Assert.AreEqual (string.Empty, bif.FileName, "#B3"); Assert.IsNull (bif.InnerException, "#B4"); diff --git a/mcs/class/corlib/Test/System/BitConverterTest.cs b/mcs/class/corlib/Test/System/BitConverterTest.cs index dfabba0ae75..75775d3aa76 100644 --- a/mcs/class/corlib/Test/System/BitConverterTest.cs +++ b/mcs/class/corlib/Test/System/BitConverterTest.cs @@ -82,11 +82,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -154,11 +150,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -188,9 +180,7 @@ namespace MonoTests.System Assert.IsNull (ex.InnerException, "#B3"); Assert.IsNotNull (ex.Message, "#B4"); Assert.IsNotNull (ex.ParamName, "#B5"); -#if NET_2_0 Assert.AreEqual ("startIndex", ex.ParamName, "#B6"); -#endif } } @@ -276,11 +266,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -346,11 +332,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -415,11 +397,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -485,11 +463,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -554,11 +528,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -624,11 +594,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -693,11 +659,7 @@ namespace MonoTests.System 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"); -#else - Assert.AreEqual ("byteArray", ex.ParamName, "#6"); -#endif } } @@ -752,21 +714,7 @@ namespace MonoTests.System public void ToString_Value_Empty () { byte [] empty = new byte [0]; -#if NET_2_0 Assert.AreEqual (String.Empty, BitConverter.ToString (empty), "#A1"); -#else - try { - BitConverter.ToString (empty); - Assert.Fail ("#A1"); - } catch (ArgumentOutOfRangeException ex) { - // StartIndex cannot be less than zero - Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#A2"); - Assert.IsNull (ex.InnerException, "#A3"); - Assert.IsNotNull (ex.Message, "#A4"); - Assert.IsNotNull (ex.ParamName, "#A5"); - Assert.AreEqual ("startIndex", ex.ParamName, "#A6"); - } -#endif try { BitConverter.ToString (empty, 3); @@ -780,21 +728,7 @@ namespace MonoTests.System Assert.AreEqual ("startIndex", ex.ParamName, "#B6"); } -#if NET_2_0 Assert.AreEqual (String.Empty, BitConverter.ToString (empty, 0), "#C1"); -#else - try { - BitConverter.ToString (empty, 0); - Assert.Fail ("#C1"); - } catch (ArgumentOutOfRangeException ex) { - // StartIndex cannot be less than zero - Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#C2"); - Assert.IsNull (ex.InnerException, "#C3"); - Assert.IsNotNull (ex.Message, "#C4"); - Assert.IsNotNull (ex.ParamName, "#C5"); - Assert.AreEqual ("startIndex", ex.ParamName, "#C6"); - } -#endif try { BitConverter.ToString (empty, 3, 0); @@ -808,21 +742,7 @@ namespace MonoTests.System Assert.AreEqual ("startIndex", ex.ParamName, "#D6"); } -#if NET_2_0 Assert.AreEqual (string.Empty, BitConverter.ToString (empty, 0, 0), "#E1"); -#else - try { - BitConverter.ToString (empty, 0, 0); - Assert.Fail ("#E1"); - } catch (ArgumentOutOfRangeException ex) { - // StartIndex cannot be less than zero - Assert.AreEqual (typeof (ArgumentOutOfRangeException), ex.GetType (), "#E2"); - Assert.IsNull (ex.InnerException, "#E3"); - Assert.IsNotNull (ex.Message, "#E4"); - Assert.IsNotNull (ex.ParamName, "#E5"); - Assert.AreEqual ("startIndex", ex.ParamName, "#E6"); - } -#endif try { BitConverter.ToString (empty, 3, -1); diff --git a/mcs/class/corlib/Test/System/ConvertTest.cs b/mcs/class/corlib/Test/System/ConvertTest.cs index 8aee8a9cc65..feb4cf69e56 100644 --- a/mcs/class/corlib/Test/System/ConvertTest.cs +++ b/mcs/class/corlib/Test/System/ConvertTest.cs @@ -786,11 +786,7 @@ namespace MonoTests.System { Assert.Fail (); } catch (Exception e) { -#if NET_2_0 Assert.AreEqual (typeof(FormatException), e.GetType(), "#G28"); -#else - Assert.AreEqual (typeof(ArgumentOutOfRangeException), e.GetType(), "#G28"); -#endif } try { diff --git a/mcs/class/corlib/Test/System/DecimalTest2.cs b/mcs/class/corlib/Test/System/DecimalTest2.cs index aa39bad8991..02eacf31cdf 100644 --- a/mcs/class/corlib/Test/System/DecimalTest2.cs +++ b/mcs/class/corlib/Test/System/DecimalTest2.cs @@ -338,16 +338,8 @@ namespace MonoTests.System // very small difference 0.00000000000000001 between Mono and MS
if ((i == 21) && (j == 3))
continue;
-#if NET_2_0
ReportOpError ("Div: result mismatch", i, j, d1, d2, d3, tr.val);
errOp++;
-#else
- // Mono is more precise than MS 1.x - but match 2.0 results!
- if ((n != 184) && (n != 214)) {
- ReportOpError ("Div: result mismatch", i, j, d1, d2, d3, tr.val);
- errOp++;
- }
-#endif
}
}
}
@@ -2431,11 +2423,7 @@ namespace MonoTests.System new TestResult(0, 79228162514264337593543950335m), // 6 / 1
new TestResult(0, -79228162514264337593543950335m), // 6 / 2
new TestResult(4, 39614081257132168796771975168m), // 6 / 3
-#if NET_2_0
new TestResult(4, 7922816251426433759354395033.5m), // 6 / 4
-#else
- new TestResult(4, 7922816251426433759354395034m), // 6 / 4
-#endif
new TestResult(1, 0m), // 6 / 5
new TestResult(0, 1m), // 6 / 6
new TestResult(0, -1m), // 6 / 7
@@ -2465,11 +2453,7 @@ namespace MonoTests.System new TestResult(0, -79228162514264337593543950335m), // 7 / 1
new TestResult(0, 79228162514264337593543950335m), // 7 / 2
new TestResult(4, -39614081257132168796771975168m), // 7 / 3
-#if NET_2_0
new TestResult(4, -7922816251426433759354395033.5m), // 7 / 4
-#else
- new TestResult(4, -7922816251426433759354395034m), // 7 / 4
-#endif
new TestResult(1, 0m), // 7 / 5
new TestResult(0, -1m), // 7 / 6
new TestResult(0, 1m), // 7 / 7
diff --git a/mcs/class/corlib/Test/System/DelegateTest.cs b/mcs/class/corlib/Test/System/DelegateTest.cs index 8d9c622262e..843f48ca330 100644 --- a/mcs/class/corlib/Test/System/DelegateTest.cs +++ b/mcs/class/corlib/Test/System/DelegateTest.cs @@ -17,7 +17,6 @@ namespace MonoTests.System [TestFixture] public class DelegateTest { -#if NET_2_0 public class GenericClass<T> { public void Method<K> (T t, K k) {} @@ -51,7 +50,6 @@ namespace MonoTests.System Assert.IsNotNull (method, "#1"); Assert.AreEqual (target, method, "#2"); } -#endif [Test] // CreateDelegate (Type, MethodInfo) public void CreateDelegate1_Method_Static () @@ -73,25 +71,11 @@ namespace MonoTests.System { C c = new C (); MethodInfo mi = typeof (C).GetMethod ("M"); -#if NET_2_0 Delegate dg = Delegate.CreateDelegate (typeof (D), mi); Assert.AreSame (mi, dg.Method, "#1"); Assert.IsNull (dg.Target, "#2"); D d = (D) dg; d (c); -#else - try { - Delegate.CreateDelegate (typeof (D), mi); - Assert.Fail ("#1"); - } catch (ArgumentException ex) { - // Method must be a static method - Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#2"); - Assert.IsNull (ex.InnerException, "#3"); - Assert.IsNotNull (ex.Message, "#4"); - Assert.IsNotNull (ex.ParamName, "#5"); - Assert.AreEqual ("method", ex.ParamName, "#6"); - } -#endif } [Test] // CreateDelegate (Type, MethodInfo) @@ -584,7 +568,6 @@ namespace MonoTests.System } } -#if NET_2_0 [Test] // CreateDelegate (Type, Object, String, Boolean, Boolean) public void CreateDelegate9 () { @@ -1177,7 +1160,6 @@ namespace MonoTests.System throw new NotSupportedException (); } -#endif public static void CreateDelegateOfStaticMethodBoundToNull_Helper (object[] args) {} [Test] diff --git a/mcs/class/corlib/Test/System/EnumTest.cs b/mcs/class/corlib/Test/System/EnumTest.cs index b8dc9ee05ac..05701a875c5 100644 --- a/mcs/class/corlib/Test/System/EnumTest.cs +++ b/mcs/class/corlib/Test/System/EnumTest.cs @@ -635,11 +635,7 @@ namespace MonoTests.System Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#G2"); Assert.IsNull (ex.InnerException, "#G3"); Assert.IsNotNull (ex.Message, "#G4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("'huh?'") != -1, "#G5"); -#else - Assert.IsTrue (ex.Message.IndexOf ("huh?") != -1, "#G5"); -#endif Assert.IsNull (ex.ParamName, "#G6"); } @@ -653,11 +649,7 @@ namespace MonoTests.System Assert.AreEqual (typeof (ArgumentException), ex.GetType (), "#H2"); Assert.IsNull (ex.InnerException, "#H3"); Assert.IsNotNull (ex.Message, "#H4"); -#if NET_2_0 Assert.IsTrue (ex.Message.IndexOf ("'test'") != -1, "#H5"); -#else - Assert.IsTrue (ex.Message.IndexOf ("test") != -1, "#H5"); -#endif Assert.IsNull (ex.ParamName, "#H6"); } diff --git a/mcs/class/corlib/Test/System/EnvironmentTest.cs b/mcs/class/corlib/Test/System/EnvironmentTest.cs index 9a9f65a5e53..deb0e3314b6 100644 --- a/mcs/class/corlib/Test/System/EnvironmentTest.cs +++ b/mcs/class/corlib/Test/System/EnvironmentTest.cs @@ -138,7 +138,7 @@ namespace MonoTests.System Assert.IsFalse (d.IsSynchronized, "IsSynchronized"); } -#if NET_2_0 && !NET_2_1 +#if !NET_2_1 [Test] // bug #333740 public void GetEnvironmentVariables_NewlySet () { @@ -161,7 +161,7 @@ namespace MonoTests.System Assert.IsNotNull (args [0], "application"); } -#if NET_2_0 && !NET_2_1 +#if !NET_2_1 [Test] [ExpectedException (typeof (ArgumentException))] public void GetEnvironmentVariable_Target_Invalid () diff --git a/mcs/class/corlib/Test/System/ExceptionTest.cs b/mcs/class/corlib/Test/System/ExceptionTest.cs index 8e0d299dd2e..36f37e9c66b 100644 --- a/mcs/class/corlib/Test/System/ExceptionTest.cs +++ b/mcs/class/corlib/Test/System/ExceptionTest.cs @@ -50,11 +50,9 @@ namespace MonoTests.System Assert.AreEqual ("URL", ex.HelpLink, "#A3");
Assert.AreEqual (10, ex.HResult, "#A4");
Assert.AreEqual ("SRC", ex.Source, "#A5");
-#if NET_2_0
Assert.IsNotNull (ex.Data, "#A6");
Assert.AreEqual (1, ex.Data.Keys.Count, "#A7");
Assert.AreEqual ("ZZ", ex.Data ["XX"], "#A8");
-#endif
inner = null;
si = new SerializationInfo (typeof (Exception),
@@ -77,10 +75,8 @@ namespace MonoTests.System Assert.AreEqual ("URL", ex.HelpLink, "#B4");
Assert.AreEqual (10, ex.HResult, "#B5");
Assert.AreEqual ("SRC", ex.Source, "#B6");
-#if NET_2_0
Assert.IsNotNull (ex.Data, "#B7");
Assert.AreEqual (0, ex.Data.Keys.Count, "#B8");
-#endif
}
@@ -277,15 +273,9 @@ namespace MonoTests.System si = new SerializationInfo (typeof (Exception),
new FormatterConverter ());
se.GetObjectData (si, new StreamingContext ());
-#if NET_2_0
Assert.AreEqual (11, si.MemberCount, "#A1");
-#else
- Assert.AreEqual (10, si.MemberCount, "#A1");
-#endif
Assert.AreEqual (typeof (Exception).FullName, si.GetString ("ClassName"), "#A2");
-#if NET_2_0
Assert.IsNull (si.GetValue ("Data", typeof (IDictionary)), "#A3");
-#endif
Assert.AreSame (msg, si.GetString ("Message"), "#A4");
Assert.AreSame (inner, si.GetValue ("InnerException", typeof (Exception)), "#A5");
Assert.AreSame (se.HelpLink, si.GetString ("HelpURL"), "#A6");
@@ -297,24 +287,16 @@ namespace MonoTests.System Assert.IsNull (si.GetString ("ExceptionMethod"), "#A12");
// attempt initialization of lazy init members
-#if NET_2_0
Assert.IsNotNull (se.Data);
-#endif
Assert.IsNull (se.Source);
Assert.IsNull (se.StackTrace);
si = new SerializationInfo (typeof (Exception),
new FormatterConverter ());
se.GetObjectData (si, new StreamingContext ());
-#if NET_2_0
Assert.AreEqual (11, si.MemberCount, "#B1");
-#else
- Assert.AreEqual (10, si.MemberCount, "#B1");
-#endif
Assert.AreEqual (typeof (Exception).FullName, si.GetString ("ClassName"), "#B2");
-#if NET_2_0
Assert.AreSame (se.Data, si.GetValue ("Data", typeof (IDictionary)), "#B3");
-#endif
Assert.AreSame (msg, si.GetString ("Message"), "#B4");
Assert.AreSame (inner, si.GetValue ("InnerException", typeof (Exception)), "#B5");
Assert.AreSame (se.HelpLink, si.GetString ("HelpURL"), "#B6");
@@ -331,15 +313,9 @@ namespace MonoTests.System si = new SerializationInfo (typeof (Exception),
new FormatterConverter ());
ex.GetObjectData (si, new StreamingContext ());
-#if NET_2_0
Assert.AreEqual (11, si.MemberCount, "#C1");
-#else
- Assert.AreEqual (10, si.MemberCount, "#C1");
-#endif
Assert.AreEqual (typeof (Exception).FullName, si.GetString ("ClassName"), "#C2");
-#if NET_2_0
Assert.IsNull (si.GetValue ("Data", typeof (IDictionary)), "#C3");
-#endif
Assert.AreSame (msg, si.GetString ("Message"), "#C4");
Assert.AreSame (inner, si.GetValue ("InnerException", typeof (Exception)), "#C5");
Assert.AreSame (se.HelpLink, si.GetString ("HelpURL"), "#C6");
@@ -355,23 +331,15 @@ namespace MonoTests.System throw new Exception (msg, inner);
} catch (Exception ex) {
// force initialization of lazy init members
-#if NET_2_0
Assert.IsNotNull (ex.Data);
-#endif
Assert.IsNotNull (ex.StackTrace);
si = new SerializationInfo (typeof (Exception),
new FormatterConverter ());
ex.GetObjectData (si, new StreamingContext ());
-#if NET_2_0
Assert.AreEqual (11, si.MemberCount, "#D1");
-#else
- Assert.AreEqual (10, si.MemberCount, "#D1");
-#endif
Assert.AreEqual (typeof (Exception).FullName, si.GetString ("ClassName"), "#D2");
-#if NET_2_0
Assert.AreSame (ex.Data, si.GetValue ("Data", typeof (IDictionary)), "#D3");
-#endif
Assert.AreSame (msg, si.GetString ("Message"), "#D4");
Assert.AreSame (inner, si.GetValue ("InnerException", typeof (Exception)), "#D5");
Assert.AreSame (ex.HelpLink, si.GetString ("HelpURL"), "#D6");
diff --git a/mcs/class/corlib/Test/System/IntPtrTest.cs b/mcs/class/corlib/Test/System/IntPtrTest.cs index 52bf681160e..e1597c198fc 100644 --- a/mcs/class/corlib/Test/System/IntPtrTest.cs +++ b/mcs/class/corlib/Test/System/IntPtrTest.cs @@ -52,13 +52,11 @@ namespace MonoTests.System { } } -#if NET_2_0 [Test] public void ToStringWithFormat () { Assert.AreEqual ("0", IntPtr.Zero.ToString ("x"), "#1"); Assert.AreEqual ("3b9aca00", new IntPtr (1000000000).ToString ("x"), "#2"); } -#endif } }
\ No newline at end of file diff --git a/mcs/class/corlib/Test/System/IntegerTryParse.cs b/mcs/class/corlib/Test/System/IntegerTryParse.cs index d575bb800ac..26197643546 100644 --- a/mcs/class/corlib/Test/System/IntegerTryParse.cs +++ b/mcs/class/corlib/Test/System/IntegerTryParse.cs @@ -1,4 +1,3 @@ -#if NET_2_0 using System; using NUnit.Framework; @@ -64,4 +63,3 @@ public class IntegerTryParse { } } } -#endif diff --git a/mcs/class/corlib/Test/System/MathTest.cs b/mcs/class/corlib/Test/System/MathTest.cs index ad6cfb839eb..04e33a90f7c 100644 --- a/mcs/class/corlib/Test/System/MathTest.cs +++ b/mcs/class/corlib/Test/System/MathTest.cs @@ -373,7 +373,6 @@ namespace MonoTests.System } } -#if NET_2_0 [Test] public void TestDecimalCeiling() { @@ -384,7 +383,6 @@ namespace MonoTests.System Assert.IsTrue (Decimal.MaxValue == Math.Ceiling(Decimal.MaxValue), "#2"); Assert.IsTrue (Decimal.MinValue == Math.Ceiling(Decimal.MinValue), "#3"); } -#endif [Test] public void TestFloor () @@ -828,7 +826,6 @@ namespace MonoTests.System Assert.IsTrue (Double.MinValue == Math.Round (Double.MinValue), "#4"); } -#if NET_2_0 [Test] public void TestDoubleTruncate () { @@ -866,7 +863,6 @@ namespace MonoTests.System Assert.IsTrue (Decimal.MaxValue == Math.Truncate (Decimal.MaxValue), "#6"); Assert.IsTrue (Decimal.MinValue == Math.Truncate (Decimal.MinValue), "#7"); } -#endif [Test] public void TestDoubleRound2 () @@ -879,7 +875,6 @@ namespace MonoTests.System Assert.AreEqual (-0.1, Math.Round (-0.123456789, 1), "#3"); } -#if NET_2_0 [Test] public void TestDoubleRound3 () { @@ -975,7 +970,6 @@ namespace MonoTests.System Assert.AreEqual (1, Math.Round (0.5, 0, MidpointRounding.AwayFromZero)); } -#endif [Test] public void TestDecimalSign () diff --git a/mcs/class/corlib/Test/System/ModuleHandleTest.cs b/mcs/class/corlib/Test/System/ModuleHandleTest.cs index 823b2dd059b..e1426d04740 100644 --- a/mcs/class/corlib/Test/System/ModuleHandleTest.cs +++ b/mcs/class/corlib/Test/System/ModuleHandleTest.cs @@ -12,7 +12,6 @@ // - dynamic assemblies // -#if NET_2_0 using System; using System.Threading; @@ -181,4 +180,3 @@ public class ModuleHandleTest } } -#endif diff --git a/mcs/class/corlib/Test/System/ObjectTest.cs b/mcs/class/corlib/Test/System/ObjectTest.cs index 669645279c7..4dd5a480fe6 100644 --- a/mcs/class/corlib/Test/System/ObjectTest.cs +++ b/mcs/class/corlib/Test/System/ObjectTest.cs @@ -109,7 +109,6 @@ public class ObjectTest Object y = new Object(); Assert.AreEqual(x.ToString(), y.ToString(), "All Objects should have same string rep"); } -#if NET_2_0 class Foo<T> {} [Test] @@ -119,6 +118,5 @@ public class ObjectTest Assert.AreEqual ("MonoTests.System.ObjectTest+Foo`1[System.Object]", foo.ToString (), "Bad ToString of generic instance"); } -#endif } } diff --git a/mcs/class/corlib/Test/System/RuntimeMethodHandleTest.cs b/mcs/class/corlib/Test/System/RuntimeMethodHandleTest.cs index c7e3b7105e5..37c6b2447c2 100644 --- a/mcs/class/corlib/Test/System/RuntimeMethodHandleTest.cs +++ b/mcs/class/corlib/Test/System/RuntimeMethodHandleTest.cs @@ -74,7 +74,6 @@ namespace MonoTests.System Assert.IsFalse (rmhB1.Equals (rmhA1), "#6"); } -#if NET_2_0 #pragma warning disable 1718 [Test] public void Operators () @@ -102,7 +101,6 @@ namespace MonoTests.System Assert.IsTrue (rmhB1 != rmhA1, "#B6"); } #pragma warning restore 1718 -#endif [Test] [ExpectedException (typeof (SerializationException))] diff --git a/mcs/class/corlib/Test/System/RuntimeTypeHandleTest.cs b/mcs/class/corlib/Test/System/RuntimeTypeHandleTest.cs index 0405b752619..9102ca4159c 100644 --- a/mcs/class/corlib/Test/System/RuntimeTypeHandleTest.cs +++ b/mcs/class/corlib/Test/System/RuntimeTypeHandleTest.cs @@ -46,7 +46,6 @@ namespace MonoTests.System new BinaryFormatter ().Serialize (Stream.Null, handle); } -#if NET_2_0 [Test] [ExpectedException (typeof (InvalidOperationException))] [Category ("NotDotNet")] // it crashes the runtime on MS.NET @@ -55,6 +54,5 @@ namespace MonoTests.System RuntimeTypeHandle handle = new RuntimeTypeHandle (); handle.GetModuleHandle (); } -#endif } } diff --git a/mcs/class/corlib/Test/System/SingleTest.cs b/mcs/class/corlib/Test/System/SingleTest.cs index 512c8e96df9..bf3beb47200 100644 --- a/mcs/class/corlib/Test/System/SingleTest.cs +++ b/mcs/class/corlib/Test/System/SingleTest.cs @@ -169,7 +169,6 @@ namespace MonoTests.System Assert.AreEqual (float.PositiveInfinity, float.Parse (posInf, NumberStyles.Float, CultureInfo.CurrentCulture), "+Inf#5"); } -#if NET_2_0 [Test] // bug #72221 [ExpectedException (typeof (ArgumentException))] public void HexNumber_WithHexToParse () @@ -185,6 +184,5 @@ namespace MonoTests.System float f; Single.TryParse ("0", NumberStyles.HexNumber, null, out f); } -#endif } } diff --git a/mcs/class/corlib/Test/System/StringComparerTest.cs b/mcs/class/corlib/Test/System/StringComparerTest.cs index 585082a0f93..ce028bc12af 100644 --- a/mcs/class/corlib/Test/System/StringComparerTest.cs +++ b/mcs/class/corlib/Test/System/StringComparerTest.cs @@ -26,7 +26,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if NET_2_0 using System; using System.Globalization; @@ -321,4 +320,3 @@ namespace MonoTests.System } } -#endif diff --git a/mcs/class/corlib/Test/System/TimeSpanTest.cs b/mcs/class/corlib/Test/System/TimeSpanTest.cs index 2d9e0984996..8b5705081d1 100644 --- a/mcs/class/corlib/Test/System/TimeSpanTest.cs +++ b/mcs/class/corlib/Test/System/TimeSpanTest.cs @@ -56,10 +56,8 @@ public class TimeSpanTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] [Category ("NotWorking")] -#endif public void TemporaryOverflow () { // calculating part of this results in overflow (days) @@ -75,10 +73,8 @@ public class TimeSpanTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] [Category ("NotWorking")] -#endif public void NoOverflowInHoursMinsSecondsMS () { TimeSpan ts = new TimeSpan (0, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue, Int32.MaxValue); @@ -123,10 +119,8 @@ public class TimeSpanTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] [Category ("NotWorking")] -#endif public void MaxHours () { // LAMESPEC: the highest hours are "special" @@ -148,10 +142,8 @@ public class TimeSpanTest { } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] [Category ("NotWorking")] -#endif public void MaxHours_BreakPoint () { TimeSpan ts = new TimeSpan (0, Int32.MaxValue - 596523, 0, 0, 0); @@ -182,12 +174,9 @@ public class TimeSpanTest { } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void MinHours () { -#if NET_2_0 TimeSpan ts = new TimeSpan (0, -256204778, 0, 0, 0); Assert.AreEqual (-10675199, ts.Days, "Days"); Assert.AreEqual (-2, ts.Hours, "Hours"); @@ -195,31 +184,11 @@ public class TimeSpanTest { Assert.AreEqual (0, ts.Seconds, "Seconds"); Assert.AreEqual (0, ts.Milliseconds, "Milliseconds"); Assert.AreEqual (-9223372008000000000, ts.Ticks, "Ticks"); -#else - // LAMESPEC: the lowest hours are "special" - TimeSpan ts = new TimeSpan (0, Int32.MinValue, 0, 0, 0); - Assert.AreEqual (0, ts.Days, "Min-Days"); - Assert.AreEqual (0, ts.Hours, "Min-Hours"); - Assert.AreEqual (0, ts.Minutes, "Min-Minutes"); - Assert.AreEqual (0, ts.Seconds, "Min-Seconds"); - Assert.AreEqual (0, ts.Milliseconds, "Min-Milliseconds"); - Assert.AreEqual (0, ts.Ticks, "Min-Ticks"); - - ts = new TimeSpan (0, -2146887125, 0, 0, 0); - Assert.AreEqual (24855, ts.Days, "Days"); - Assert.AreEqual (3, ts.Hours, "Hours"); - Assert.AreEqual (0, ts.Minutes, "Minutes"); - Assert.AreEqual (0, ts.Seconds, "Seconds"); - Assert.AreEqual (0, ts.Milliseconds, "Milliseconds"); - Assert.AreEqual (21474828000000000, ts.Ticks, "Ticks"); -#endif } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] [Category ("NotWorking")] -#endif public void MinHours_BreakPoint () { TimeSpan ts = new TimeSpan (0, -2146887124, 0, 0, 0); @@ -250,13 +219,10 @@ public class TimeSpanTest { } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void MaxMinutes () { TimeSpan ts; -#if NET_2_0 ts = new TimeSpan (0, 0, 256204778, 0, 0); Assert.AreEqual (177919, ts.Days, "Max-Days"); Assert.AreEqual (23, ts.Hours, "Max-Hours"); @@ -264,31 +230,11 @@ public class TimeSpanTest { Assert.AreEqual (0, ts.Seconds, "Max-Seconds"); Assert.AreEqual (0, ts.Milliseconds, "Max-Milliseconds"); Assert.AreEqual (153722866800000000, ts.Ticks, "Max-Ticks"); -#else - // LAMESPEC: the highest minutes are "special" - ts = new TimeSpan (0, 0, Int32.MaxValue, 0, 0); - Assert.AreEqual (0, ts.Days, "Max-Days"); - Assert.AreEqual (0, ts.Hours, "Max-Hours"); - Assert.AreEqual (-1, ts.Minutes, "Max-Minutes"); - Assert.AreEqual (0, ts.Seconds, "Max-Seconds"); - Assert.AreEqual (0, ts.Milliseconds, "Max-Milliseconds"); - Assert.AreEqual (-600000000, ts.Ticks, "Max-Ticks"); - - ts = new TimeSpan (0, 0, Int32.MaxValue - 35791393, 0, 0); - Assert.AreEqual (-24855, ts.Days, "Days"); - Assert.AreEqual (-3, ts.Hours, "Hours"); - Assert.AreEqual (-14, ts.Minutes, "Minutes"); - Assert.AreEqual (0, ts.Seconds, "Seconds"); - Assert.AreEqual (0, ts.Milliseconds, "Milliseconds"); - Assert.AreEqual (-21474836400000000, ts.Ticks, "Ticks"); -#endif } [Test] -#if NET_2_0 [ExpectedException (typeof (ArgumentOutOfRangeException))] [Category ("NotWorking")] -#endif public void MaxMinutes_BreakPoint () { TimeSpan ts = new TimeSpan (0, Int32.MaxValue - 35791394, 0, 0, 0); @@ -319,13 +265,10 @@ public class TimeSpanTest { } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void MinMinutes () { TimeSpan ts; -#if NET_2_0 ts = new TimeSpan (0, 0, Int32.MinValue, 0, 0); Assert.AreEqual (-1491308, ts.Days, "Days"); Assert.AreEqual (-2, ts.Hours, "Hours"); @@ -333,33 +276,12 @@ public class TimeSpanTest { Assert.AreEqual (0, ts.Seconds, "Seconds"); Assert.AreEqual (0, ts.Milliseconds, "Milliseconds"); Assert.AreEqual (-1288490188800000000, ts.Ticks, "Ticks"); -#else - // LAMESPEC: the highest minutes are "special" - ts = new TimeSpan (0, 0, Int32.MinValue, 0, 0); - Assert.AreEqual (0, ts.Days, "Min-Days"); - Assert.AreEqual (0, ts.Hours, "Min-Hours"); - Assert.AreEqual (0, ts.Minutes, "Min-Minutes"); - Assert.AreEqual (0, ts.Seconds, "Min-Seconds"); - Assert.AreEqual (0, ts.Milliseconds, "Min-Milliseconds"); - Assert.AreEqual (0, ts.Ticks, "Min-Ticks"); - - ts = new TimeSpan (0, 0, -2111692254, 0, 0); - Assert.AreEqual (24855, ts.Days, "Days"); - Assert.AreEqual (3, ts.Hours, "Hours"); - Assert.AreEqual (14, ts.Minutes, "Minutes"); - Assert.AreEqual (0, ts.Seconds, "Seconds"); - Assert.AreEqual (0, ts.Milliseconds, "Milliseconds"); - Assert.AreEqual (21474836400000000, ts.Ticks, "Ticks"); -#endif } [Test] -#if NET_2_0 [Category ("NotWorking")] -#endif public void MinMinutes_BreakPoint () { -#if NET_2_0 TimeSpan ts = new TimeSpan (0, 0, -2111692253, 0, 0); Assert.AreEqual (-1466452, ts.Days, "Days"); Assert.AreEqual (-22, ts.Hours, "Hours"); @@ -367,15 +289,6 @@ public class TimeSpanTest { Assert.AreEqual (-0, ts.Seconds, "Seconds"); Assert.AreEqual (0, ts.Milliseconds, "Milliseconds"); Assert.AreEqual (-1267015351800000000, ts.Ticks, "Ticks"); -#else - TimeSpan ts = new TimeSpan (0, 0, -2111692253, 0, 0); - Assert.AreEqual (-24855, ts.Days, "Days"); - Assert.AreEqual (-3, ts.Hours, "Hours"); - Assert.AreEqual (-13, ts.Minutes, "Minutes"); - Assert.AreEqual (-16, ts.Seconds, "Seconds"); - Assert.AreEqual (0, ts.Milliseconds, "Milliseconds"); - Assert.AreEqual (-21474835960000000, ts.Ticks, "Ticks"); -#endif } [Test] diff --git a/mcs/class/corlib/Test/System/TimeZoneTest.cs b/mcs/class/corlib/Test/System/TimeZoneTest.cs index 47915f722b4..965d2e078e3 100644 --- a/mcs/class/corlib/Test/System/TimeZoneTest.cs +++ b/mcs/class/corlib/Test/System/TimeZoneTest.cs @@ -192,7 +192,6 @@ public class TimeZoneTest { } static private byte[] serialized_timezone = { -#if NET_2_0 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x54, 0x69, 0x6D, 0x65, 0x5A, 0x6F, 0x6E, 0x65, 0x04, 0x00, 0x00, 0x00, 0x17, 0x6D, 0x5F, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x61, @@ -221,34 +220,6 @@ public class TimeZoneTest { 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x50, 0x23, 0xFA, 0x07, 0x06, 0xC7, 0x88, 0x00, 0xD0, 0xE2, 0xC4, 0x0C, 0xAB, 0xC7, 0x88, 0x00, 0x68, 0xC4, 0x61, 0x08, 0x00, 0x00, 0x00, 0x01, 0x08, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x50, 0x0C, 0x0F, 0xEF, 0xAB, 0xC3, 0x88, 0x00, 0x90, 0xE7, 0xB0, 0x73, 0x4B, 0xC4, 0x88, 0x00, 0x68, 0xC4, 0x61, 0x08, 0x00, 0x00, 0x00, 0x0B -#else - 0x00, 0x01, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, - 0x1C, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x54, - 0x69, 0x6D, 0x65, 0x5A, 0x6F, 0x6E, 0x65, 0x04, 0x00, 0x00, 0x00, 0x17, 0x6D, 0x5F, 0x43, 0x61, 0x63, 0x68, 0x65, 0x64, 0x44, 0x61, - 0x79, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x43, 0x68, 0x61, 0x6E, 0x67, 0x65, 0x73, 0x0D, 0x6D, 0x5F, 0x74, 0x69, 0x63, 0x6B, 0x73, 0x4F, - 0x66, 0x66, 0x73, 0x65, 0x74, 0x0E, 0x6D, 0x5F, 0x73, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x4E, 0x61, 0x6D, 0x65, 0x0E, 0x6D, - 0x5F, 0x64, 0x61, 0x79, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x4E, 0x61, 0x6D, 0x65, 0x03, 0x00, 0x01, 0x01, 0x1C, 0x53, 0x79, 0x73, 0x74, - 0x65, 0x6D, 0x2E, 0x43, 0x6F, 0x6C, 0x6C, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x2E, 0x48, 0x61, 0x73, 0x68, 0x74, 0x61, 0x62, - 0x6C, 0x65, 0x09, 0x09, 0x02, 0x00, 0x00, 0x00, 0x00, 0xF8, 0x29, 0x17, 0xD6, 0xFF, 0xFF, 0xFF, 0x06, 0x03, 0x00, 0x00, 0x00, 0x15, - 0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x0A, - 0x04, 0x02, 0x00, 0x00, 0x00, 0x1C, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x6F, 0x6C, 0x6C, 0x65, 0x63, 0x74, 0x69, 0x6F, - 0x6E, 0x73, 0x2E, 0x48, 0x61, 0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x07, 0x00, 0x00, 0x00, 0x0A, 0x4C, 0x6F, 0x61, 0x64, 0x46, - 0x61, 0x63, 0x74, 0x6F, 0x72, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x08, 0x43, 0x6F, 0x6D, 0x70, 0x61, 0x72, 0x65, 0x72, - 0x10, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6F, 0x64, 0x65, 0x50, 0x72, 0x6F, 0x76, 0x69, 0x64, 0x65, 0x72, 0x08, 0x48, 0x61, 0x73, 0x68, - 0x53, 0x69, 0x7A, 0x65, 0x04, 0x4B, 0x65, 0x79, 0x73, 0x06, 0x56, 0x61, 0x6C, 0x75, 0x65, 0x73, 0x00, 0x00, 0x03, 0x03, 0x00, 0x05, - 0x05, 0x0B, 0x08, 0x1C, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x6F, 0x6C, 0x6C, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, - 0x2E, 0x49, 0x43, 0x6F, 0x6D, 0x70, 0x61, 0x72, 0x65, 0x72, 0x24, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x43, 0x6F, 0x6C, 0x6C, - 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x2E, 0x49, 0x48, 0x61, 0x73, 0x68, 0x43, 0x6F, 0x64, 0x65, 0x50, 0x72, 0x6F, 0x76, 0x69, - 0x64, 0x65, 0x72, 0x08, 0xEC, 0x51, 0x38, 0x3F, 0x02, 0x00, 0x00, 0x00, 0x0A, 0x0A, 0x0B, 0x00, 0x00, 0x00, 0x09, 0x04, 0x00, 0x00, - 0x00, 0x09, 0x05, 0x00, 0x00, 0x00, 0x10, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x08, 0xCC, 0x07, 0x00, 0x00, 0x08, - 0x08, 0xD2, 0x07, 0x00, 0x00, 0x10, 0x05, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x09, 0x06, 0x00, 0x00, 0x00, 0x09, 0x07, 0x00, - 0x00, 0x00, 0x04, 0x06, 0x00, 0x00, 0x00, 0x21, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6D, 0x2E, 0x47, 0x6C, 0x6F, 0x62, 0x61, 0x6C, 0x69, - 0x7A, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x44, 0x61, 0x79, 0x6C, 0x69, 0x67, 0x68, 0x74, 0x54, 0x69, 0x6D, 0x65, 0x03, 0x00, 0x00, - 0x00, 0x07, 0x6D, 0x5F, 0x73, 0x74, 0x61, 0x72, 0x74, 0x05, 0x6D, 0x5F, 0x65, 0x6E, 0x64, 0x07, 0x6D, 0x5F, 0x64, 0x65, 0x6C, 0x74, - 0x61, 0x00, 0x00, 0x00, 0x0D, 0x0D, 0x0C, 0x00, 0x10, 0xFA, 0x0F, 0x3D, 0xF2, 0xBC, 0x08, 0x00, 0x50, 0xD5, 0xB1, 0xC1, 0x91, 0xBD, - 0x08, 0x00, 0x68, 0xC4, 0x61, 0x08, 0x00, 0x00, 0x00, 0x01, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x50, 0x0C, 0x0F, - 0xEF, 0xAB, 0xC3, 0x08, 0x00, 0x90, 0xE7, 0xB0, 0x73, 0x4B, 0xC4, 0x08, 0x00, 0x68, 0xC4, 0x61, 0x08, 0x00, 0x00, 0x00, 0x0B -#endif }; [Test] diff --git a/mcs/class/corlib/Test/System/VersionTest.cs b/mcs/class/corlib/Test/System/VersionTest.cs index e843443d5df..ff7b152e2b5 100644 --- a/mcs/class/corlib/Test/System/VersionTest.cs +++ b/mcs/class/corlib/Test/System/VersionTest.cs @@ -212,7 +212,6 @@ namespace MonoTests.System Version v2 = new Version (1, 2, 3, 4); Assert.AreEqual (v1.GetHashCode (), v2.GetHashCode (), "HashCode"); } -#if NET_2_0 [Test] public void MajorMinorRevisions () { @@ -249,7 +248,6 @@ namespace MonoTests.System Version v1235 = new Version (1, 2, 3, 5); Assert.AreEqual (1, v1235.CompareTo (v1234), "1235-1234"); } -#endif #if NET_4_0 [Test] |