test

package
v0.0.0-...-f003305 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package test provides utilities for testing. Do not import this into non-test code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecEq

func DecEq(x decimal.Decimal) gomock.Matcher

DecEq returns a matcher that matches a decimal.Decimal of equal value.

func RandomInt

func RandomInt() int

RandomInt return a random int up to math.MaxInt32.

func RandomIntWithMax

func RandomIntWithMax(max int) int

RandomIntWithMax returns a random int in range [0, max].

func RandomNonZeroInt

func RandomNonZeroInt(max int) int

RandomNonZeroInt return a random nonzero int up to the supplied max.

func RandomString

func RandomString() string

RandomString return a random alphanumeric string with length 10.

func RandomStringWithLen

func RandomStringWithLen(length int) string

RandomStringWithLen returns a random alphanumeric string with a specified length.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL