Geek Noise
Rants, rambles, news and notes by Peter Provost
10

Annoying Omission in NUnit

Tuesday, 10 June 2003 08:08 by Peter Provost

NUnit doesn't handle the C# decimal type properly. So if I do this:

Assertion.AssertEquals( 10.0M, 
    myClass.InchesToCentimeters( 3.937007874015748031496062992126M ) );

It fails, telling me

expected:<10.0>
but was:<10.000000000000000000000000000>

Bummer. Apparently they forgot to add an override for decimal.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:   Technology
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed