mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
18 lines
341 B
Go
18 lines
341 B
Go
|
package math_test
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"github.com/MontFerret/ferret/pkg/stdlib/math"
|
||
|
. "github.com/smartystreets/goconvey/convey"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestRand(t *testing.T) {
|
||
|
Convey("Should return pseudo-random value", t, func() {
|
||
|
out, err := math.Rand(context.Background())
|
||
|
|
||
|
So(err, ShouldBeNil)
|
||
|
So(out, ShouldBeLessThan, 1)
|
||
|
})
|
||
|
}
|