commit 27022b0c8be221370e5fc4c66782720e7a38f7c9 (patch)
parent dbbf06b5ac760198d83de2cebcb3980bcdb80a74
Author: Alex Karle <alex@karle.co>
Date: Sun, 19 Apr 2020 23:57:03 -0400
Euchre::Game: Add card_value test points
I coulda sworn I saw some strange behavior in the hand sorting where AC
> JC and C was trump... hmmmmm. But the tests all check out, so I'll
have to dive in some more.
Diffstat:
1 file changed, 8 insertions(+), 0 deletions(-)
diff --git a/t/Game.t b/t/Game.t
@@ -69,8 +69,16 @@ sub test_score_round {
}
}
+sub test_card_value {
+ ok(card_value('AH', 'H') < card_value('JH', 'H'), 'right bower highest');
+ ok(card_value('AH', 'H') < card_value('JD', 'H'), 'left bower higher than ace');
+ ok(card_value('JH', 'H') > card_value('JD', 'H'), 'left bower lower');
+ ok(card_value('ND', 'H', 'D') > card_value('TC', 'H', 'D'), 'throwoff');
+}
+
test_deal();
test_trick_winner();
test_score_round();
+test_card_value();
done_testing();