utils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConcurrencyTest

func ConcurrencyTest[Value any](t *testing.T, pctx context.Context, cap, n, readers, writers int, factory Factory[Value], gen ElementGenerator[Value], assertor ElementAssertor[Value]) (int64, int64)

func SanityTest

func SanityTest[Value any](t *testing.T, n int, factory Factory[Value], gen ElementGenerator[Value], assertor ElementAssertor[Value])

Types

type ElementAssertor

type ElementAssertor[Value any] func(i int, v Value) bool

type ElementGenerator

type ElementGenerator[Value any] func(i int) Value

type Factory

type Factory[Value any] func() core.Queue[Value]

Factory is a factory function for creating instances of ds

Jump to

Keyboard shortcuts

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