From ac9263b89e952dcb65b4c01a7698705e705073ee Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 8 Dec 2009 17:05:11 -0600 Subject: [PATCH] fix unit test --- extra/poker/poker-tests.factor | 3 ++- extra/poker/poker.factor | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/extra/poker/poker-tests.factor b/extra/poker/poker-tests.factor index 3e5bab9ac6..fc10a13659 100644 --- a/extra/poker/poker-tests.factor +++ b/extra/poker/poker-tests.factor @@ -1,4 +1,5 @@ -USING: accessors kernel math.order poker poker.private tools.test ; +USING: accessors kernel math math.order poker poker.private +tools.test ; IN: poker.tests [ 134236965 ] [ "KD" >ckf ] unit-test diff --git a/extra/poker/poker.factor b/extra/poker/poker.factor index 9c68aaaa97..59f50509e4 100644 --- a/extra/poker/poker.factor +++ b/extra/poker/poker.factor @@ -260,5 +260,8 @@ ERROR: bad-suit-symbol ch ; : value>hand-name ( value -- string ) value>rank VALUE_STR nth ; +: string>hand-name ( string -- string' ) + string>value value>hand-name ; + SYNTAX: HAND{ "}" parse-tokens [ card> ] { } map-as suffix! ;