diff options
author | Rodrigo Kumpera <kumpera@gmail.com> | 2013-03-01 19:52:03 +0400 |
---|---|---|
committer | Rodrigo Kumpera <kumpera@gmail.com> | 2013-03-01 19:52:03 +0400 |
commit | 93e2d1dc48339be472300910e9290939ee253177 (patch) | |
tree | 34d58191bd013f8177b6010b9c3e11008950120f /mcs/class/System.XML | |
parent | a4c61d97f6378d270bfc453a34c51d0c625fc05d (diff) |
Fix object::GetType when remoting is enabled.
Diffstat (limited to 'mcs/class/System.XML')
13 files changed, 43 insertions, 54 deletions
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 779c8bd1e1e..0e91387a4be 100644 --- a/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Schema/XmlSchemaTests.cs @@ -173,7 +173,6 @@ namespace MonoTests.System.Xml } [Test] - [Category ("MobileNotWorking")] public void TestSimpleMutualImport () { XmlReader r = new XmlTextReader ("Test/XmlFiles/xsd/inter-inc-1.xsd"); diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs index 20b0d5dbaf8..718e62c1fff 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionCollectionTests.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !MOBILE +#if NET_2_0 using System; using System.CodeDom; diff --git a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs index 7311fbb27e8..5b8d9de6dcc 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization.Advanced/SchemaImporterExtensionTests.cs @@ -28,7 +28,7 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !MOBILE +#if NET_2_0 using System; using System.CodeDom; 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..9f0e0191135 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/SoapSchemaExporterTests.cs @@ -7,8 +7,6 @@ // (C) 2005 Novell // -#if !MOBILE - using System; using System.Collections; using System.Globalization; @@ -1161,5 +1159,3 @@ namespace MonoTests.System.XmlSerialization } } } - -#endif
\ No newline at end of file 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..25a1ecf74bf 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlCodeExporterTests.cs @@ -8,8 +8,6 @@ // (C) 2006 Novell // -#if !MOBILE - using System; using System.CodeDom; using System.CodeDom.Compiler; @@ -1306,5 +1304,3 @@ namespace MonoTests.System.XmlSerialization } } } - -#endif 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..f8713258a0f 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaExporterTests.cs @@ -1783,9 +1783,11 @@ namespace MonoTests.System.XmlSerialization [Test] #if NET_2_0 [Category ("NotWorking")] // support for XmlSchemaProvider is not implemented +#else + [Category ("NotWorking")] // mark it NotWorking until fixes have landed in svn #endif public void ExportXmlSerializable_SchemaProvider1 () { - XmlSchemas schemas = Export (typeof (PrimitiveSchemaProvider)); + XmlSchemas schemas = schemas = Export (typeof (PrimitiveSchemaProvider)); Assert.AreEqual (1, schemas.Count, "#1"); StringWriter sw = new StringWriter (); 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..80958667639 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSchemaImporterTests.cs @@ -39,9 +39,8 @@ using System.IO; using System.Xml; using System.Xml.Schema; using System.Xml.Serialization; -#if !MOBILE using Microsoft.CSharp; -#endif + using NUnit.Framework; using MonoTests.System.Xml.TestClasses; @@ -892,8 +891,6 @@ namespace MonoTests.System.Xml.Serialization Assert.AreEqual ("UInt16", map.TypeName, "#6"); } -#if !MOBILE - [Test] public void ImportTypeMapping_EnumSimpleContent () { @@ -1078,6 +1075,30 @@ namespace MonoTests.System.Xml.Serialization return null; } + private static XmlSchemas ExportType (Type type) + { + XmlReflectionImporter ri = new XmlReflectionImporter ("NS" + type.Name); + XmlSchemas schemas = new XmlSchemas (); + XmlSchemaExporter sx = new XmlSchemaExporter (schemas); + XmlTypeMapping tm = ri.ImportTypeMapping (type); + sx.ExportTypeMapping (tm); + return schemas; + } + + private static ArrayList GetXmlQualifiedNames (XmlSchemas schemas) + { + ArrayList qnames = new ArrayList (); + + foreach (XmlSchema schema in schemas) { + if (!schema.IsCompiled) schema.Compile (null); + foreach (XmlSchemaObject ob in schema.Items) + if (ob is XmlSchemaElement) + qnames.Add (((XmlSchemaElement) ob).QualifiedName); + } + + return qnames; + } + [Test] [ExpectedException (typeof (InvalidOperationException))] public void ImportTypeMappingNonExistent () @@ -1217,31 +1238,5 @@ namespace MonoTests.System.Xml.Serialization xss.Add (XmlSchema.Read (new XmlTextReader (new StringReader (xsd)), null)); return new XmlSchemaImporter (xss); } - -#endif - - private static ArrayList GetXmlQualifiedNames (XmlSchemas schemas) - { - ArrayList qnames = new ArrayList (); - - foreach (XmlSchema schema in schemas) { - if (!schema.IsCompiled) schema.Compile (null); - foreach (XmlSchemaObject ob in schema.Items) - if (ob is XmlSchemaElement) - qnames.Add (((XmlSchemaElement) ob).QualifiedName); - } - - return qnames; - } - - private static XmlSchemas ExportType (Type type) - { - XmlReflectionImporter ri = new XmlReflectionImporter ("NS" + type.Name); - XmlSchemas schemas = new XmlSchemas (); - XmlSchemaExporter sx = new XmlSchemaExporter (schemas); - XmlTypeMapping tm = ri.ImportTypeMapping (type); - sx.ExportTypeMapping (tm); - return schemas; - } } } 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 ed63ede99fa..a7f00ab1e24 100644 --- a/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Serialization/XmlSerializerTests.cs @@ -2187,7 +2187,8 @@ namespace MonoTests.System.XmlSerialization ser.Deserialize (new XmlTextReader (xml, XmlNodeType.Document, null)); } -#if !TARGET_JVM && !MOBILE +#if NET_2_0 +#if !TARGET_JVM [Test] public void GenerateSerializerGenerics () { @@ -2265,6 +2266,7 @@ namespace MonoTests.System.XmlSerialization Assert.AreEqual (TestEnumWithNulls.bb, w.nenum.Value); Assert.AreEqual (t, w.ndate.Value); } +#endif [Test] public void SerializeBase64Binary() diff --git a/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs index 657d672e5bc..4df96725fbb 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlDocumentEventTests.cs @@ -18,6 +18,11 @@ namespace MonoTests.System.Xml [TestFixture]
public class XmlDocumentEventTests
{
+ public static void Main ()
+ {
+ new XmlDocumentEventTests ().InsertingOrder ();
+ }
+
private StringBuilder eventLogBuilder = new StringBuilder ();
private XmlDocument GetEventDocument ()
diff --git a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs index 52de90d1414..d8035e4d010 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverCas.cs @@ -27,8 +27,6 @@ // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // -#if !MOBILE - using NUnit.Framework; using System; @@ -84,5 +82,3 @@ namespace MonoCasTests.System.Xml { } } } - -#endif
\ No newline at end of file diff --git a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs index c97407de984..0603a694d42 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlSecureResolverTests.cs @@ -8,8 +8,6 @@ // Copyright (C) 2004-2005 Novell, Inc (http://www.novell.com) // -#if !MOBILE - using System; using System.Collections; using System.IO; @@ -134,4 +132,3 @@ namespace MonoTestsXml } } -#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..17e94fc1567 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlUrlResolverTests.cs @@ -104,17 +104,19 @@ namespace MonoTests.System.Xml #if NET_4_5
[Test]
+ [Category("Async")]
public void TestAsync ()
{
var loc = Assembly.GetExecutingAssembly ().Location;
Uri resolved = resolver.ResolveUri (null, loc);
Assert.AreEqual ("file", resolved.Scheme);
var task = resolver.GetEntityAsync (resolved, null, typeof (Stream));
- Assert.IsTrue (task.Wait (3000));
- Assert.IsTrue (task.Result is Stream);
+ Assert.That (task.Wait (3000));
+ Assert.IsInstanceOfType (typeof (Stream), task.Result);
}
[Test]
+ [Category("Async")]
public void TestAsyncError ()
{
var loc = Assembly.GetExecutingAssembly ().Location;
@@ -127,7 +129,7 @@ namespace MonoTests.System.Xml } catch (Exception ex) {
if (ex is AggregateException)
ex = ((AggregateException) ex).InnerException;
- Assert.IsTrue (ex is XmlException);
+ Assert.IsInstanceOfType (typeof (XmlException), ex);
}
}
#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..6ade78b4461 100644 --- a/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs +++ b/mcs/class/System.XML/Test/System.Xml/XmlWriterSettingsTests.cs @@ -47,7 +47,6 @@ namespace MonoTests.System.Xml } [Test] - [Category ("MobileNotWorking")] public void EncodingTest () { // For Stream it makes sense |