fntesting

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package fntesting is an experimental package provided some testing utilities for Seqs.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Suite

type Suite[S any] struct {
	// contains filtered or unexported fields
}

func SuiteOf

func SuiteOf[S any](t *testing.T, createSeq func() seq.Seq[S]) Suite[S]

func (Suite[S]) Is

func (ts Suite[S]) Is(ss ...S)

func (Suite[S]) IsEmpty

func (ts Suite[S]) IsEmpty()

func (Suite[S]) WithEqual

func (ts Suite[S]) WithEqual(eq func(s1, s2 S) bool) Suite[S]

type TestOpt

type TestOpt[S comparable] struct {
	// contains filtered or unexported fields
}

func OptOf

func OptOf[S comparable](t *testing.T, opt opt.Opt[S]) TestOpt[S]

func (TestOpt[S]) Is

func (to TestOpt[S]) Is(s S)

func (TestOpt[S]) IsEmpty

func (to TestOpt[S]) IsEmpty()

func (TestOpt[S]) IsError added in v0.2.0

func (to TestOpt[S]) IsError(expectErr any)

type TestSeq

type TestSeq[S comparable] struct {
	// contains filtered or unexported fields
}

func TestOf

func TestOf[S comparable](t *testing.T, seq seq.Seq[S]) TestSeq[S]

func (TestSeq[S]) Is

func (ts TestSeq[S]) Is(ss ...S)

func (TestSeq[S]) IsEmpty

func (ts TestSeq[S]) IsEmpty()

func (TestSeq[S]) LenIs

func (ts TestSeq[S]) LenIs(n int)

Jump to

Keyboard shortcuts

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