package
Version:
v0.0.5
Opens a new window with list of versions in this module.
Published: Nov 2, 2020
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 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
-
func Assert(tb TB, condition bool, format string, a ...interface{})
-
func Equals(tb TB, exp, act interface{}, msgAndArgs ...interface{})
-
func ErrorEqual(tb TB, left, right error, msgAndArgs ...interface{})
-
func NotOk(tb TB, err error, a ...interface{})
-
func Ok(tb TB, err error)
-
type TB
func Assert(tb TB, condition bool, format string, a ...interface{})
Assert fails the test if the condition is false.
func Equals(tb TB, exp, act interface{}, msgAndArgs ...interface{})
Equals fails the test if exp is not equal to act.
func ErrorEqual(tb TB, left, right error, msgAndArgs ...interface{})
ErrorEqual compares Go errors for equality.
func NotOk(tb TB, err error, a ...interface{})
NotOk fails the test if an err is nil.
Ok fails the test if an err is not nil.
type TB interface {
Helper()
Fatalf(string, ...interface{})
}
TB interface to testing.{T,B}.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.