1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
|
// Code generated by git.sr.ht/~nelsam/hel. DO NOT EDIT.
//
// This file contains mocks generated by hel. Do not edit this code by
// hand unless you *really* know what you're doing. Expect any changes
// made manually to be overwritten the next time hel regenerates this
// file.
package expect_test
import (
"time"
"git.sr.ht/~nelsam/hel/vegr"
"github.com/poy/onpar/matchers"
)
type mockToMatcher struct {
t vegr.T
timeout time.Duration
MatchCalled chan bool
MatchInput struct {
Actual chan any
}
MatchOutput struct {
ResultValue chan any
Err chan error
}
}
func newMockToMatcher(t vegr.T, timeout time.Duration) *mockToMatcher {
m := &mockToMatcher{t: t, timeout: timeout}
m.MatchCalled = make(chan bool, 100)
m.MatchInput.Actual = make(chan any, 100)
m.MatchOutput.ResultValue = make(chan any, 100)
m.MatchOutput.Err = make(chan error, 100)
return m
}
func (m *mockToMatcher) Match(actual any) (resultValue any, err error) {
m.t.Helper()
m.MatchCalled <- true
m.MatchInput.Actual <- actual
vegr.PopulateReturns(m.t, "Match", m.timeout, m.MatchOutput, &resultValue, &err)
return resultValue, err
}
type mockDiffMatcher struct {
t vegr.T
timeout time.Duration
UseDifferCalled chan bool
UseDifferInput struct {
Arg0 chan matchers.Differ
}
}
func newMockDiffMatcher(t vegr.T, timeout time.Duration) *mockDiffMatcher {
m := &mockDiffMatcher{t: t, timeout: timeout}
m.UseDifferCalled = make(chan bool, 100)
m.UseDifferInput.Arg0 = make(chan matchers.Differ, 100)
return m
}
func (m *mockDiffMatcher) UseDiffer(arg0 matchers.Differ) {
m.t.Helper()
m.UseDifferCalled <- true
m.UseDifferInput.Arg0 <- arg0
}
type mockT struct {
t vegr.T
timeout time.Duration
FatalfCalled chan bool
FatalfInput struct {
Format chan string
Args chan []any
}
}
func newMockT(t vegr.T, timeout time.Duration) *mockT {
m := &mockT{t: t, timeout: timeout}
m.FatalfCalled = make(chan bool, 100)
m.FatalfInput.Format = make(chan string, 100)
m.FatalfInput.Args = make(chan []any, 100)
return m
}
func (m *mockT) Fatalf(format string, args ...any) {
m.t.Helper()
m.FatalfCalled <- true
m.FatalfInput.Format <- format
m.FatalfInput.Args <- args
}
type mockTHelper struct {
t vegr.T
timeout time.Duration
HelperCalled chan bool
}
func newMockTHelper(t vegr.T, timeout time.Duration) *mockTHelper {
m := &mockTHelper{t: t, timeout: timeout}
m.HelperCalled = make(chan bool, 100)
return m
}
func (m *mockTHelper) Helper() {
m.t.Helper()
m.HelperCalled <- true
}
type mockDiffer struct {
t vegr.T
timeout time.Duration
DiffCalled chan bool
DiffInput struct {
Actual, Expected chan any
}
DiffOutput struct {
Ret0 chan string
}
}
func newMockDiffer(t vegr.T, timeout time.Duration) *mockDiffer {
m := &mockDiffer{t: t, timeout: timeout}
m.DiffCalled = make(chan bool, 100)
m.DiffInput.Actual = make(chan any, 100)
m.DiffInput.Expected = make(chan any, 100)
m.DiffOutput.Ret0 = make(chan string, 100)
return m
}
func (m *mockDiffer) Diff(actual, expected any) (ret0 string) {
m.t.Helper()
m.DiffCalled <- true
m.DiffInput.Actual <- actual
m.DiffInput.Expected <- expected
vegr.PopulateReturns(m.t, "Diff", m.timeout, m.DiffOutput, &ret0)
return ret0
}
type mockMatcher struct {
t vegr.T
timeout time.Duration
MatchCalled chan bool
MatchInput struct {
Actual chan any
}
MatchOutput struct {
ResultValue chan any
Err chan error
}
}
func newMockMatcher(t vegr.T, timeout time.Duration) *mockMatcher {
m := &mockMatcher{t: t, timeout: timeout}
m.MatchCalled = make(chan bool, 100)
m.MatchInput.Actual = make(chan any, 100)
m.MatchOutput.ResultValue = make(chan any, 100)
m.MatchOutput.Err = make(chan error, 100)
return m
}
func (m *mockMatcher) Match(actual any) (resultValue any, err error) {
m.t.Helper()
m.MatchCalled <- true
m.MatchInput.Actual <- actual
vegr.PopulateReturns(m.t, "Match", m.timeout, m.MatchOutput, &resultValue, &err)
return resultValue, err
}
|