exercism / exercism/problem-specifications

armstrong-numbers: Inaccurate test/description

Đang mở
#1,498 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
correctness
Ngôn ngữ chính
Ruby
Star
358
Fork
563
Merge trung bình
18 giờ 41 phút
Pull request đã merge (30 ngày)
2

Mô tả

The armstrong-numbers description of `There are no 2 digit Armstrong numbers` and the test data of `10` don't quite line up. The tests would happily pass if `11` was detected as an armstrong number even though it would be incorrect.

https://github.com/exercism/problem-specifications/blob/ca9c09eda445e642317a043bf9c949fbffae4020/exercises/armstrong-numbers/canonical-data.json#L14-L20

I would suggest that the ideal solution is to actually have tests that assert on the entire range of 2 digit numbers to make the tests accurate to the description, although the simplest possible thing might be just adjusting the description to be more specific to the test case. `Two digit number that is not an Armstrong number`

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.