Re: SVN Not building?

"Charlie Poole" <[email protected]> Fri, 29 Aug 2008 10:24:36 -0700
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <000001c909fc$1e0ce560$6401a8c0@ferrari>
Hi Cory,

OK, here's what I figured out about NullableTypes tests...

The first line that fails to compile is
            Assert.Greater(five, 3);
where five is int?

This is interesting since these lines that precede it compile:
            Assert.AreEqual(five, 5);
            Assert.AreEqual(5, five);

AreEqual has an (object,object) overload, which is used in this
case by both MS and Mono. Greater has (IComparable,IComparable) 
which MS uses, but Mono does not use.

Mono is picking up the (int,int) overload and trying to use it,
but there is no implicit conversion of int? to int. If I comment
out the (int,int) overload, it goes on to try (uint,uint). I'll
create a simpler test case to see if it /ever/ uses the
IComparable interface.

Fact is, Nullable<T> does't implement IComparable! Apparently
the MS compiler is doing some magic with int? that Mono is
not duplicating.

For now, I applied your fix of removing these tests from the
Mono build.

Charlie

> -----Original Message-----
> From: [email protected] 
> [mailto:[email protected]] On 
> Behalf Of Cory Foy
> Sent: Thursday, August 28, 2008 10:00 AM
> To: Charlie Poole
> Cc: [email protected]
> Subject: Re: [nunit-developer] SVN Not building?
> 
> Charlie Poole wrote:
>  > The build-all target builds the current config for all targets.
>  > So it's ignoring your setting of the target as mono-2.0 
> and  > attempting to build debug for all the supported 
> targets you  > have installed.
>  >
>  > I'm guessing you meant to use
>  >    nant mono-2.0 build
>  >
> 
> Ah, thanks. Ok, here are the other files that need to be modified. 
> Mostly missing references.
> 
> src/NUnitCore/core/nunit.core.build
> src/ClientUtilities/util/nunit.util.build
> src/GuiRunner/nunit-gui/nunit-gui.build
> src/PNUnit/agent/pnunit-agent.build
> src/PNUnit/launcher/pnunit-launcher.build
> src/NUnitFramework/framework/nunit.framework.build
> src/NUnitFramework/tests/nunit.framework.tests.build
> src/NUnitFramework/tests/NullableTypesTests.cs
> 
> With these changes, everything builds. Almost everything was 
> either missing references or missing includes. The only 
> exception was the NullableTypesTests - that whole thing 
> doesn't compile, complaining that:
> 
> [csc]
> /Users/foyc/Workspace/nunit/nunit20/src/NUnitFramework/tests/N
> ullableTypesTests.cs(35,20): 
> error CS1502: The best overloaded method match for 
> `NUnit.Framework.Assert.Greater(int, int)' has some invalid arguments
>                    [csc]
> /Users/foyc/Workspace/nunit/nunit20/build/mono/2.0/debug/lib/n
> unit.framework.dll
> (Location of the symbol related to previous error)
>                    [csc]
> /Users/foyc/Workspace/nunit/nunit20/src/NUnitFramework/tests/N
> ullableTypesTests.cs(35,20): 
> error CS1503: Argument 1: Cannot convert type `int?' to `int'
> 
> 
> and about 70 other similar errors. So I just added to the 
> preprocess #if to ignore the tests if MONO.
> 
> Next up is to run the tests and see where we can get. ;)
> 
> --
> Cory Foy
> http://www.cornetdesign.com
> http://www.agileflorida.com
> 



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/