test

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package test provides ready to use test functions. It makes test functions more readable

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIsErr

func CheckIsErr(tb testing.TB, err error, msg string)

CheckIsErr fails if err ==nil. Print msg as an error message.

func CheckNoErr

func CheckNoErr(tb testing.TB, err error, msg string)

CheckNoErr fails if err !=nil. Print msg as an error message.

func CheckOk

func CheckOk(tb testing.TB, result bool, msg string)

CheckOk fails the test if result == false.

func CheckPanic

func CheckPanic(f func()) error

CheckPanic returns true if call to function 'f' caused panic.

func Report

func Report(tb testing.TB, got, want interface{}, inputs ...interface{})

Report reports an error if got is different from want.

Types

This section is empty.

Jump to

Keyboard shortcuts

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