-
Notifications
You must be signed in to change notification settings - Fork 4
/
helheim_test.go
65 lines (60 loc) · 1.54 KB
/
helheim_test.go
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
// This file was generated by github.com/nelsam/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
type mockT struct {
ErrorfCalled chan bool
ErrorfInput struct {
Format chan string
Args chan []interface{}
}
FatalCalled chan bool
FatalInput struct {
Arg0 chan []interface{}
}
FailNowCalled chan bool
}
func newMockT() *mockT {
m := &mockT{}
m.ErrorfCalled = make(chan bool, 100)
m.ErrorfInput.Format = make(chan string, 100)
m.ErrorfInput.Args = make(chan []interface{}, 100)
m.FatalCalled = make(chan bool, 100)
m.FatalInput.Arg0 = make(chan []interface{}, 100)
m.FailNowCalled = make(chan bool, 100)
return m
}
func (m *mockT) Errorf(format string, args ...interface{}) {
m.ErrorfCalled <- true
m.ErrorfInput.Format <- format
m.ErrorfInput.Args <- args
}
func (m *mockT) Fatal(arg0 ...interface{}) {
m.FatalCalled <- true
m.FatalInput.Arg0 <- arg0
}
func (m *mockT) FailNow() {
m.FailNowCalled <- true
}
type mockMatcher struct {
MatchCalled chan bool
MatchInput struct {
Actual chan interface{}
}
MatchOutput struct {
Ret0 chan error
}
}
func newMockMatcher() *mockMatcher {
m := &mockMatcher{}
m.MatchCalled = make(chan bool, 100)
m.MatchInput.Actual = make(chan interface{}, 100)
m.MatchOutput.Ret0 = make(chan error, 100)
return m
}
func (m *mockMatcher) Match(actual interface{}) error {
m.MatchCalled <- true
m.MatchInput.Actual <- actual
return <-m.MatchOutput.Ret0
}