104 Commits
Author SHA1 Message Date
Marek Safar ba51c60b57 [system.xml] Enable more tests 2016-11-10 18:43:14 +01:00
Marek Safar 398675d21a [System.Xml] Enable more tests 2016-10-14 09:10:17 +02:00
Marcos Henrich e58fe58ef1 [System.Xml] Test sub class serialization on lists
Covers #36829
2016-01-11 18:03:43 +00:00
Marek Safar 7215f95d58 [bcl] Mobile profiles fixes 2015-05-20 12:56:36 +02:00
Marek Safar 401a35cd69 [system.xml] Serialization from reference sources for desktop 2015-05-13 18:47:07 +02:00
Atsushi Eno ddca46d22b Revert "[system.xml] Serialization from reference sources for desktop"
This reverts commit 6ae517ea65.
2015-05-12 14:42:19 +08:00
Marek Safar 6ae517ea65 [system.xml] Serialization from reference sources for desktop 2015-05-11 15:37:01 +02:00
Marek Safar 9faaa72407 [system.xml] Update failing test 2015-04-16 00:08:01 +02:00
Dave Curylo bae8fad714 Fix XmlSerializationTest again. 2015-04-02 10:51:31 -04:00
Dave Curylo 389008df93 Corrects error in XmlSerializerTests. 2015-04-02 10:38:33 -04:00
Dave Curylo c58f019266 XmlSerializer should set *non* readonly {V}Specified fields
Addresses an oversight in PR 1257 that caused {V}Specified fields to not be set during XML deserialization in some circumstances.

Adds test for optional value serialization round trip
2015-04-01 21:56:49 -04:00
Alexander Köplinger ee307ef1e5 Fix the build broken in 40ba1978bc 2015-03-10 11:53:17 +01:00
jason_naylor 60ef531176 Fix for the XMLSerializer bug 18558
* Find the type map element that is the most-specific to the
  object in question, not the first type it is an instance of

Change-Id: I1867e790bf9f377ce0ae02871f4561b760e27624
2015-03-04 10:25:37 -06:00
jason_naylor 6b74a2814f Test to reveal defect in XmlSerializer (Bug 18558)
Given the test data in this patch the wrong element name
is used when serializing TestSerializeSecondType

Change-Id: I8aff732dfd22f4f654fb42f2d3b987d7ce58d600
2015-03-04 10:25:12 -06:00
Atsushi Eno 3c4c9e5759 [Sys.Xml] swap xmlns:xsd and xmlns:xsi in serialized xml to remove "regression".
The order of those namespaces are insignificant, and the latest
combination of mono corlib (partly referencesource-d) and sys.xml
(referencesource except for XmlSerializer) caused this implementation
glitch.
2015-03-02 11:36:40 +08:00
Alexander Köplinger 746650d1b9 [bcl] Remove more NET_2_0 checks from class libs 2015-01-17 05:45:39 +01:00
Marcos Henrich 007413298d Test Xml serialization of a property with attribute XmlText.
The tested property has a default value that is not null.
Covers 18908.
2014-09-26 10:31:51 +01:00
Marcos Henrich 8790297c85 Test xml serialization of nullable array items. Covers #19012. 2014-09-15 16:55:31 +01:00
Marcos Henrich 85650c7528 Test serialization wen class has method bool ShouldSerialize<T>().
.NET throws an exception but it should have no effect on the serialization.
2014-09-15 13:02:00 +01:00
Marcos Henrich 17ad50a165 Added test for optional {V}Specified and ShouldSerialize{V}.
{V}Specified is a property or field and ShouldSerialize{V} is a method that can be set to false if we do not want to serialize an attribute with name {V}.
2014-09-15 13:02:00 +01:00
Marcos Henrich f008d4afb6 Test XmlSerialization of element that requires implicit conversion.
Covers #20403.
2014-09-10 16:30:03 +01:00
Zoltan Varga 03aee949f1 Merge pull request #1200 from akoeplinger/remove-jvm
[Cleanup] Remove TARGET_JVM
2014-08-28 19:17:43 -04:00
Marcos Henrich 5df652e7d2 Test SerializationCodeGenerator.
XmlSerializerTests was mostly testing XmlSerializationReaderInterpreter and XmlSerializationWriterInterpreter.
XmlSerializerGeneratorTests forces the usage of SerializationCodeGenerator while running XmlSerializerTests.
2014-08-22 02:56:05 +08:00
Marcos Henrich dd6aca8621 Tests serialization of XmlNode field with attribute XmlAnyElement.
Covers #3211.
2014-08-22 02:42:19 +08:00
Marcos Henrich 2c5f30d7bd Added test BaseClassWithoutParameterlessConstructor.
Covers #6913
2014-08-18 14:08:02 +01:00
Marcos Henrich 6c5ea03852 Test XmlSerialization of class with XmlSchemaProvider with IsAny.
Covers #11916.
2014-08-18 11:40:58 +01:00
Alexander Köplinger 48e112d652 [Cleanup] Removed TARGET_JVM
It was once part of a special Java target profile, but this is no longer used today.
2014-08-08 03:28:34 +02:00
Alexis Christoforides 94b523275e [XML] Added unit test for multiple XMLElement attributes on arrays & ArrayLists 2014-04-08 18:05:46 -04:00
Alistair Bush eaa5a184ca Add test to ensure using concrete List as readonly property still serializes
This change is released under the MIT license.
2014-03-09 01:12:06 +13:00
Rodrigo Kumpera abe9dc6206 Revert "Fix object::GetType when remoting is enabled."
This reverts commit 93e2d1dc48.
2013-03-01 10:54:09 -05:00
Rodrigo Kumpera 93e2d1dc48 Fix object::GetType when remoting is enabled. 2013-03-01 10:52:03 -05:00
Marek Safar dd4cc7ca66 Tests update for mobile profile 2013-03-01 15:31:25 +01:00
Miguel de Icaza 07b6638343 Apply patch from Tom Hindle to fix ##2893 and add a test case.
The serializer interpreted was broken, but the compiled version was fine,
running MONO_XMLSERIALIZER_THS=0 allowed this to run
2012-01-14 15:35:45 -05:00
Atsushi Eno 6e5c07fd59 2010-03-29 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, XmlReflectionImporter.cs: XmlRoot takes higher
	  priority to XmlSchemaProvider QName.
	  This fixes WCF EndpointAddress serialization.

	* XmlSerializerTests.cs : test for XmlRoot and XmlSchemaProvider
	  QName conflict case.


