triangle: actively ignore cases with float input #338
triangle: actively ignore cases with float input #338sshine merged 5 commits intoexercism:masterfrom
Conversation
d867e35 to
414c196
Compare
|
I don't think that this is a good idea. Here we perform structural equality on floats. I think the exercise is complicated significantly if we are to introduce rounding-error testing. I would also say that this is a bug in OCaml. See Why can't I compare reals in Standard ML?. |
The test dataset contains floating point numbers though. Should we filter out those test cases then? |
Yes. When exercism/problem-specifications#1518 merges, we can push a change to triangle's canonical tests that changes these comments into an |
|
Ok, so filtering cases was more involved than I would have guessed. Anyway - adapted the test-generator as requested. |
24997bf to
2a70f95
Compare
2a70f95 to
deb036a
Compare
sshine
left a comment
There was a problem hiding this comment.
Excellent work.
I went and pushed for the merge of the "optional": "..." feature in canonical-data.json to make this easier, but it seems you found a way with Yojson to filter out the non-integer test cases. Nice job.
No description provided.