FIX: Update test cases where is not correct the expected value.#576
FIX: Update test cases where is not correct the expected value.#576clouby wants to merge 2 commits intoexercism:mainfrom
Conversation
|
This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested. If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos. For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping |
lpil
left a comment
There was a problem hiding this comment.
Thank you. Could you fix the test please 🙏
|
@lpil Done ✅ - Let me know if looking good for you, thanks! |
| let assert True = | ||
| let assert False = | ||
| armstrong_numbers.is_armstrong_number( | ||
| 186_709_961_001_538_790_100_634_132_976_990, |
There was a problem hiding this comment.
Sorry to butt in, but I'm pretty sure that this number and the following one are Armstrong numbers (see the comments or example sections, or the full list). I suspect that the site you posted screenshots from uses JS to check the number, and numbers that large are always treated as floats and lose precision.
Similarly, having to introduce Floats in the example solution to make it work seems suspicious to me.
Also, in general, the practice exercises all come from a repo common to all the Exercism tracks, so if there is an issue not linked to the specificity of a track language, it should be solved over there so that all tracks can benefit.
There was a problem hiding this comment.
Thanks for your explanation here, I'll take a look further about Armstrong criteria - I'll close it.
Hey Gleam team,
I noticed that the last two test cases about the
armstrong_numberschallenge are not correct to the expected value; those cases should have expected afalsevalue.Also made some tests with external tools that match the expected value:
Test Cases
armstrong_number_containing_seven_zeroes_testthe_largest_and_last_armstrong_number_test