svn path=/trunk/mcs/; revision=154368
2010-03-29 12:48:29 +00:00
Atsushi Eno 2866de3175 2010-01-26 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs, SerializationCodeGenerator.cs,
	  XmlSerializationWriterInterpreter.cs: XmlAnyElementAttribute can be
	  still used for non-XmlNode (object) array. It only fails when it
	  tries to serialize non-XmlNode object at run-time.
	  Fixed bug #553032.

	* XmlSerializerTests.cs : added test for bug #553032.


svn path=/trunk/mcs/; revision=150197
2010-01-26 07:06:51 +00:00
Atsushi Eno 6811013bfb 2010-01-06 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs : enum value identifiers should be
	  escaped with '@'. Fixed bug #566370.

	* XmlSerializerTests.cs : added test for #566370.


svn path=/trunk/mcs/; revision=149104
2010-01-06 04:02:02 +00:00
Atsushi Eno dfa3a04f22 2008-09-02 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs
	  XmlSerializationWriterInterpreter.cs : fixed bug #419973.
	  Sometimes implicit operators could involve and it affects on
	  typecasting. It's simple for code generator, but very bad for
	  reflection.

	* XmlSerializerTestClasses.cs, XmlSerializerTests.cs:
	  added test for bug #419973.


svn path=/trunk/mcs/; revision=112103
2008-09-02 16:56:08 +00:00
Atsushi Eno da257a4cbb 2008-04-11 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs : .NET 2.0 has a weird behavior that swallows
	  exception from IXmlSerializable.GetSchema().

	* XmlSerializerTestClasses.cs, XmlSerializerTests.cs : added test
	for IXmlSerializable serialization whose GetSchema() borks.


svn path=/trunk/mcs/; revision=100415
2008-04-11 06:34:35 +00:00
Lluis Sanchez 9d4657431e * System.Xml.Serialization/XmlSerializerTestClasses.cs,
System.Xml.Serialization/XmlSerializerTests.cs: Test nullable
  enums.

svn path=/trunk/mcs/; revision=99517
2008-04-01 14:26:05 +00:00
Atsushi Eno 439df4a604 2007-11-02 Atsushi Enomoto <[email protected]>
* TypeTranslator.cs : for duration, rather use primitiveTypes than
	  nameCache, and hence TimeSpan could be serialized just as custom
	  type. Fixed bug #338705.

	* XmlSerializerTests.cs : added test for bug #338705.


