github.com/HaHadaxigua/yaegi@v1.0.1/stdlib/go1_17_testing.go (about)

     1  // Code generated by 'yaegi extract testing'. DO NOT EDIT.
     2  
     3  //go:build go1.17
     4  // +build go1.17
     5  
     6  package stdlib
     7  
     8  import (
     9  	"reflect"
    10  	"testing"
    11  )
    12  
    13  func init() {
    14  	Symbols["testing/testing"] = map[string]reflect.Value{
    15  		// function, constant and variable definitions
    16  		"AllocsPerRun":  reflect.ValueOf(testing.AllocsPerRun),
    17  		"Benchmark":     reflect.ValueOf(testing.Benchmark),
    18  		"CoverMode":     reflect.ValueOf(testing.CoverMode),
    19  		"Coverage":      reflect.ValueOf(testing.Coverage),
    20  		"Init":          reflect.ValueOf(testing.Init),
    21  		"Main":          reflect.ValueOf(testing.Main),
    22  		"MainStart":     reflect.ValueOf(testing.MainStart),
    23  		"RegisterCover": reflect.ValueOf(testing.RegisterCover),
    24  		"RunBenchmarks": reflect.ValueOf(testing.RunBenchmarks),
    25  		"RunExamples":   reflect.ValueOf(testing.RunExamples),
    26  		"RunTests":      reflect.ValueOf(testing.RunTests),
    27  		"Short":         reflect.ValueOf(testing.Short),
    28  		"Verbose":       reflect.ValueOf(testing.Verbose),
    29  
    30  		// type definitions
    31  		"B":                 reflect.ValueOf((*testing.B)(nil)),
    32  		"BenchmarkResult":   reflect.ValueOf((*testing.BenchmarkResult)(nil)),
    33  		"Cover":             reflect.ValueOf((*testing.Cover)(nil)),
    34  		"CoverBlock":        reflect.ValueOf((*testing.CoverBlock)(nil)),
    35  		"InternalBenchmark": reflect.ValueOf((*testing.InternalBenchmark)(nil)),
    36  		"InternalExample":   reflect.ValueOf((*testing.InternalExample)(nil)),
    37  		"InternalTest":      reflect.ValueOf((*testing.InternalTest)(nil)),
    38  		"M":                 reflect.ValueOf((*testing.M)(nil)),
    39  		"PB":                reflect.ValueOf((*testing.PB)(nil)),
    40  		"T":                 reflect.ValueOf((*testing.T)(nil)),
    41  		"TB":                reflect.ValueOf((*testing.TB)(nil)),
    42  
    43  		// interface wrapper definitions
    44  		"_TB": reflect.ValueOf((*_testing_TB)(nil)),
    45  	}
    46  }
    47  
    48  // _testing_TB is an interface wrapper for TB type
    49  type _testing_TB struct {
    50  	IValue   interface{}
    51  	WCleanup func(a0 func())
    52  	WError   func(args ...interface{})
    53  	WErrorf  func(format string, args ...interface{})
    54  	WFail    func()
    55  	WFailNow func()
    56  	WFailed  func() bool
    57  	WFatal   func(args ...interface{})
    58  	WFatalf  func(format string, args ...interface{})
    59  	WHelper  func()
    60  	WLog     func(args ...interface{})
    61  	WLogf    func(format string, args ...interface{})
    62  	WName    func() string
    63  	WSetenv  func(key string, value string)
    64  	WSkip    func(args ...interface{})
    65  	WSkipNow func()
    66  	WSkipf   func(format string, args ...interface{})
    67  	WSkipped func() bool
    68  	WTempDir func() string
    69  }
    70  
    71  func (W _testing_TB) Cleanup(a0 func()) {
    72  	W.WCleanup(a0)
    73  }
    74  func (W _testing_TB) Error(args ...interface{}) {
    75  	W.WError(args...)
    76  }
    77  func (W _testing_TB) Errorf(format string, args ...interface{}) {
    78  	W.WErrorf(format, args...)
    79  }
    80  func (W _testing_TB) Fail() {
    81  	W.WFail()
    82  }
    83  func (W _testing_TB) FailNow() {
    84  	W.WFailNow()
    85  }
    86  func (W _testing_TB) Failed() bool {
    87  	return W.WFailed()
    88  }
    89  func (W _testing_TB) Fatal(args ...interface{}) {
    90  	W.WFatal(args...)
    91  }
    92  func (W _testing_TB) Fatalf(format string, args ...interface{}) {
    93  	W.WFatalf(format, args...)
    94  }
    95  func (W _testing_TB) Helper() {
    96  	W.WHelper()
    97  }
    98  func (W _testing_TB) Log(args ...interface{}) {
    99  	W.WLog(args...)
   100  }
   101  func (W _testing_TB) Logf(format string, args ...interface{}) {
   102  	W.WLogf(format, args...)
   103  }
   104  func (W _testing_TB) Name() string {
   105  	return W.WName()
   106  }
   107  func (W _testing_TB) Setenv(key string, value string) {
   108  	W.WSetenv(key, value)
   109  }
   110  func (W _testing_TB) Skip(args ...interface{}) {
   111  	W.WSkip(args...)
   112  }
   113  func (W _testing_TB) SkipNow() {
   114  	W.WSkipNow()
   115  }
   116  func (W _testing_TB) Skipf(format string, args ...interface{}) {
   117  	W.WSkipf(format, args...)
   118  }
   119  func (W _testing_TB) Skipped() bool {
   120  	return W.WSkipped()
   121  }
   122  func (W _testing_TB) TempDir() string {
   123  	return W.WTempDir()
   124  }