You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
go-poker/pokercore/pokercore_test.go

27 lines
543 B

package pokercore
import "testing"
type ShuffleTestResults []struct {
SeedVal int64
Expected string
}
func TestPokerHand(t *testing.T) {
//test stuff here
d := NewDeck()
d.ShuffleDeterministically(437)
cards := d.Deal(7)
//expected := "7C,5S,QS,2D,6D,QC,3H"
expected := "7♣,5♠,Q♠,2♦,6♦,Q♣,3♥"
if s := cards.String(); s != expected {
t.Errorf("didn't get expected cards, got %s", s)
} else {
t.Logf("got expected cards %s", s)
}
x := d.Remaining()
if x != 45 {
t.Errorf("expected 45 left, got %d", x)
}
}