Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Someone even checks if they are equal, causing
[false, false]
to returntrue
.Test cases are sadly lacking ..
Thanks for the link!
I made the change, thanks for the tip! Could you give me a good link to the NUnit Framework?
It seems that the problem is only with C#. ASAP I will try with a tolerance of
0.000002
in C#. What do you think of that?Are you talking about C#? I don't see from MSDN that Assert.AreEqual accepts tolerance as a parameter but I could be wrong... Unfortunately there was no guide for that at CW and there is not one, even now.
I wrote this kata rather long time ago. I used the DELTA parameter in Java for this kata and now for this kind of kata I'm using a kind of assertFuzzyEqual in all languages. Nevertheless lots of guys passed the kata (373) which proves that it is doable:-)
BTW I don't see very well how you truncate ".9999999999 to 0, with only .0000000001 error". Furthermore I didn't ask for rounding but for truncating. The problem doesn't come from truncating it comes from the way languages work with floating numbers and from the order in wich operations are done.
Give me some reference for Assert.AreEqual with a tolerance parameter and I will try to modify it when I have time but I am afraid that tolerance doesn't exist in the other languages.
Thanks for your feedback.
You're right,
however the point of this kata is to create a simple class with some methods not a best practice class.
Aside from that, considering how many people have done this kata it's a bit to late to change : )