14 lines
224 B
Go
14 lines
224 B
Go
|
package comparision
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/google/go-cmp/cmp"
|
||
|
)
|
||
|
|
||
|
func Diff(t *testing.T, want, got interface{}) {
|
||
|
if diff := cmp.Diff(want, got); diff != "" {
|
||
|
t.Errorf("mismatch (-want +got):\n%s", diff)
|
||
|
}
|
||
|
}
|