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: 18 | Comments: 66

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. RavenDB 3.0 New Stable Release - one day from now
  2. Production postmortem: The industry at large - about one day from now
  3. The insidious cost of allocations - 3 days from now
  4. Buffer allocation strategies: A possible solution - 6 days from now
  5. Buffer allocation strategies: Explaining the solution - 7 days from now

And 3 more posts are pending...

There are posts all the way to Sep 11, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    01 Sep 2015 - The case of the lying configuration file
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats