test

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 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{})

Assert compare two interfaces: `exp` and `got` for equality. If both parameters are not equal, the function will call Fatalf that describe the position (type and value) where value are not matched.

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

WARNING: this method does not support recursive pointer, for example a node that point to parent and parent that point back to node again.

func AssertBench

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

AssertBench will compare two interfaces: `exp` and `got` for equality. If both parameters are not equal, the function will call Fatalf that describe the position (type and value) where value are not matched.

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