package
Version:
v1.1.1
Opens a new window with list of versions in this module.
Published: May 31, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package testing provides simple assertion tools for writing unit tests.
-
func Assert(tb t.TB, condition bool, msg string, v ...interface{})
-
func Equals(tb t.TB, exp, act interface{})
-
func NotEquals(tb t.TB, exp, act interface{})
-
func Ok(tb t.TB, err error)
-
func Panic(tb t.TB, fn func()) (err interface{})
-
func RunAndRequireCoverage(m *t.M, minimumCoverage float64)
func Assert(tb t.TB, condition bool, msg string, v ...interface{})
Fails the test if the condition is false.
func Equals(tb t.TB, exp, act interface{})
Equals fails the test if exp is not equal to act.
func NotEquals(tb t.TB, exp, act interface{})
NotEquals fails the test if exp is equal to act.
Ok fails the test if an err is not nil.
func Panic(tb t.TB, fn func()) (err interface{})
Panic fails the test if function does not panic. Returns the panic.
func RunAndRequireCoverage(m *t.M, minimumCoverage float64)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.