Discover Packages
github.com/iov-one/weave
weavetest
assert
package
Version:
v1.0.4
Opens a new window with list of versions in this module.
Published: Apr 12, 2020
License: Apache-2.0
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
Documentation
¶
func Equal(t Tester , want, got interface{})
Equal fails the test if two values are not equal.
FieldError ensures that given error contains the exact match of a single
field error, tested by its type (.Is method call).
To test that no error was found for a given field name, use `nil` as the
match value.
IsErr is a convenient helper that checks if the errors are a match
and prints out the difference if not as well as failing the assertion.
func Nil(t Tester , value interface{})
Nil fails the test if given value is not nil.
func Panics(t Tester , fn func())
Panics will run given function and recover any panic. It will fail the test
if given function call did not panic.
type Tester interface {
Helper()
Fatal(...interface{})
Fatalf(string , ...interface{})
}
Tester is the minimal subset of testing.TB needed to run most assert commands
Source Files
¶
Click to show internal directories.
Click to hide internal directories.