testing/fixtures/fixtures.go.

74 lines
883 B
Plaintext
Raw Normal View History

2024-05-08 21:32:31 +00:00
// Copyright 2024 Matthew Rich <matthewrich.conf@gmail.com>. All rights reserved.
package fixtures
import (
"testing"
)
type Test func(t *testing.T)
// Read fixture data
// RunWith test
type FRunner interface {
Read() interface{}
RunWith(Test)
}
type F struct {
*testing.T
Init *struct
}
func New(i interface{}) *F {
return &F{ t, Init: i }
}
func (f *F) Read() interface{} {
}
func (f *F) RunWith(t Test) {
}
/*
Test(t *testing.T) {
f = Fix{t}
f.GetData
for x in range(data) {
f.RunWith(func
t.Run(name, subtest)
}
}
Fixtures
{ input, output },
{ input1, output1 },
Fixture.RunWith(Test { })
type Test func(t *testing.T)
type Fixture func(f *F) interface{}
func FixtureFoo() interface{} {
os.Open(
}
func TestWith() {
}
func (f Test) RunWith(t *testing.T, f []Fixture) {
for d := range(f) {
t.Run(name, f)
// Run subtest
t.Run()
}
*/