#!/usr/bin/perl
use warnings;use Test::More;
BEGIN { plan tests => 31 }
use     Games::Cards::Poker qw(:all);
use_ok('Games::Cards::Poker');
my $shrt = ScoreHand(5552);
ok($shrt eq 'AT944' , 'ScoreHand( 5552 )');
   $shrt = ScoreHand(708);
ok($shrt eq 'AT943s', 'ScoreHand(  708 )');
   $shrt = ScoreHand(0);
ok($shrt eq 'AKQJTs', 'ScoreHand(    0 )');
   $shrt = ScoreHand(7459);
ok($shrt eq '76532' , 'ScoreHand( 7459 )');
my $scor = HandScore('65542');
ok($scor ==   5522  , 'HandScore(65542 )');
   $scor = HandScore('65532');
ok($scor ==   5523  , 'HandScore(65532 )');
   $scor = HandScore('55432');
ok($scor ==   5524  , 'HandScore(55432 )');
   $scor = HandScore('AKQ44');
ok($scor ==   5525  , 'HandScore(AKQ44 )');
   $scor = HandScore('65442');
ok($scor ==   5742  , 'HandScore(65442 )');
   $scor = HandScore('64432');
ok($scor ==   5743  , 'HandScore(64432 )');
   $scor = HandScore('54432');
ok($scor ==   5744  , 'HandScore(54432 )');
   $scor = HandScore('AKQ33');
ok($scor ==   5745  , 'HandScore(AKQ33 )');
   $scor = HandScore('65332');
ok($scor ==   5962  , 'HandScore(65332 )');
   $scor = HandScore('64332');
ok($scor ==   5963  , 'HandScore(64332 )');
   $scor = HandScore('54332');
ok($scor ==   5964  , 'HandScore(54332 )');
   $scor = HandScore('AKQ22');
ok($scor ==   5965  , 'HandScore(AKQ22 )');
   $scor = HandScore('65322');
ok($scor ==   6182  , 'HandScore(65322 )');
   $scor = HandScore('64322');
ok($scor ==   6183  , 'HandScore(65322 )');
   $scor = HandScore('54322');
ok($scor ==   6184  , 'HandScore(54322 )');
   $scor = HandScore('AKQJ9');
ok($scor ==   6185  , 'HandScore(AKQJ9 )');
   $shrt = ScoreHand(3);
ok($shrt eq 'JT987s', 'ScoreHand(    3 )');
   $scor = HandScore($shrt);
ok($scor ==      3  , 'HandScore(JT987s)');
   $shrt = ScoreHand(7);
ok($shrt eq '76543s', 'ScoreHand(    7 )');
   $scor = HandScore($shrt);
ok($scor ==      7  , 'HandScore(76543s)');
   $shrt = ScoreHand(15);
ok($shrt eq 'AAAA8' , 'ScoreHand(   15 )');
   $scor = HandScore($shrt);
ok($scor ==     15  , 'HandScore(AAAA8 )');
   $shrt = ScoreHand(31);
ok($shrt eq 'KKKK4' , 'ScoreHand(   31 )');
   $scor = HandScore($shrt);
ok($scor ==     31  , 'HandScore(KKKK4 )');
   $shrt = ScoreHand(63);
ok($shrt eq 'TTTT8' , 'ScoreHand(   63 )');
   $shrt = ScoreHand(7461);
ok($shrt eq '75432' , 'ScoreHand( 7461 )');
