Add tolerance checks for tests in space-age#19
Add tolerance checks for tests in space-age#19kytrinyx merged 1 commit intoexercism:masterfrom mikecoop:master
Conversation
The tests numbers are rounded off but don't have any tolerance checking. They fail if the number isn't exactly the same.
|
It seems like the tests are explicitly stating that the result should be rounded. I'm not sure that this is correct, but I think that it's worth discussing. One thing that I think would be important to avoid, is cumulative rounding errors (if Earth gets rounded, and all others are based off of Earth, would the tests pass or fail?) |
|
It's not a problem if the results should be rounded to two decimal places but I think it should explicitly say that in the problem. It took me a while to figure out what I was doing wrong when I was solving the problem even though my numbers were correct. |
|
Hm. Yeah, that's a good point. I don't even know if it's explicit or that all the languages do it in the same way. I think that as long as the tolerance is small enough that we wouldn't allow accumulated rounding errors this is fine. Merging. |
Add tolerance checks for tests in space-age
The tests numbers are rounded off but don't have any tolerance checking.
They fail if the number isn't exactly the same.