Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
070691c2
Commit
070691c2
authored
Feb 26, 2019
by
Andrew Newdigate
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add testify/require to vendored packages
parent
b34a88ce
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
2274 additions
and
0 deletions
+2274
-0
go/vendor/github.com/stretchr/testify/require/doc.go
go/vendor/github.com/stretchr/testify/require/doc.go
+28
-0
go/vendor/github.com/stretchr/testify/require/forward_requirements.go
...thub.com/stretchr/testify/require/forward_requirements.go
+16
-0
go/vendor/github.com/stretchr/testify/require/require.go
go/vendor/github.com/stretchr/testify/require/require.go
+1227
-0
go/vendor/github.com/stretchr/testify/require/require.go.tmpl
...endor/github.com/stretchr/testify/require/require.go.tmpl
+6
-0
go/vendor/github.com/stretchr/testify/require/require_forward.go
...or/github.com/stretchr/testify/require/require_forward.go
+957
-0
go/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl
...thub.com/stretchr/testify/require/require_forward.go.tmpl
+5
-0
go/vendor/github.com/stretchr/testify/require/requirements.go
...endor/github.com/stretchr/testify/require/requirements.go
+29
-0
go/vendor/vendor.json
go/vendor/vendor.json
+6
-0
No files found.
go/vendor/github.com/stretchr/testify/require/doc.go
0 → 100644
View file @
070691c2
// 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
go/vendor/github.com/stretchr/testify/require/forward_requirements.go
0 → 100644
View file @
070691c2
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
go/vendor/github.com/stretchr/testify/require/require.go
0 → 100644
View file @
070691c2
This diff is collapsed.
Click to expand it.
go/vendor/github.com/stretchr/testify/require/require.go.tmpl
0 → 100644
View file @
070691c2
{{.Comment}}
func {{.DocInfo.Name}}(t TestingT, {{.Params}}) {
if assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { return }
if h, ok := t.(tHelper); ok { h.Helper() }
t.FailNow()
}
go/vendor/github.com/stretchr/testify/require/require_forward.go
0 → 100644
View file @
070691c2
This diff is collapsed.
Click to expand it.
go/vendor/github.com/stretchr/testify/require/require_forward.go.tmpl
0 → 100644
View file @
070691c2
{{.CommentWithoutT "a"}}
func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) {
if h, ok := a.t.(tHelper); ok { h.Helper() }
{{.DocInfo.Name}}(a.t, {{.ForwardedParams}})
}
go/vendor/github.com/stretchr/testify/require/requirements.go
0 → 100644
View file @
070691c2
package
require
// TestingT is an interface wrapper around *testing.T
type
TestingT
interface
{
Errorf
(
format
string
,
args
...
interface
{})
FailNow
()
}
type
tHelper
interface
{
Helper
()
}
// ComparisonAssertionFunc is a common function prototype when comparing two values. Can be useful
// for table driven tests.
type
ComparisonAssertionFunc
func
(
TestingT
,
interface
{},
interface
{},
...
interface
{})
// ValueAssertionFunc is a common function prototype when validating a single value. Can be useful
// for table driven tests.
type
ValueAssertionFunc
func
(
TestingT
,
interface
{},
...
interface
{})
// BoolAssertionFunc is a common function prototype when validating a bool value. Can be useful
// for table driven tests.
type
BoolAssertionFunc
func
(
TestingT
,
bool
,
...
interface
{})
// ErrorAssertionFunc is a common function prototype when validating an error value. Can be useful
// for table driven tests.
type
ErrorAssertionFunc
func
(
TestingT
,
error
,
...
interface
{})
//go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl -include-format-funcs
go/vendor/vendor.json
View file @
070691c2
...
...
@@ -155,6 +155,12 @@
"revision"
:
"865fb2c8f5af9ccbaaadfd20d18236358dccaaff"
,
"revisionTime"
:
"2018-09-01T16:25:39Z"
},
{
"checksumSHA1"
:
"3DvkGtpbJW8oXepRr3wYSs72LmQ="
,
"path"
:
"github.com/stretchr/testify/require"
,
"revision"
:
"865fb2c8f5af9ccbaaadfd20d18236358dccaaff"
,
"revisionTime"
:
"2018-09-01T16:25:39Z"
},
{
"checksumSHA1"
:
"XqGf8TvdzfKDhkE+HDZAT7RlERU="
,
"path"
:
"github.com/tinylib/msgp/msgp"
,
...
...
Write
Preview
Markdown
is supported
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