clone supplied test values when running setup
parent
6ef7afe907
commit
2853ecfb38
@ -1,7 +1,20 @@
|
||||
package tea
|
||||
|
||||
import "testing"
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type Test interface {
|
||||
Run(*testing.T)
|
||||
}
|
||||
|
||||
func fail(t string, args ...interface{}) Test {
|
||||
return failure{cause: fmt.Errorf(t, args...)}
|
||||
}
|
||||
|
||||
type failure struct {
|
||||
cause error
|
||||
}
|
||||
|
||||
func (f failure) Run(t *testing.T) { t.Error(f.cause.Error()) }
|
||||
|
Loading…
Reference in New Issue