src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/eval/vals/testutils_test.go (about)

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