[Mono-dev] question about System.Web.Extensions unit tests

Noam Lampert noaml at mainsoft.com
Mon Jun 2 08:12:08 EDT 2008

Hi Atsushi,

We care about .NET. Please do not rewrite the tests to fail on .NET.
Passing on .NET gives strong confidence that our implementation is
correct, and not only non-regressive.

As you can see, the order of the members in Grasshopper and .NET is
different and hence the #if.

The best way to fix these tests is to have a strong comparison engine
that will understand that these specific differences are not important,
but this is not a small task.

Perhaps a simpler workaround is to succeed on either of the strings
(e.g. Assert.IsTrue(script == res1 || script == res2); ).
Another alternative is to change the #if TARGET_JVM to #if !DOTNET.


-----Original Message-----
From: Atsushi Eno [mailto:atsushi at ximian.com] 
Sent: Monday, June 02, 2008 3:51 AM
To: mono-devel-list at lists.ximian.com
Subject: [Mono-dev] question about System.Web.Extensions unit tests


I have been seeing NUnit test failures in Sys.Web.Extensions. It keeps
the buildbot orange (warned), so today I checked the tests to see
what should be expected.

There I found that such lines that treats TARGET_JVM as different:

			Assert.AreEqual ("$create(My.Type, null, null,
$get(\"Element1\"));", script);
			Assert.AreEqual ("$create(My.Type, null, null,
$get(\"Element1\"));", script);

Though I see no reason to differentiate tests for GH. To my
understanding from our meeting at Mono summit 2006 time, Mainsoft
does not use #if TARGET_JVM without any reasonable differences,
so I would like to know the reason why there are such switches all
around the tests so that they can pass on GH while they will fail
on Mono, if any.

Actually when I ran make PROFILE=net_3_5 run-test-ondotnet, there
was no error report. So if those tests are rewritten, they will
fail on .NET.

If it is only about behavioral difference in generic Dictinary`2,
then those tests should not be conditionalized to legalize only in
TARGET_JVM and rewritten to fail only on .NET. (Who cares after all?)

Atsushi Eno

More information about the Mono-devel-list mailing list