[Mono-devel-list] patch for namespace clash

Raja R Harinath rharinath at novell.com
Tue Jan 4 04:50:09 EST 2005


Hi,

"Nick Drochak" <ndrochak at gol.com> writes:

> While building tests on cygwin I got a namespace clash.  Here’s a patch to resolve that issue with csc.
>
> Note, if mcs is able to compile the original without problems, then that may indicate a bug.  Not sure about that.
>
> Index: BigIntegerTest.cs
> ===================================================================
> --- BigIntegerTest.cs	(revision 38079)
> +++ BigIntegerTest.cs	(working copy)
> @@ -27,7 +27,7 @@
>  //
>  
>  using NUnit.Framework;
> -using System;
> +using myalias = System;
>  using Mono.Math;
>  
>  namespace MonoTests.Mono.Math {
> @@ -86,7 +86,7 @@
>  			for (int i=1; i < 40; i++) {
>  				BigInteger e = new BigInteger (i);
>  				BigInteger r = e.ModPow (b, m);
> -				long expected = (long) System.Math.Pow (i, 10) % 32;
> +				long expected = (long) myalias.Math.Pow (i, 10) % 32;
>  				Assert.AreEqual (expected.ToString (), r.ToString (), i.ToString ());
>  			}
>  		}

I'm working on a set of patches to make mcs act similarly.  You must've
also seen something similar with StringTest.cs, I hope.

- Hari



More information about the Mono-devel-list mailing list