4
Assert.AreEqual (9.97320998018748d, observerPosition.CenterLongitude);
产生
Expected Value & Actual Value : 9.97320998018748
Remark : Both values look the same when formatted but they
are distinct instances.
什么是最优雅的方式在MbUnit的3.0比较两个双打的平等?我知道我可以把它们四舍五入,但是有没有一些MbUnit构造?
更新:我认为我目前的“解决方法”为非优雅:
Assert.LessThan(
Math.Abs(9.97320998018748d - observerPosition.CenterLongitude),
0.0000001);
咦...我不知道我怎么没注意到这个方法。谢谢! – 2009-04-07 19:45:04