test

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package test utils for test Copyright (C) 2020 to All Authors. all rights reserved. Author Ron Date 2020/09/19 22:18:39 Version 1.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(tb TB, condition bool, format string, a ...interface{})

Assert fails the test if the condition is false.

func Equals

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

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

func ErrorEqual

func ErrorEqual(tb TB, left, right error, msgAndArgs ...interface{})

ErrorEqual compares Go errors for equality.

func NotOk

func NotOk(tb TB, err error, a ...interface{})

NotOk fails the test if an err is nil.

func Ok

func Ok(tb TB, err error)

Ok fails the test if an err is not nil.

Types

type TB

type TB interface {
	Helper()
	Fatalf(string, ...interface{})
}

TB interface to testing.{T,B}.

Jump to

Keyboard shortcuts

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