cfd4go

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MIT Imports: 1 Imported by: 0

README

cfd4go

Contract-First development support library for golang

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExpect = errors.New("Precondition check error", errors.WithVendor(errVendor), errors.WithCode(-1))
	ErrEnsure = errors.New("Aftercondition check error", errors.WithVendor(errVendor), errors.WithCode(-2))
	ErrAssert = errors.New("Condition check error", errors.WithVendor(errVendor), errors.WithCode(-3))
)

errors

Functions

func Assert

func Assert(condition bool, msg string)

func Ensure

func Ensure(checker ConditionChecker)

func Expect

func Expect(checker ConditionChecker) (err error)

Expect

func ExpectPanic

func ExpectPanic(checker ConditionChecker)

ExpectPanic ...

Types

type Asserter

type Asserter func(bool, string)

type ConditionChecker

type ConditionChecker func(assert Asserter)

Jump to

Keyboard shortcuts

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