diff options
author | Miloslav Trmač <mitr@redhat.com> | 2018-07-19 02:30:33 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-07-19 16:12:49 +0000 |
commit | c020db8cd21cb221cfbe36b264e0ec02999596ed (patch) | |
tree | 4c841f45838a20d21f64c3d2c29c530ef2a5cc88 /vendor/github.com/stretchr/testify/require/doc.go | |
parent | cedb4576a4481bc45b0008e7a0c8da0a1f8f858f (diff) | |
download | podman-c020db8cd21cb221cfbe36b264e0ec02999596ed.tar.gz podman-c020db8cd21cb221cfbe36b264e0ec02999596ed.tar.bz2 podman-c020db8cd21cb221cfbe36b264e0ec02999596ed.zip |
Abort a test on nil containers, so that future tests don't panic
Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Closes: #1111
Approved by: baude
Diffstat (limited to 'vendor/github.com/stretchr/testify/require/doc.go')
-rw-r--r-- | vendor/github.com/stretchr/testify/require/doc.go | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/vendor/github.com/stretchr/testify/require/doc.go b/vendor/github.com/stretchr/testify/require/doc.go new file mode 100644 index 000000000..169de3922 --- /dev/null +++ b/vendor/github.com/stretchr/testify/require/doc.go @@ -0,0 +1,28 @@ +// Package require implements the same assertions as the `assert` package but +// stops test execution when a test fails. +// +// Example Usage +// +// The following is a complete example using require in a standard test function: +// import ( +// "testing" +// "github.com/stretchr/testify/require" +// ) +// +// func TestSomething(t *testing.T) { +// +// var a string = "Hello" +// var b string = "Hello" +// +// require.Equal(t, a, b, "The two words should be the same.") +// +// } +// +// Assertions +// +// The `require` package have same global functions as in the `assert` package, +// but instead of returning a boolean result they call `t.FailNow()`. +// +// Every assertion function also takes an optional string message as the final argument, +// allowing custom error messages to be appended to the message the assertion method outputs. +package require |