Created
May 16, 2013 11:53
-
-
Save harms/5591224 to your computer and use it in GitHub Desktop.
Example tests, applicable of 'isAceLowStraight'. Works in context of programs found at http://www.jsoftware.com/jwiki/TracyHarms/PokerHandsScoring
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
prep=: ranks @: makeHand | |
assert -. isAceLowStraight prep '6 D 4 H 3 C 2 S A C' | |
assert -. isAceLowStraight prep '6 H 5 D 4 H 3 C 2 S' | |
assert isAceLowStraight prep '5 D 4 H 3 C 2 S A C' | |
assert isAceLowStraight prep '5 D 4 D 3 D 2 D A D' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am dissatisfied with the pairs, two checks on negative cases and two on positive. These alternatives suggest that there are meaningful differences in the test cases. I could not defend the claim that there are such differences. Perhaps their variety is of some value, but I can't formalize such value. Instead, I am inclined to say that having extra tests is a distraction that reduces clarity. -- Tracy Harms (author)