mirror of
https://github.com/stretchr/testify.git
synced 2025-09-04 19:35:26 +00:00
Add build tag testify_no_objx to allow to exclude method Mock.TestData() for avoiding dependency on github.com/stretchr/objx.
22 lines
573 B
Go
22 lines
573 B
Go
// This source file isolates the uses of the objx module to ease
|
|
// maintenance of downstream forks that remove that dependency.
|
|
// See https://github.com/stretchr/testify/issues/1752
|
|
|
|
//go:build !testify_no_objx && !testify_no_deps
|
|
|
|
package mock
|
|
|
|
import "github.com/stretchr/objx"
|
|
|
|
type testData = objx.Map
|
|
|
|
// TestData holds any data that might be useful for testing. Testify ignores
|
|
// this data completely allowing you to do whatever you like with it.
|
|
func (m *Mock) TestData() objx.Map {
|
|
if m.testData == nil {
|
|
m.testData = make(objx.Map)
|
|
}
|
|
|
|
return m.testData
|
|
}
|