Commit Graph
135 Commits
Author SHA1 Message Date
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 ae6c7511d1 Fix for bug #430759.
svn path=/trunk/mcs/; revision=117965
2008-11-05 11:54:29 +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 8688f906c3 2008-06-05 Atsushi Enomoto <[email protected]>
* XmlSerializationReaderInterpreter.cs, MapCodeGenerator.cs,
	  SerializationCodeGenerator.cs : fixed bug #378696.
	  Default value should not be filled during deserialization, and
	  default values for DateTime/TimeSpan/DateTimeOffset should not be
	  output as raw string in generated code.

	* XmlSerializerTestClasses.cs, DeserializeTests.cs,
	  ComplexDataStructure.cs : added test for bug #378696.
	  Fixed couple of wrong tests that expects default values filled
	  during deserialization.


svn path=/trunk/mcs/; revision=104983
2008-06-05 11:28:51 +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
Gert Driesen dcf0d7cc29 * XmlCodeExporterTests.cs: Remove CWL.
svn path=/trunk/mcs/; revision=99459
2008-03-31 19:05:33 +00:00
Gert Driesen b10e9acc58 * 82078.xsd: Added new complex type as test for duplicate field
name.
* MapCodeGenerator.cs: Ensure fields that back properties are unique.
* XmlSerializationReaderTests.cs: Marked HandleOutAttributeParameters 
test as NotDotNet on 1.0 profile.
* XmlCodeExporterTests.cs: Improved test for duplicate identifiers.
Fixed ExportTypeMapping_Root and ExportTypeMapping_Field tests to
pass on .NET 2.0.

