Skip to content

perfect-numbers: Update tests from table-based to macro-based #394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

coriolinus
Copy link
Member

@coriolinus coriolinus commented Nov 13, 2017

This PR is in response to #392; closes #392.

Perfect-numbers currently uses table-based testing. For reasons outlined
in #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.

@coriolinus
Copy link
Member Author

coriolinus commented Nov 13, 2017

$ sh ./_test/count-ignores.sh
/home/travis/build/exercism/rust/exercises/perfect-numbers/tests/perfect-numbers.rs: Has 2 tests and 11 ignores (should be 1)
The command "sh ./_test/count-ignores.sh" exited with 1.

Clearly, there will need to be some tooling updates if we decide to go this route.

coriolinus and others added 4 commits November 19, 2017 11:17
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_.
@coriolinus coriolinus force-pushed the perfect-numbers-non-table-tests branch from 2a17fc5 to 42e4d94 Compare November 19, 2017 10:18
@coriolinus
Copy link
Member Author

Given that there's been no discussion or objection in the last 6 days, I'll merge this once Travis approves.

@coriolinus coriolinus merged commit 97c5d27 into exercism:master Nov 19, 2017
@coriolinus coriolinus deleted the perfect-numbers-non-table-tests branch November 19, 2017 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

consider table-driven tests
1 participant