fixture

package
v0.0.0-...-64f2fc3 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Copyright 2024 Matthew Rich <[email protected]>. All rights reserved.

Copyright 2024 Matthew Rich <[email protected]>. All rights reserved.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type F

type F func(p Param) interface{}

type Ft

type Ft struct {
	*testing.T
	// contains filtered or unexported fields
}

func New

func New(t *testing.T, f F, p ParamReader, r ResultReader) *Ft

func (*Ft) Assert

func (f *Ft) Assert()

func (*Ft) AssertEq

func (f *Ft) AssertEq(value interface{})

func (*Ft) AssertGe

func (f *Ft) AssertGe(value interface{})

func (*Ft) AssertGt

func (f *Ft) AssertGt(value interface{})

func (*Ft) AssertLe

func (f *Ft) AssertLe(value interface{})

func (*Ft) AssertLt

func (f *Ft) AssertLt(value interface{})

func (*Ft) AssertStrEq

func (f *Ft) AssertStrEq(value string)

func (*Ft) Fixture

func (f *Ft) Fixture() []interface{}

func (*Ft) Result

func (f *Ft) Result() interface{}

func (*Ft) RunWith

func (f *Ft) RunWith(t Test)

func (*Ft) Value

func (f *Ft) Value() interface{}

type Param

type Param interface{}

Fixture params are a list of values used to initialize a fixture

type ParamReader

type ParamReader interface {
	Values() []Param
	Read() <-chan Param
}

type Parameters

type Parameters struct {
	// contains filtered or unexported fields
}

func P

func P(v []Param) *Parameters

initialize parameters from a slice

func (*Parameters) Read

func (p *Parameters) Read() <-chan Param

func (*Parameters) Values

func (p *Parameters) Values() []Param

type Result

type Result interface{}

type ResultReader

type ResultReader interface {
	Values() []Result
	Read() <-chan Result
}

type Results

type Results struct {
	// contains filtered or unexported fields
}

func R

func R(v []Result) *Results

func (*Results) Read

func (r *Results) Read() <-chan Result

func (*Results) Values

func (r *Results) Values() []Result

type Test

type Test func(t *testing.T)

Jump to

Keyboard shortcuts

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