Files
rands/bytes_test.go
Jim Myhrberg b59d421322 chore(test): enable parallel test execution
Seems to cut overall total test time down to one third the time.
2021-12-16 20:16:03 +00:00

30 lines
432 B
Go

package rands
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestBytes(t *testing.T) {
t.Parallel()
for _, tt := range testCases {
t.Run(tt.name, func(t *testing.T) {
got, _ := Bytes(tt.n)
assert.Len(t, got, tt.n)
})
}
}
func BenchmarkBytes(b *testing.B) {
for _, tt := range testCases {
b.Run(tt.name, func(b *testing.B) {
for n := 0; n < b.N; n++ {
_, _ = Bytes(tt.n)
}
})
}
}