From 27022b0c8be221370e5fc4c66782720e7a38f7c9 Mon Sep 17 00:00:00 2001 From: Alex Karle Date: Sun, 19 Apr 2020 23:57:03 -0400 Subject: [PATCH] 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. --- t/Game.t | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/Game.t b/t/Game.t index 83ae8a8..962475a 100644 --- 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(); -- libgit2 1.1.1