asserter

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package asserter defines the default interface between the testing package and the evaluation of predicates during testing

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*opts)

Option is passed to New() to configure assertion handling

func AbortOnError

func AbortOnError() Option

AbortOnError tells the asserter wether or not to fail

type T

type T interface {

	// That verifies that a value matches a predicate, and outputs detail
	// information in case of a failure or error. Additional details can be
	// passed in as a format string and arguments, or just a list of arguments.
	That(v interface{}, p predicate.T, details ...interface{})
}

T is a wrapper around a testing interface that can verify predicates and display failure reasons on error

func New

func New(t ctx, option ...Option) T

New return an implementation of the T interface wrapping a testing.T context

Jump to

Keyboard shortcuts

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