Adding upstream version 2.6.3.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
4d8cd0ce4c
commit
2b08a89310
39 changed files with 2140 additions and 0 deletions
22
internal/assert/assert.go
Normal file
22
internal/assert/assert.go
Normal file
|
@ -0,0 +1,22 @@
|
|||
package assert
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
)
|
||||
|
||||
func Equal(t *testing.T, x, y interface{}) {
|
||||
t.Helper()
|
||||
|
||||
r := DiffReporter{}
|
||||
if !cmp.Equal(x, y, cmp.Reporter(&r)) {
|
||||
t.Error(r.String())
|
||||
}
|
||||
}
|
||||
|
||||
func Nil(t *testing.T, x interface{}) {
|
||||
t.Helper()
|
||||
|
||||
Equal(t, x, nil)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue