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.
30 lines
664 B
30 lines
664 B
package pokercore
|
|
|
|
import "github.com/stretchr/testify/assert"
|
|
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♥"
|
|
assert.Equal(t, cards.String(), expected)
|
|
|
|
x := d.Remaining()
|
|
assert.Equal(t, 45, x)
|
|
|
|
d.ShuffleDeterministically(123456789)
|
|
cards = d.Deal(10)
|
|
expected = "2♣,T♠,4♥,Q♣,9♦,7♥,7♠,6♥,5♥,5♠"
|
|
assert.Equal(t, expected, cards.String())
|
|
x = d.Remaining()
|
|
assert.Equal(t, 42, x)
|
|
|
|
}
|
|
|