Skip to content

ntnj/go-generics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Generics

Matchers

Matchers provides a collection of utilities to write googletest inspired tests in golang.

import m "github.com/ntnj/go-generics/matchers"

func TestM(t *testing.T) {
  got := 42
  m.Expect(t, got, m.Eq(42))

  list := []int{2,4,6}
  m.Expect(t, list, m.Contains(m.Eq(4)))
  m.Expect(t, list, m.IsPermutationOf(m.Eq(4), m.Eq(6), m.Eq(2)))
}

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages