Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
4b185af6
Commit
4b185af6
authored
7 years ago
by
Alex Dadgar
Browse files
Options
Download
Email Patches
Plain Diff
add require
parent
8445a6be
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
vendor/github.com/stretchr/testify/require/doc.go
+28
-0
vendor/github.com/stretchr/testify/require/doc.go
vendor/github.com/stretchr/testify/require/forward_requirements.go
+16
-0
...thub.com/stretchr/testify/require/forward_requirements.go
vendor/github.com/stretchr/testify/require/require.go
+911
-0
vendor/github.com/stretchr/testify/require/require.go
vendor/github.com/stretchr/testify/require/require.go.tmpl
+6
-0
vendor/github.com/stretchr/testify/require/require.go.tmpl
vendor/github.com/stretchr/testify/require/require_forward.go
+747
-0
...or/github.com/stretchr/testify/require/require_forward.go
vendor/github.com/stretchr/testify/require/require_forward.go.tmpl
+4
-0
...thub.com/stretchr/testify/require/require_forward.go.tmpl
vendor/github.com/stretchr/testify/require/requirements.go
+9
-0
vendor/github.com/stretchr/testify/require/requirements.go
vendor/vendor.json
+1
-0
vendor/vendor.json
with
1722 additions
and
0 deletions
+1722
-0
vendor/github.com/stretchr/testify/require/doc.go
0 → 100644
+
28
-
0
View file @
4b185af6
// 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
This diff is collapsed.
Click to expand it.
vendor/github.com/stretchr/testify/require/forward_requirements.go
0 → 100644
+
16
-
0
View file @
4b185af6
package
require
// Assertions provides assertion methods around the
// TestingT interface.
type
Assertions
struct
{
t
TestingT
}
// New makes a new Assertions object for the specified TestingT.
func
New
(
t
TestingT
)
*
Assertions
{
return
&
Assertions
{
t
:
t
,
}
}
//go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl -include-format-funcs
This diff is collapsed.
Click to expand it.
vendor/github.com/stretchr/testify/require/require.go
0 → 100644
+
911
-
0
View file @
4b185af6
This diff is collapsed.
Click to expand it.
vendor/github.com/stretchr/testify/require/require.go.tmpl
0 → 100644
+
6
-
0
View file @
4b185af6
{{.Comment}}
func {{.DocInfo.Name}}(t TestingT, {{.Params}}) {
if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) {
t.FailNow()
}
}
This diff is collapsed.
Click to expand it.
vendor/github.com/stretchr/testify/require/require_forward.go
0 → 100644
+
747
-
0
View file @
4b185af6
This diff is collapsed.
Click to expand it.
vendor/github.com/stretchr/testify/require/require_forward.go.tmpl
0 → 100644
+
4
-
0
View file @
4b185af6
{{.CommentWithoutT "a"}}
func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) {
{{.DocInfo.Name}}(a.t, {{.ForwardedParams}})
}
This diff is collapsed.
Click to expand it.
vendor/github.com/stretchr/testify/require/requirements.go
0 → 100644
+
9
-
0
View file @
4b185af6
package
require
// TestingT is an interface wrapper around *testing.T
type
TestingT
interface
{
Errorf
(
format
string
,
args
...
interface
{})
FailNow
()
}
//go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl -include-format-funcs
This diff is collapsed.
Click to expand it.
vendor/vendor.json
+
1
-
0
View file @
4b185af6
...
...
@@ -232,6 +232,7 @@
{
"path"
:
"github.com/spf13/pflag"
,
"checksumSHA1"
:
"Q52Y7t0lEtk/wcDn5q7tS7B+jqs="
,
"revision"
:
"7aff26db30c1be810f9de5038ec5ef96ac41fd7c"
,
"revisionTime"
:
"2017-08-24T17:57:12Z"
},
{
"path"
:
"github.com/stretchr/objx"
,
"checksumSHA1"
:
"K0crHygPTP42i1nLKWphSlvOQJw="
,
"revision"
:
"1a9d0bb9f541897e62256577b352fdbc1fb4fd94"
,
"revisionTime"
:
"2015-09-28T12:21:52Z"
},
{
"path"
:
"github.com/stretchr/testify/mock"
,
"checksumSHA1"
:
"o+jsS/rxceTym4M3reSPfrPxaio="
,
"revision"
:
"f6abca593680b2315d2075e0f5e2a9751e3f431a"
,
"revisionTime"
:
"2017-06-01T20:57:54Z"
},
{
"path"
:
"github.com/stretchr/testify/require"
,
"checksumSHA1"
:
"7vs6dSc1PPGBKyzb/SCIyeMJPLQ="
,
"revision"
:
"f6abca593680b2315d2075e0f5e2a9751e3f431a"
,
"revisionTime"
:
"2017-06-01T20:57:54Z"
},
{
"path"
:
"github.com/ugorji/go/codec"
,
"checksumSHA1"
:
"8G1zvpE4gTtWQRuP/x2HPVDmflo="
,
"revision"
:
"0053ebfd9d0ee06ccefbfe17072021e1d4acebee"
,
"revisionTime"
:
"2017-06-20T06:01:02Z"
},
{
"path"
:
"github.com/ugorji/go/codec/codecgen"
,
"checksumSHA1"
:
"OgParimNuU2CJqr3pcTympeQZUc="
,
"revision"
:
"5efa3251c7f7d05e5d9704a69a984ec9f1386a40"
,
"revisionTime"
:
"2017-06-20T10:48:52Z"
},
{
"path"
:
"github.com/ulikunitz/xz"
,
"checksumSHA1"
:
"z2kAtVle4NFV2OExI85fZoTcsI4="
,
"revision"
:
"0c6b41e72360850ca4f98dc341fd999726ea007f"
,
"revisionTime"
:
"2017-06-05T21:53:11Z"
},
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment