28 lines
415 B
Go
28 lines
415 B
Go
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
|
|
|
|
|
|
package fixtures
|
|
|
|
/*
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
type Test func(t *testing.T)
|
|
|
|
type Tester interface {
|
|
Test(t *testing.T)
|
|
RunWith(t *testing.T, f []Ft)
|
|
}
|
|
|
|
func (tf Test) Test(t *testing.T) {
|
|
tf(t)
|
|
}
|
|
|
|
func (tf Test) RunWith(t *testing.T, f []Ft) {
|
|
for i, fixture := range(f) {
|
|
t.Run(t.Name() + strconv.Itoa(i), tf)
|
|
}
|
|
}
|
|
*/
|