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

@ -210,17 +210,6 @@ namespace MonoTests.System.Xml.Serialization
Assert.AreEqual ("System.String", map.TypeFullName, "#A4");
Assert.AreEqual ("String", map.TypeName, "#A5");
#if ONLY_1_1
schemas = ExportType (typeof (char));
importer = new XmlSchemaImporter (schemas);
map = importer.ImportTypeMapping (new XmlQualifiedName ("char", "NSChar"));
Assert.IsNotNull (map, "#B1");
Assert.AreEqual ("char", map.ElementName, "#B2");
Assert.AreEqual ("NSChar", map.Namespace, "#B3");
Assert.AreEqual ("System.Char", map.TypeFullName, "#B4");
Assert.AreEqual ("Char", map.TypeName, "#B5");
#endif
}
[Test]
@ -486,17 +475,6 @@ namespace MonoTests.System.Xml.Serialization
Assert.AreEqual ("System.String", map.TypeFullName, "#A4");
Assert.AreEqual ("String", map.TypeName, "#A5");
#if ONLY_1_1
schemas = ExportType (typeof (Guid));
importer = new XmlSchemaImporter (schemas);
map = importer.ImportTypeMapping (new XmlQualifiedName ("guid", "NSGuid"));
Assert.IsNotNull (map, "#B1");
Assert.AreEqual ("guid", map.ElementName, "#B2");
Assert.AreEqual ("NSGuid", map.Namespace, "#B3");
Assert.AreEqual ("System.Guid", map.TypeFullName, "#B4");
Assert.AreEqual ("Guid", map.TypeName, "#B5");
#endif
}
[Test]
@ -943,7 +921,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 +940,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 +967,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 +1000,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 +1013,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)