frostfs-sdk-go/accounting/test/decimal.go
Evgenii Stratonikov 3d0df0d068 [#54] tests: unify test generator names
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-12-01 10:34:54 +03:00

16 lines
281 B
Go

package accountingtest
import (
"math/rand"
"github.com/nspcc-dev/neofs-sdk-go/accounting"
)
// Decimal returns random accounting.Decimal.
func Decimal() *accounting.Decimal {
d := accounting.NewDecimal()
d.SetValue(rand.Int63())
d.SetPrecision(rand.Uint32())
return d
}