func newInstance(m TestRunner) Runner {
	return &runner{
		m:    m,
		deps: &TestDeps{},
	}
}
make accessible for testing
package runner
import (
	"bytes"
	"fmt"
	"io"
	tdlog "log"
	"os"
	"reflect"
	"regexp"
	"sync"
	"testing"
	"unsafe"
	"github.com/mercari/testdeck/constants"
)
var RealStdout *os.File
var printStdout = true
var printOutputToEventLog = false
var instance Runner
var once sync.Once
var reMatchTag = regexp.MustCompile("^(.*)\x00(.*)$")
var reFilterTags = regexp.MustCompile("\\^.+\x00")
var EnableMatchWorkaround = true
type EventLogger interface {
	Log(message string)
}
type runner struct {
	m            TestRunner
	deps         *TestDeps
	output       string
	stats        []constants.Statistics
	eventLogger  EventLogger
	matchRe      *regexp.Regexp
	matchPattern string
}
type Runner interface {
	Run()
	AddStatistics(stats *constants.Statistics)
	Statistics() []constants.Statistics
	ClearStatistics()
	Match(pattern string) error
	PrintToStdout(yes bool)
	PrintOutputToEventLog(yes bool)
	SetEventLogger(e EventLogger)
	LogEvent(message string)
	ReportStatistics()
	Passed() bool
	Output() string
}
type TestRunner interface {
	Run() int
}
var runnerMainStart = func(deps *TestDeps, tests []testing.InternalTest) {
	m2 := testing.MainStart(deps, tests, make([]testing.InternalBenchmark, 0), make([]testing.InternalExample, 0))
	m2.Run()
}
func Instance(m TestRunner) Runner {
	if m == nil && instance == nil {
		panic("Accessing an uninitialized Runner instance. You probably never gave a valid 'm' parameter.")
	}
	once.Do(func() {
		instance = newInstance(m)
	})
	return instance
}