Re: FW: [ nunit-Bugs-1923458 ] Unexpected result from AreEqual/ANE for encoded strings

"Kelly Anderson" <[email protected]> Mon, 24 Mar 2008 11:38:21 -0600
Newsgroups gmane.comp.windows.dotnet.nunit.devel
Message-ID <[email protected]>
On Sun, Mar 23, 2008 at 12:11 PM, Charlie Poole
<[email protected]> wrote:
> Hi All,
>
>  I'm forwarding this bug to the list for discussion. You can comment here or
>  on the bug.
>
>  The gist of it is that Assert.AreEqual on strings uses string.Compare and
>  can find two strings equal even if they use different encodings. This makes
>  sense to me but it isn't how string.Equals or operator == work.
>
>  Your thoughts?

If you compare an int to a double with AreEqual, doesn't it convert
and then test for equivalancy? Seems like the same deal here to me.
NUnit by default returns equivalence, if through a very simple
transformation, they have the same values.

They can always write their own Constraint if this is important to
their context as well.

>From my point of view, while this is an interesting edge case, it is
not, per se, a bug.

-Kelly

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/