Documentation ¶
Overview ¶
Package slicetest provides utilities for testing Bigslice user code. The utilities here are generally not optimized for performance or robustness; they are strictly intended for unit testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
Print prints slice to stdout in a deterministic order. This is useful for use in slice function examples, as we can rely on the deterministic order in our expected output. Print uses local evaluation, so all user functions are executed within the same process. This makes it safe and convenient to use shared memory in slice operations.
func Run ¶
Run evaluates the provided slice in local execution mode, returning a scanner for the result. Errors are reported as fatal to the provided t instance. Run is intended for unit testing of Slice implementations.
func RunAndScan ¶
RunAndScan evaluates the provided slice and scans its results into the provided slice pointers. Errors are reported as fatal to the provided t instance.
func RunErr ¶
RunErr evaluates the provided slice in local execution mode and returns the error, if any.
func ScanAll ¶
ScanAll scans all entries from the scanner into the provided columns, which must be pointers to slices of the correct column types. For example, to read all values for a Slice<int, string>:
var ( ints []int strings []string ) ScanAll(test, scan, &ints, &strings)
Errors are reported as fatal to the provided t instance.
Types ¶
This section is empty.