testing

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package testing provides simple assertion tools for writing unit tests.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(tb t.TB, condition bool, msg string, v ...interface{})

Fails the test if the condition is false.

func Equals

func Equals(tb t.TB, exp, act interface{})

Equals fails the test if exp is not equal to act.

func NotEquals

func NotEquals(tb t.TB, exp, act interface{})

NotEquals fails the test if exp is equal to act.

func Ok

func Ok(tb t.TB, err error)

Ok fails the test if an err is not nil.

func Panic

func Panic(tb t.TB, fn func()) (err interface{})

Panic fails the test if function does not panic. Returns the panic.

func RunAndRequireCoverage

func RunAndRequireCoverage(m *t.M, minimumCoverage float64)

Types

This section is empty.

Jump to

Keyboard shortcuts

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