Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -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 ()

View File

@@ -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
}
}

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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]

View File

@@ -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");

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 ()

View File

@@ -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,53 +96,31 @@ namespace MonoTests.System.CodeDom
}
[Test]
#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
#endif
public void Constructor1_NullLabel ()
{
CodeGotoStatement cgs = new CodeGotoStatement ((string) null);
#if ONLY_1_1
Assert.IsNull (cgs.Label, "#1");
#endif
}
[Test]
#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
#endif
public void Constructor1_EmptyLabel () {
CodeGotoStatement cgs = new CodeGotoStatement (string.Empty);
#if ONLY_1_1
Assert.IsNotNull (cgs.Label, "#1");
Assert.AreEqual (string.Empty, cgs.Label, "#2");
#endif
}
[Test]
#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
#endif
public void Label_Null ()
{
CodeGotoStatement cgs = new CodeGotoStatement ("mono");
cgs.Label = null;
#if ONLY_1_1
Assert.IsNull (cgs.Label, "#1");
#endif
}
[Test]
#if NET_2_0
[ExpectedException (typeof (ArgumentNullException))]
#endif
public void Label_Empty () {
CodeGotoStatement cgs = new CodeGotoStatement ("mono");
cgs.Label = string.Empty;
#if ONLY_1_1
Assert.IsNotNull (cgs.Label, "#1");
Assert.AreEqual (string.Empty, cgs.Label, "#2");
#endif
}
}
}

View File

@@ -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");

View File

@@ -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 ()

View File

@@ -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 ()

View File

@@ -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]

View File

@@ -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");

View File

@@ -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");

Some files were not shown because too many files have changed in this diff Show More