svn path=/trunk/mcs/; revision=88729
2007-11-02 16:25:26 +00:00
Atsushi Eno 756ab6c79b 2007-10-30 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : ToDateTime(string,string) should use ParseExact(),
	  not Parse(). Use 'K' for roundtrip format.

	* XmlCustomFormatter.cs : use RoundtripKind when converting to and
	  from DateTime.

	* XmlConvertTest.cs : added test for DateTime roundtrip.

	* XmlSerializerTests.cs : added test for bug #337729.


svn path=/trunk/mcs/; revision=88448
2007-10-30 12:33:34 +00:00
Atsushi Eno 3ed900c939 2007-10-26 Atsushi Enomoto <[email protected]>
* TypeTranslator.cs, XmlCustomFormatter.cs : looks like duration is
	  serialized to System.String, not TimeSpan. Fixed bug #336625.

	* XmlSerializerTests.cs : added test for DataType in [XmlElement].


svn path=/trunk/mcs/; revision=88247
2007-10-26 04:00:22 +00:00
Atsushi Eno ef3263bde5 2007-09-25 Atsushi Enomoto <[email protected]>
* XmlSerializerTests.cs : another XmlSchemaProvider test; use it
	  as a member of an array.


svn path=/trunk/mcs/; revision=86350
2007-09-25 17:56:10 +00:00
Atsushi Eno 6959e0c1d3 2007-09-25 Atsushi Enomoto <[email protected]>
* XmlSerializerTests.cs : added deserialization test for
	  XmlSchemaProviderAttribute use.
	* XmlReflectionImporterTests.cs : added test for conclict resolution
	  between defaultNamespace and XmlSchemaProvider() namespace.
	* XmlSchemaExporterTests.cs : use Infoset() comparison.

	* XmlTypeMapping.cs : Namespace and XmlTypeNamespace could be
	  different when an explicit namespace is specified (e.g. at
	  XmlReflectionImporter.ctor).
	* SerializationCodeGenerator.cs,
	  XmlSerializationWriterInterpreter.cs :
	  revert XmlTypeMapping.XmlTypeNamsepace usage. Now with the fix
	  above, original code should work fine.


svn path=/trunk/mcs/; revision=86346
2007-09-25 17:35:18 +00:00
Atsushi Eno 1e597c4439 2007-09-25 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, XmlSerializationWriterInterpreter.cs,
	  SerializationCodeGenerator.cs :
	  More XmlSchemaProviderAttribute method check. Use QName returned
	  by the method for the output root name.

	* XmlSerializerTests.cs, XmlReflectionImporterTests.cs :
	  added tests for XmlSchemaProviderAttribute and how its qname works.


svn path=/trunk/mcs/; revision=86340
2007-09-25 15:55:48 +00:00
Konstantin Triger 1024996147 do not output xml declaration while serializing XmlDocument
svn path=/trunk/mcs/; revision=82929
2007-07-29 11:53:24 +00:00
Atsushi Eno 6b03552e04 2007-07-26 Atsushi Enomoto <[email protected]>
* XmlSerializationWriterInterpreter.cs : looks like XmlNode[]
	  serialization is a complicated mess. bug #81539.

	* XmlSerializerTests.cs : test for #81539.
	  Sigh, why no one added tests.


svn path=/trunk/mcs/; revision=82708
2007-07-26 00:15:11 +00:00
Konstantin Triger f317d47021 TARGET_JVM: #7464 is fixed
svn path=/trunk/mcs/; revision=76896
2007-05-08 06:59:50 +00:00
Konstantin Triger 28a2fbb8dd TARGET_JVM: #7458 is fixed
svn path=/trunk/mcs/; revision=76890
2007-05-08 06:45:54 +00:00
Atsushi Eno a1cc211652 2007-04-25 Atsushi Enomoto <[email protected]>
* XmlConvert.cs : in 2.0, use F instead of f in dateTime formatting.

	* XmlCustomFormatter.cs :
	  in 2.0, use F instead of f for dateTime formatting.

	* XmlSerializationWriterTests.cs, XmlSerializerTests.cs :
	  fixed wrong dateTime formatting tests.


svn path=/trunk/mcs/; revision=76268
2007-04-25 18:22:32 +00:00