Fixed unit test for problem #837

This commit is contained in:
2026-03-16 21:24:22 +01:00
parent aa2b2e9163
commit 16a981f6df
2 changed files with 4 additions and 4 deletions

View File

@@ -1,12 +1,13 @@
package main
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestNew21Game(t *testing.T) {
assert.Equal(t, 1.0, New21Game(10, 1, 10))
assert.InDelta(t, 1.0, New21Game(10, 1, 10), 0.00001)
assert.Equal(t, 0.6, New21Game(6, 1, 10))
assert.Equal(t, 0.73278, New21Game(21, 17, 10))
assert.InDelta(t, 0.73278, New21Game(21, 17, 10), 0.00001)
}

View File

@@ -1,5 +1,4 @@
package main
func main() {
}