mirror of https://github.com/stretchr/testify.git
parent
a409ccf19e
commit
106ec21d14
|
@ -22,15 +22,15 @@ var matchMethod = flag.String("testify.m", "", "regular expression to select tes
|
||||||
// retrieving the current *testing.T context.
|
// retrieving the current *testing.T context.
|
||||||
type Suite struct {
|
type Suite struct {
|
||||||
*assert.Assertions
|
*assert.Assertions
|
||||||
mu sync.Mutex
|
mu sync.RWMutex
|
||||||
require *require.Assertions
|
require *require.Assertions
|
||||||
t *testing.T
|
t *testing.T
|
||||||
}
|
}
|
||||||
|
|
||||||
// T retrieves the current *testing.T context.
|
// T retrieves the current *testing.T context.
|
||||||
func (suite *Suite) T() *testing.T {
|
func (suite *Suite) T() *testing.T {
|
||||||
suite.mu.Lock()
|
suite.mu.RLock()
|
||||||
defer suite.mu.Unlock()
|
defer suite.mu.RUnlock()
|
||||||
return suite.t
|
return suite.t
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue