Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 5,972 | Comments: 44,521

filter by tags archive

Comments

josh

well that's helpful

Oran

Yep, ran into that one a while ago...

http://code.google.com/p/mb-unit/issues/detail?id=114

Andrey Shchekin

It's funny that I have stumbled in the exactly same bug today.

Well, seems almost no one is actually using AreNotEqual if this lived to the 2.4.

Andy Stopford

Thanks Oren, I'll need to investigate this more but I think in the absence of an assert for Guid that MbUnit is casting to object and then equating as a null. The AreNotEqual has this gem.

if (expected == null ^ actual == null)

return;

As both become null in the cast it passes. Thats a complete guess at the moment until I can investigate more. Always fun.

Andy

James Curran

Maybe it been updated since the version I'm running (1.0.2700) but the real problem I see is that AreEqual(object, object) uses the object's Equals() methods (via ObjectsEqual) which is customized to the class, while AreNotEqual just uses !(obj==obj) which ultimately just Object.ReferenceEquals.

Stefan Wenig

That's because GUIDs are so unique that even two identical GUIDs are not quite equal. Duh.

arielr

That's nothing compared to my bug of the day:

try running this piece of code in the immediate window and then in the body of a funcion.

bool a = object.ReferenceEquals("A","A")

AndyKernahan

That's nothing compared to my bug of the day:

try running this piece of code in the immediate window and then in the body of a funcion.

bool a = object.ReferenceEquals("A","A")

a would be true as the compiler would have inturned the string "A"

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. Reducing parsing costs in RavenDB - 6 hours from now

There are posts all the way to Aug 04, 2015

RECENT SERIES

  1. Production postmortem (5):
    29 Jul 2015 - The evil licensing code
  2. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
  3. API Design (7):
    20 Jul 2015 - We’ll let the users sort it out
  4. What is new in RavenDB 3.5 (3):
    15 Jul 2015 - Exploring data in the dark
  5. The RavenDB Comic Strip (3):
    28 May 2015 - Part III – High availability & sleeping soundly
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats