1 // Package require implements the same assertions as the `assert` package but
2 // stops test execution when a test fails.
6 // The following is a complete example using require in a standard test function:
9 // "github.com/stretchr/testify/require"
12 // func TestSomething(t *testing.T) {
14 // var a string = "Hello"
15 // var b string = "Hello"
17 // require.Equal(t, a, b, "The two words should be the same.")
23 // The `require` package have same global functions as in the `assert` package,
24 // but instead of returning a boolean result they call `t.FailNow()`.
26 // Every assertion function also takes an optional string message as the final argument,
27 // allowing custom error messages to be appended to the message the assertion method outputs.