forked from exercism/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perfect-numbers: Update tests from table-based to macro-based
This PR is in response to exercism#392. Perfect-numbers currently uses table-based testing. For reasons outlined in exercism#392 (comment) I believe that table-based testing is not the appropriate way to do things. This is what macro-based tests might look like. Are they abstruse and opaque? Yes. However, they at least become individual tests, and I believe that this is _better than the status quo_. Squashed commits: - Conditionally disable count-ignores.sh; disable for perfect-numbers - Document .meta/ignore-count-ignores - Update to use inline ignores
- Loading branch information
1 parent
b61d2e3
commit e943898
Showing
4 changed files
with
55 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Perfect numbers has tests generated by macro. | ||
This breaks the count-ignores.sh script: | ||
|
||
```text | ||
exercises/perfect-numbers/tests/perfect-numbers.rs: Has 2 tests and 11 ignores (should be 1) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters