condition

package
v0.0.0-...-6789dc4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: GPL-3.0, GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package condition implements a strategy family for use in testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chain

func Chain(args ...interface{}) *chain

Chain(n1, cond1, n2, cond2, ...) returns cond1.OK() the first n1 times OK() is called, cond2.OK() the following n2 times, etc.

func Fail2Work

func Fail2Work(left int32) *fail2Work

Fail2Work fails for the first n times its OK() method is checked, and then mysteriously starts working.

func Not

func Not(sub Interface) *not

Not builds a condition that negates the one passed in.

func Work

func Work(wk bool) work

Work is a simple boolean condition; either it works all the time (when true), or it fails all the time (when false).

Types

type Interface

type Interface interface {
	OK() bool
	String() string
}

Jump to

Keyboard shortcuts

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