mirror of
https://github.com/cwinfo/matterbridge.git
synced 2025-07-01 15:56:19 +00:00
Update dependencies (#1851)
This commit is contained in:
2
vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go
generated
vendored
2
vendor/github.com/stretchr/testify/assert/assertion_compare_can_convert.go
generated
vendored
@ -9,7 +9,7 @@ package assert
|
||||
|
||||
import "reflect"
|
||||
|
||||
// Wrapper around reflect.Value.CanConvert, for compatability
|
||||
// Wrapper around reflect.Value.CanConvert, for compatibility
|
||||
// reasons.
|
||||
func canConvert(value reflect.Value, to reflect.Type) bool {
|
||||
return value.CanConvert(to)
|
||||
|
10
vendor/github.com/stretchr/testify/suite/suite.go
generated
vendored
10
vendor/github.com/stretchr/testify/suite/suite.go
generated
vendored
@ -7,6 +7,7 @@ import (
|
||||
"reflect"
|
||||
"regexp"
|
||||
"runtime/debug"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@ -21,17 +22,22 @@ var matchMethod = flag.String("testify.m", "", "regular expression to select tes
|
||||
// retrieving the current *testing.T context.
|
||||
type Suite struct {
|
||||
*assert.Assertions
|
||||
mu sync.RWMutex
|
||||
require *require.Assertions
|
||||
t *testing.T
|
||||
}
|
||||
|
||||
// T retrieves the current *testing.T context.
|
||||
func (suite *Suite) T() *testing.T {
|
||||
suite.mu.RLock()
|
||||
defer suite.mu.RUnlock()
|
||||
return suite.t
|
||||
}
|
||||
|
||||
// SetT sets the current *testing.T context.
|
||||
func (suite *Suite) SetT(t *testing.T) {
|
||||
suite.mu.Lock()
|
||||
defer suite.mu.Unlock()
|
||||
suite.t = t
|
||||
suite.Assertions = assert.New(t)
|
||||
suite.require = require.New(t)
|
||||
@ -39,6 +45,8 @@ func (suite *Suite) SetT(t *testing.T) {
|
||||
|
||||
// Require returns a require context for suite.
|
||||
func (suite *Suite) Require() *require.Assertions {
|
||||
suite.mu.Lock()
|
||||
defer suite.mu.Unlock()
|
||||
if suite.require == nil {
|
||||
suite.require = require.New(suite.T())
|
||||
}
|
||||
@ -51,6 +59,8 @@ func (suite *Suite) Require() *require.Assertions {
|
||||
// assert.Assertions with require.Assertions), this method is provided so you
|
||||
// can call `suite.Assert().NoError()`.
|
||||
func (suite *Suite) Assert() *assert.Assertions {
|
||||
suite.mu.Lock()
|
||||
defer suite.mu.Unlock()
|
||||
if suite.Assertions == nil {
|
||||
suite.Assertions = assert.New(suite.T())
|
||||
}
|
||||
|
Reference in New Issue
Block a user