[Mono-dev] UrlEncode difference in dotnet and mono

Ben Maurer bmaurer at ximian.com
Thu Jan 5 11:48:42 EST 2006

> Hi Ben.
> You wrote:
>> > +			for (char c=Char.MinValue; c<128; c++)
>> chars are from 0 to 2^16-1
> I do check those chars. Look at the second loop that iterates from 128
> to Char.MaxValue (did you notice it?)
> Let me clarify my idea: I could not create expected results for 64K
> characters, so I did so only for ASCII (in the first loop) and for the
> rest I check that a character does not stay the same (gets some
> encoding).

Yeah, Didn't grok it at first sight. Anyways, I don't like the "check that
char is  not the same". A much better test would be to copy to proposed
impl into the test suite (you'd first have to make sure manually that it
gives the exact same result for any given char as msft). Then make the
test check that the result is the same as the copied impl. This would be a
great start if we want to make perf improvements.

-- Ben

More information about the Mono-devel-list mailing list