@@ -16,8 +16,8 @@ The example below shows assert used with some common types.
1616 import (
1717 "testing"
1818
19- "github.com/gotestyourself/gotestyourself /assert"
20- is "github.com/gotestyourself/gotestyourself /assert/cmp"
19+ "gotest.tools /assert"
20+ is "gotest.tools /assert/cmp"
2121 )
2222
2323 func TestEverything(t *testing.T) {
@@ -49,7 +49,7 @@ The example below shows assert used with some common types.
4949
5050Comparisons
5151
52- Package assert/cmp (http ://bit.do/ assert- cmp) provides
52+ Package https ://godoc.org/gotest.tools/ assert/ cmp provides
5353many common comparisons. Additional comparisons can be written to compare
5454values in other ways. See the example Assert (CustomComparison).
5555
@@ -62,17 +62,17 @@ See http://bit.do/cmd-gty-migrate-from-testify.
6262
6363
6464*/
65- package assert
65+ package assert // import "gotest.tools/assert"
6666
6767import (
6868 "fmt"
6969 "go/ast"
7070 "go/token"
7171
7272 gocmp "github.com/google/go-cmp/cmp"
73- "github.com/gotestyourself/gotestyourself /assert/cmp"
74- "github.com/gotestyourself/gotestyourself /internal/format"
75- "github.com/gotestyourself/gotestyourself /internal/source"
73+ "gotest.tools /assert/cmp"
74+ "gotest.tools /internal/format"
75+ "gotest.tools /internal/source"
7676)
7777
7878// BoolOrComparison can be a bool, or cmp.Comparison. See Assert() for usage.
@@ -242,7 +242,17 @@ func NilError(t TestingT, err error, msgAndArgs ...interface{}) {
242242}
243243
244244// Equal uses the == operator to assert two values are equal and fails the test
245- // if they are not equal. This is equivalent to Assert(t, cmp.Equal(x, y)).
245+ // if they are not equal.
246+ //
247+ // If the comparison fails Equal will use the variable names for x and y as part
248+ // of the failure message to identify the actual and expected values.
249+ //
250+ // If either x or y are a multi-line string the failure message will include a
251+ // unified diff of the two values. If the values only differ by whitespace
252+ // the unified diff will be augmented by replacing whitespace characters with
253+ // visible characters to identify the whitespace difference.
254+ //
255+ // This is equivalent to Assert(t, cmp.Equal(x, y)).
246256func Equal (t TestingT , x , y interface {}, msgAndArgs ... interface {}) {
247257 if ht , ok := t .(helperT ); ok {
248258 ht .Helper ()
@@ -253,7 +263,7 @@ func Equal(t TestingT, x, y interface{}, msgAndArgs ...interface{}) {
253263// DeepEqual uses google/go-cmp (http://bit.do/go-cmp) to assert two values are
254264// equal and fails the test if they are not equal.
255265//
256- // Package assert/opt (http ://bit.do/t- assert- opt) provides some additional
266+ // Package https ://godoc.org/gotest.tools/ assert/ opt provides some additional
257267// commonly used Options.
258268//
259269// This is equivalent to Assert(t, cmp.DeepEqual(x, y)).
0 commit comments