github.com/nfisher/gitit@v0.0.7-0.20240131193748-bc8dd26542cc/assert/int.go (about)

     1  package assert
     2  
     3  import "testing"
     4  
     5  func Int(t *testing.T, i int) *integer {
     6  	return &integer{i, t}
     7  }
     8  
     9  type integer struct {
    10  	a int
    11  	t *testing.T
    12  }
    13  
    14  func (i *integer) Equals(b int) {
    15  	i.t.Helper()
    16  	if i.a != b {
    17  		i.t.Errorf("want %v, got %v\n", b, i.a)
    18  	}
    19  }