github.com/markusbkk/elvish@v0.0.0-20231204143114-91dc52438621/pkg/eval/vals/testutils_test.go (about)

     1  package vals
     2  
     3  import "github.com/markusbkk/elvish/pkg/tt"
     4  
     5  // Returns a tt.Matcher that matches using the Equal function.
     6  func eq(r interface{}) tt.Matcher { return equalMatcher{r} }
     7  
     8  type equalMatcher struct{ want interface{} }
     9  
    10  func (em equalMatcher) Match(got tt.RetValue) bool { return Equal(got, em.want) }