svn path=/trunk/mcs/; revision=99345
2008-03-30 15:25:11 +00:00
Atsushi Eno d89e9691ac 2008-02-19 Atsushi Enomoto <[email protected]>
* XsdWildcard.cs : block extra compilation and made compilation reset.
	  This somehow fixed bug #360541.

	* XmlSchemaAny.cs : block extra compilation in anyTypeContent.

	* XmlSchemasTests.cs : new test file (for bug #360541).

	* System.Xml_test.dll.sources: added XmlSchemasTests.cs.


svn path=/trunk/mcs/; revision=96115
2008-02-19 04:02:53 +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 d9b24722e2 2007-11-01 Atsushi Enomoto <[email protected]>
* XmlSchemaImporter.cs : simpleType is allowed to be imported.
	  (Part of #336739 fix.)

	* XmlSchemaImporterTests.cs : test for importing simple-typed
	  top-level element.


svn path=/trunk/mcs/; revision=88636
2007-11-01 11:38:14 +00:00
Atsushi Eno 25ad683a61 2007-10-30 Atsushi Enomoto <[email protected]>
* XmlSchemaExporterTests.cs : without Infoset(), those tests randomly
	  fail on .NET. This fix is incomplete. Someone please continue this
	  boring work. I don't want to do that.


svn path=/trunk/mcs/; revision=88453
2007-10-30 13:07:14 +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 1bef3d3d95 2007-10-30 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs : found the true culprit for the previous
	  attempt to the fix.

	* XmlCodeExporterTests.cs : enable the previous test again.


svn path=/trunk/mcs/; revision=88365
2007-10-29 10:55:37 +00:00
Atsushi Eno d903039b06 2007-10-30 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs, XmlSchemaImporter.cs: revert the previous
	  change; the type is included in the output, but it should not be
	  the base type.

	* XmlCodeExporterTests.cs : disable the previous test; it's reverted.


svn path=/trunk/mcs/; revision=88364
2007-10-29 10:41:53 +00:00
Atsushi Eno 1d08a72b56 2007-10-30 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs, XmlSchemaImporter.cs: when a complexType has
	  simple content extension/restriction and the simple base type is
	  schema-defined, it must be written in exported code. Fixed (part
	  of?) bug #336739.

	* XmlCodeExporterTests.cs : added test for (part of?) bug #336739,
	  base simple content enum type output.


svn path=/trunk/mcs/; revision=88363
2007-10-29 10:23:35 +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
Atsushi Eno 6f08261d8a 2007-08-21 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs : do not reject XmlArrayAttribute on
	  byte[] (processed as primitive SchemaType). Fixed bug #81880.

	* XmlReflectionImporterTest.cs : test for bug #81880.


svn path=/trunk/mcs/; revision=84548
2007-08-21 13:10:37 +00:00
Atsushi Eno 32f6484459 2007-08-21 Atsushi Enomoto <[email protected]>
* MapCodeGenerator.cs : avoid possible duplicates in generated field 
	  names. Fixed bug #82078.

	* XmlCodeExporterTests.cs : test for bug #82078.

	* 82078.xsd : new test file.

	* Makefile : extra distfiles (82078.xsd).


svn path=/trunk/mcs/; revision=84531
2007-08-21 09:24:42 +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
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
Atsushi Eno 539a09ff94 2007-04-24 Atsushi Enomoto <[email protected]>
* XmlCustomFormatter.cs : ditto for reader method generation.
	* SerializationCodeGenerator.cs : for generic nullable values it
	  needs to store ReadNullableString() result to a temporary variable.

	* XmlSerializerTests.cs : another case on #80759 from gert.


svn path=/trunk/mcs/; revision=76160
2007-04-24 03:37:03 +00:00
Atsushi Eno 4d3d5288a1 2007-04-23 Atsushi Enomoto <[email protected]>
* TypeData.cs, XmlCustomFormatter.cs : generic nullable values did
	  not fit with non-nullable formatting. Fixed #80759 regression.

	* XmlSerializerTests.cs :
	  added missing test from 80759, and marked similar but different one
	  from the same bug as not working.


svn path=/trunk/mcs/; revision=76099
2007-04-23 08:41:41 +00:00
Atsushi Eno ef23f4f0cc 2007-04-20 Atsushi Enomoto <[email protected]>
* XmlTypeMapping.cs, ReflectionHelper.cs,
	  XmlSerializationReaderInterpreter.cs, SerializationCodeGenerator.cs:
	  support instantiation by private constructor.

	* XmlSerializerTests.cs :
	  Added test for serializing private-constructor-only class.


svn path=/trunk/mcs/; revision=76003
2007-04-20 11:13:46 +00:00
Atsushi Eno 19a69141f1 2007-02-20 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs,
	  XmlSerializationReaderInterpreter.cs :
	  Handle attributes on non-empty elements as well. Fixed bug #80131.

	* XmlSerializationReaderTests.cs : test non-empty element as well.


svn path=/trunk/mcs/; revision=73145
2007-02-20 07:38:35 +00:00
Atsushi Eno 26736f8173 2007-02-20 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs,
	  XmlSerializationReaderInterpreter.cs :
	  Handle empty root element.
	  Read out attribute parameters. To do that, split attribute
	  reader part from ReadMembers(), as it isn't invoked when the
	  element is empty.

	* XmlSerializationReaderTests.cs : added test for out attribute
	  parameters. It also tests empty root element.


svn path=/trunk/mcs/; revision=73143
2007-02-20 06:06:12 +00:00
Atsushi Eno 2e220d6ca3 2007-02-19 Atsushi Enomoto <[email protected]>
* XmlTypeMapElementInfo.cs : set nullable if the type is Nullable<T>.

	* XmlReflectionImporterTests.cs : added another test for nullable
	  container.


svn path=/trunk/mcs/; revision=73120
2007-02-19 15:44:36 +00:00
Atsushi Eno ad569e528f 2007-02-19 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs : CanBeNull() should return true when the
	  argument is generic nullable value type.

	* XmlReflectionImporterTests.cs : added test for nullable int import.


svn path=/trunk/mcs/; revision=73117
2007-02-19 13:56:15 +00:00
Atsushi Eno 4f040c7848 2007-02-14 Atsushi Enomoto <[email protected]>
* XmlTypeMapMember.cs : don't use readonly [Foo]Specified property
	  as nil-condition member. Fixed bug #80759.

	* XmlSerializerTests.cs : added HasFieldSpecifiedButIrrelevant().


svn path=/trunk/mcs/; revision=72844
2007-02-14 15:59:22 +00:00
Gert Driesen e737dbe374 * XmlCodeExporter.cs: Avoid hardcoding version numbers. Enable tests
again on 2.0 profile.

svn path=/trunk/mcs/; revision=72461
2007-02-07 22:29:53 +00:00
Atsushi Eno 69a53ae15c 2007-02-07 Atsushi Enomoto <[email protected]>
* SoapReflectionImporter.cs : for primitive types, set predefined
	  namespaces, regardless of the actual specification.

	* SoapReflectionImporterTests.cs : removed some NotWorking.


svn path=/trunk/mcs/; revision=72455
2007-02-07 20:48:48 +00:00
Atsushi Eno 538b940300 2007-02-07 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : WriteTypedPrimitive() does not support
	  XmlNode arrays.
	* XmlSerializationWriterInterpreter.cs,
	  SerializationCodeGenerator.cs : so they have to be handled here.

	* XmlSerializerTests.cs : added some XmlNode array/list tests.
	* XmlSerializationWriterTests.cs : removed more NotWorking. Added
	  WriteTypedPrimitive() error test for XmlNode.


svn path=/trunk/mcs/; revision=72448
2007-02-07 18:47:55 +00:00
Atsushi Eno 1552791781 2007-02-07 Atsushi Enomoto <[email protected]>
* XmlSerializationWriter.cs : WriteTypedPrimitive() infers the type
	  when the name is null (almost no need to do this, but it is easier
	  to remove NotWorking from extraneous tests and let them hush than
	  removing them).

	* XmlSerializationWriterTests.cs : removed some NotWorking.


svn path=/trunk/mcs/; revision=72436
2007-02-07 17:11:43 +00:00
Atsushi Eno ab26e417d8 2007-02-07 Atsushi Enomoto <[email protected]>
* DeserializeTests.cs : a lot of tests were actually fixed yet.


svn path=/trunk/mcs/; revision=72433
2007-02-07 16:33:45 +00:00
Atsushi Eno 1bd108d8ed 2007-02-07 Atsushi Enomoto <[email protected]>
* XmlCodeExporterTests.cs : Gert's tests often condemn Microsoft
	  that they upgrade version numbers.


svn path=/trunk/mcs/; revision=72432
2007-02-07 16:25:08 +00:00
Atsushi Eno 8e6042d7e7 2007-01-19 Atsushi Enomoto <[email protected]>
* XmlMemberMapping.cs : uhoh, there is a nasty trick to output
	  Nullable info.

	* XmlSchemaImporterTests.cs :
	  Added ImportMembersMapping_NullableField().


svn path=/trunk/mcs/; revision=71318
2007-01-19 06:35:02 +00:00
Atsushi Eno c7f990160e 2007-01-18 Atsushi Enomoto <[email protected]>
* TypeData.cs : added get_IsGenericNullable.
	* MapCodeGenerator.cs : in GetDomType(), return Nullable<T> when
	  the TypeData.IsGenericNullable.
	  Use GetDomType() instead of CodeTypeReference.ctor() to not lose
	  Nullable<T> info.
	* XmlSchemaImporter.cs : added isNullable argument to GetTypeData()
	  so that it won't XmlSchemaElement.IsNillable.
	* TypeTranslator.cs :
	  Fixed wrong TypeData modification against non-nullable stuff.
	  Added another GetTypeData() that takes isNullableRuntimeType so
	  that it won't miss XmlSchemaElement.IsNillable.
	  Added another GetPrimitiveTypeData() that takes nullable.

	* XmlSchemaImporterTests.cs :
	  test that <xs:element nillable='true' ...> is mapped to Nullable<T>.


svn path=/trunk/mcs/; revision=71304
2007-01-18 18:00:36 +00:00
Atsushi Eno 5b91cae326 2007-01-15 Atsushi Enomoto <[email protected]>
* XmlSerializerTests.cs : Fixed NotDotNet generic test which itself
	  was wrong.


svn path=/trunk/mcs/; revision=71002
2007-01-15 05:43:59 +00:00
Atsushi Eno 11124928cd 2007-01-15 Atsushi Enomoto <[email protected]>
* TypeData.cs : reject generic type definitions.
	* TypeTranslator.cs : Make generic type names in XML compatible with
	  .net: foo_x0060_1 -> fooOfString.

	* XmlSerializerTests.cs : most of generic tests are working now.
	* XmlReflectionImporterTests.cs : test for rejecting generic type
	  definition.


svn path=/trunk/mcs/; revision=71001
2007-01-15 05:26:35 +00:00
Atsushi Eno 4b62022259 2006-12-04 Atsushi Enomoto <[email protected]>
* SerializationCodeGenerator.cs, XmlCustomFormatter.cs :
	  GenerateToXmlString() needed hexBinary support as well. Since
	  XmlConvert.[To|From]BinHexString() are internal, use reflection.
	  Really fixed bug #79989 and #79990 for generated serializers.

	* XmlSerializerTests.cs :
	  added base64 tests which is similar to hexBinary.


svn path=/trunk/mcs/; revision=68927
2006-12-04 05:21:02 +00:00
Gert Driesen a4b17da1b4 * XmlSerializerTests.cs: Undo some of Hagit's code formatting changes.
svn path=/trunk/mcs/; revision=68890
2006-12-03 14:31:18 +00:00
Gert Driesen c590893933 * XmlSerializerTests.cs: Only compile generic tests on 2.0 profile.
Fixes build.
* DeserializeTests.cs: Same.
* XmlSerializerTestClasses.cs: Same.

svn path=/trunk/mcs/; revision=68888
2006-12-03 14:14:20 +00:00
Gert Driesen 0cee60a6a0 * XmlSchemaExporterTests.cs: Added tests for (part of) bug #78214.
* XmlSchemaExporter.cs: Emit xml name of enum-based default values.
Set XmlSchemaAttribute.Use to Required if no default value is defined,
and member is not an optional value type. Element should have minOccurs
1 if value type member has default value. Output flag enum type as
xsd list with restriction.
* XmlReflectionImporter.cs: Removed special casing of enums. Instead
of passing namespace of XmlAttribute to ImportTypeMapping, use the
default namespace for importing the member type.

svn path=/trunk/mcs/; revision=68887
2006-12-03 13:51:16 +00:00
Yoni Klain acef74c489 2006-12-03 Hagit Yidov <[email protected]>
* XmlSerializerTests.cs : added tests for serialization of generic types.
	* DeserializeTests.cs : added tests for deserialization of generic types.
	* XmlSerializerTestClasses.cs : added classes for tests which use generic types.

svn path=/trunk/mcs/; revision=68886
2006-12-03 12:28:23 +00:00
Atsushi Eno 0180b11bb3 2006-12-01 Atsushi Enomoto <[email protected]>
* XmlReflectionImporter.cs : implemented several missing check and 
	  support for XmlArrayAttribute. Fixed bug #78042.

	* XmlSerializerTests.cs : added tests for XmlArrayAttribute support.


svn path=/trunk/mcs/; revision=68792
2006-12-01 01:44:17 +00:00