tests

package
v3.8.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2018 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareTables

func CompareTables(t *testing.T, configs []TableCompareConfig)

CompareTables takes in a config of comparisons and runs them

func Consumed

func Consumed(t *testing.T, table optimus.Table)

Consumed tests that a table has been completely consumed: that is to say, there are no more remaining Rows to read.

func GetRows

func GetRows(table optimus.Table) []optimus.Row

GetRows returns a slice of all the rows in a table

func HasRows

func HasRows(t *testing.T, table optimus.Table, expected int) []optimus.Row

HasRows tests that a table has the correct number of rows, and returns all the rows.

func Stop

func Stop(t *testing.T, table optimus.Table)

Stop tests that a Table correctly implements Stop. It assumes that it is invoked with a newly-created Table.

Types

type TableCompareConfig

type TableCompareConfig struct {
	Name     string
	Source   func() optimus.Table
	Actual   func(optimus.Table, interface{}) optimus.Table
	Expected func(optimus.Table, interface{}) optimus.Table
	Arg      interface{}
	Error    error
}

TableCompareConfig contains a config for comparing two tables in a set of tests

Jump to

Keyboard shortcuts

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