[Mono-dev] Xml Serialization tests failing under .NET 2.0
Atsushi Eno
atsushi at ximian.com
Wed Feb 1 15:54:25 EST 2006
Hi Gert,
>> I'm wondering if you can take care of some Xml Serialization tests
>> including whatever you added.
>
> Atsushi, I know some of tests I added fail on MS.NET 2.0. I asked for advise
> on this matter in one of my previous message.
Umm, what you asked before was about things that you are going to add,
and not about existing things, no?
I put my thoughts below...
> Right now, these tests only pass on MS.NET when you added the "MS"
> conditional compilation directive. I needed this as the result on Mono
> currently does not match the result on MS.NET (due to bug #77117).
Well, the problem is that (some of) those tests *fail* under MS.NET
(not about those tests that *pass* under MS.NET).
> What do you propose: should I mark these tests NotWorking, or NotDotNet
> until bug #77117 is fixed ?
As for specific "missing nillable" case, I think it is fine to use
NotWorking. I'm not sure about others. Basically we should use
NotDotNet only when there is a bug in MS.NET. In other cases that
Mono behavior is fine, I'd recommend to just use [Ignore].
My *guess* is that .NET 2.0 behavior would be rational than that
of 1.x.
In either way, we can revisit individual test and retag test
attributes later.
>> 35)
>> MonoTests.System.XmlSerialization.XmlSerializerTests.TestSeria
>> lizeEnumDefaultValue
>> : 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.
>
> I know support for this was added to Mono a while ago to match MS.NET 1.1.
> I'll look into enabling that code only for the 1.0 profile.
>
>> 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 ;)
>
> Ok, I'll try to do it this weekend, or early next week.
Thanks a lot, that is really great :-) It would make
run-test-ondotnet easier.
Atsushi Eno
More information about the Mono-devel-list
mailing list