test

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2020 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package test provide library for helping with testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(t *testing.T, name string, exp, got interface{}, equal bool)

Assert will compare two interfaces: `exp` and `got` whether its same with `equal` value.

If `exp` implement the extended `reflect.Equaler`, then it will use the method `IsEqual()` with `got` as parameter.

If comparison result is not same with `equal`, it will print the result and expectation and then terminate the test routine.

func AssertBench

func AssertBench(b *testing.B, name string, exp, got interface{}, equal bool)

AssertBench will compare two interfaces: `exp` and `got` whether its same with `equal` value.

If comparison result is not same with `equal`, it will print the result and expectation and then terminate the test routine.

Types

This section is empty.

Directories

Path Synopsis
Package mock provide a mocking for standard output and standard error.
Package mock provide a mocking for standard output and standard error.

Jump to

Keyboard shortcuts

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