[Mono-dev] Xml Serialization tests failing under .NET 2.0

Atsushi Eno atsushi at ximian.com
Wed Feb 1 02:30:22 EST 2006


Hello Gert,

I'm wondering if you can take care of some Xml Serialization tests
including whatever you added. Under .NET 2.0 a bunch of those tests
fail - for example,

35)
MonoTests.System.XmlSerialization.XmlSerializerTests.TestSerializeEnumDefaultValue
: System.InvalidOperationException : There was an error generating the
XML document.
  ----> System.InvalidOperationException : Instance validation error:
'0' is not a valid value for
MonoTests.System.Xml.TestClasses.EnumDefaultValueNF.
   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter
xmlWriter, Object o, XmlSerializerNamespaces namespaces, String
encodingStyle, String id)

That EnumDefaultValueNF is defined as:

	public enum EnumDefaultValueNF { e1 = 1, e2 = 2, e3 = 3 }

The test fails at:

	Serialize(new EnumDefaultValueNF());

To me, since there is no 0 (the value created by the weird .ctor()
above) in that enum, it should be invalidated - i.e. MS.NET 2.0 is
correct.

There are too many tests like this and I think you might be adding
more, so you would be the best person to have a look at them ;)

If you don't have time enough on it, don't worry. Maybe I'll mark
all of those failing tests as [Ignore].

Atsushi Eno



More information about the Mono-devel-list mailing list