mirror of
https://github.com/restic/restic.git
synced 2024-09-08 20:39:25 +02:00
20 lines
346 B
Go
20 lines
346 B
Go
|
// +build !go1.9
|
||
|
|
||
|
package test
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
// Helperer marks the current function as a test helper.
|
||
|
type Helperer interface {
|
||
|
Helper()
|
||
|
}
|
||
|
|
||
|
type fakeHelper struct{}
|
||
|
|
||
|
func (fakeHelper) Helper() {}
|
||
|
|
||
|
// Helper returns a function that marks the current function as a helper function.
|
||
|
func Helper(t testing.TB) Helperer {
|
||
|
return fakeHelper{}
|
||
|
}
|