initial commit
[govpp.git] / vendor / github.com / onsi / gomega / internal / fakematcher / fake_matcher.go
1 package fakematcher
2
3 import "fmt"
4
5 type FakeMatcher struct {
6         ReceivedActual  interface{}
7         MatchesToReturn bool
8         ErrToReturn     error
9 }
10
11 func (matcher *FakeMatcher) Match(actual interface{}) (bool, error) {
12         matcher.ReceivedActual = actual
13
14         return matcher.MatchesToReturn, matcher.ErrToReturn
15 }
16
17 func (matcher *FakeMatcher) FailureMessage(actual interface{}) string {
18         return fmt.Sprintf("positive: %v", actual)
19 }
20
21 func (matcher *FakeMatcher) NegatedFailureMessage(actual interface{}) string {
22         return fmt.Sprintf("negative: %v", actual)
23 }