-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
resistor-color-duo and property tests #867
Comments
Basically, you want to show the student how to write a |
Yes, that was my thought. |
@barrymoo: If you'd like, #865 has now been merged and this issue is ready to be worked on. |
@sshine I was going to work on this today, but I noticed the |
@iHiD Updating worked for me. I am hoping to work on this soon! |
After #865, resistor-color-duo's
value :: (Color, Color) -> Int
is ideal for property testing.Some properties that can be tested:
value (Black, x) < 10
for allx
value (x, y) >= 10
for allx
exceptBlack
and ally
show (value (x, y)) == reverse (show (value (y, x)))
for allx
,y
exceptBlack
.(Color, Color)
is isomorphic to[0..99]
(or: all colors have a unique value).Considering how simple this exercise is, adding all these property tests with the purpose to aid students is slightly overkill. (It could use a few more unit tests for basic coverage, though.)
So I thought: Why not encourage property testing in
.meta/hints.md
?In the style of #843, add one or two property tests and encourage others.
A pull request that proposes this awaits for #865 to merge.
The text was updated successfully, but these errors were encountered: