Discover Packages
github.com/ssdev-go/moby
pkg
testutil
assert
package
Version:
v1.13.1-rc2
Opens a new window with list of versions in this module.
Published: Feb 6, 2017
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0 modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
Jump to ...
Documentation
Overview
Index
Constants
Variables
Functions
Contains(t, actual, contains)
DeepEqual(t, actual, expected)
Equal(t, actual, expected)
EqualStringSlice(t, actual, expected)
Error(t, err, contains)
NilError(t, err)
NotNil(t, obj)
Types
Source Files
Documentation
Documentation
¶
Package assert contains functions for making assertions in unit tests
func Contains(t TestingT, actual, contains string)
func DeepEqual(t TestingT, actual, expected interface{})
func Equal(t TestingT, actual, expected interface{})
func EqualStringSlice(t TestingT, actual, expected []string)
func Error(t TestingT, err error, contains string)
func NilError(t TestingT, err error)
func NotNil(t TestingT, obj interface{})
type TestingT
Contains asserts that the string contains a substring, otherwise it fails the
test.
func DeepEqual(t TestingT , actual, expected interface{})
DeepEqual compare the actual value to the expected value and fails the test if
they are not "deeply equal".
func Equal(t TestingT , actual, expected interface{})
Equal compare the actual value to the expected value and fails the test if
they are not equal.
EqualStringSlice compares two slices and fails the test if they do not contain
the same items.
Error asserts that error is not nil, and contains the expected text,
otherwise it fails the test.
NilError asserts that the error is nil, otherwise it fails the test.
func NotNil(t TestingT , obj interface{})
NotNil fails the test if the object is nil
type TestingT interface {
Fatalf(string , ...interface{})
}
TestingT is an interface which defines the methods of testing.T that are
required by this package
Source Files
¶
Click to show internal directories.
Click to hide internal directories.