{"modulePath":"github.com/Test-Go/Testify","version":"v1.1.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package assert\n\nPackage assert provides a set of comprehensive testing tools for use with the normal Go testing system.\n\n### Example Usage {#hdr-Example_Usage}\n\nThe following is a complete example using assert in a standard test function:\n\n\timport (\n\t  \"testing\"\n\t  \"github.com/stretchr/testify/assert\"\n\t)\n\n\tfunc TestSomething(t *testing.T) {\n\n\t  var a string = \"Hello\"\n\t  var b string = \"Hello\"\n\n\t  assert.Equal(t, a, b, \"The two words should be the same.\")\n\n\t}\n\nif you assert many times, use the format below:\n\n\timport (\n\t  \"testing\"\n\t  \"github.com/stretchr/testify/assert\"\n\t)\n\n\tfunc TestSomething(t *testing.T) {\n\t  assert := assert.New(t)\n\n\t  var a string = \"Hello\"\n\t  var b string = \"Hello\"\n\n\t  assert.Equal(a, b, \"The two words should be the same.\")\n\t}\n\n### Assertions {#hdr-Assertions}\n\nAssertions allow you to easily write test code, and are global funcs in the \\`assert\\` package. All assertion functions take, as the first argument, the \\`\\*testing.T\\` object provided by the testing framework. This allows the assertion funcs to write the failings and other details to the correct place.\n\nEvery assertion function also takes an optional string message as the final argument, allowing custom error messages to be appended to the message the assertion method outputs.\n\n## Variables\n\n```go\nvar AnError = errors.New(\"assert.AnError general error for testing\")\n```\nAnError is an error instance useful for testing.  If the code does not care about error specifics, and only needs to return the error for example, this error should be used to make the test code more readable.\n\n## Functions\n\n```go\nfunc CallerInfo() []string\n```\nCallerInfo returns an array of strings containing the file and line number of each stack frame leading from the current test to the assert call that failed.\n\n```go\nfunc Condition(t TestingT, comp Comparison, msgAndArgs ...interface{}) bool\n```\nCondition uses a Comparison to assert a complex condition.\n\n```go\nfunc Contains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool\n```\nContains asserts that the specified string, list(array, slice...) or map contains the specified substring or element.\n\n\tassert.Contains(t, \"Hello World\", \"World\", \"But 'Hello World' does contain 'World'\")\n\tassert.Contains(t, [\"Hello\", \"World\"], \"World\", \"But [\"Hello\", \"World\"] does contain 'World'\")\n\tassert.Contains(t, {\"Hello\": \"World\"}, \"Hello\", \"But {'Hello': 'World'} does contain 'Hello'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool\n```\nEmpty asserts that the specified object is empty.  I.e. nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\tassert.Empty(t, obj)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Equal(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool\n```\nEqual asserts that two objects are equal.\n\n\tassert.Equal(t, 123, 123, \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) bool\n```\nEqualError asserts that a function returned an error (i.e. not \\`nil\\`) and that it is equal to the provided error.\n\n\tactualObj, err := SomeFunction()\n\tassert.EqualError(t, err,  expectedErrorString, \"An error was expected\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc EqualValues(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool\n```\nEqualValues asserts that two objects are equal or convertable to the same types and equal.\n\n\tassert.EqualValues(t, uint32(123), int32(123), \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Error(t TestingT, err error, msgAndArgs ...interface{}) bool\n```\nError asserts that a function returned an error (i.e. not \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if assert.Error(t, err, \"An error was expected\") {\n\t\t   assert.Equal(t, err, expectedError)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Exactly(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool\n```\nExactly asserts that two objects are equal is value and type.\n\n\tassert.Exactly(t, int32(123), int64(123), \"123 and 123 should NOT be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool\n```\nFail reports a failure through\n\n```go\nfunc FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) bool\n```\nFailNow fails test\n\n```go\nfunc False(t TestingT, value bool, msgAndArgs ...interface{}) bool\n```\nFalse asserts that the specified value is false.\n\n\tassert.False(t, myBool, \"myBool should be false\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPBody(handler http.HandlerFunc, method, url string, values url.Values) string\n```\nHTTPBody is a helper that returns HTTP body of the response. It returns empty string if building a new request fails.\n\n```go\nfunc HTTPBodyContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}) bool\n```\nHTTPBodyContains asserts that a specified handler returns a body that contains a string.\n\n\tassert.HTTPBodyContains(t, myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method, url string, values url.Values, str interface{}) bool\n```\nHTTPBodyNotContains asserts that a specified handler returns a body that does not contain a string.\n\n\tassert.HTTPBodyNotContains(t, myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPError(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool\n```\nHTTPError asserts that a specified handler returns an error status code.\n\n\tassert.HTTPError(t, myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPRedirect(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool\n```\nHTTPRedirect asserts that a specified handler returns a redirect status code.\n\n\tassert.HTTPRedirect(t, myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc HTTPSuccess(t TestingT, handler http.HandlerFunc, method, url string, values url.Values) bool\n```\nHTTPSuccess asserts that a specified handler returns a success status code.\n\n\tassert.HTTPSuccess(t, myHandler, \"POST\", \"http://www.google.com\", nil)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool\n```\nImplements asserts that an object is implemented by the specified interface.\n\n\tassert.Implements(t, (*MyInterface)(nil), new(MyObject), \"MyObject\")\n\n```go\nfunc InDelta(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool\n```\nInDelta asserts that the two numerals are within delta of each other.\n\n\tassert.InDelta(t, math.Pi, (22 / 7.0), 0.01)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc InDeltaSlice(t TestingT, expected, actual interface{}, delta float64, msgAndArgs ...interface{}) bool\n```\nInDeltaSlice is the same as InDelta, except it compares two slices.\n\n```go\nfunc InEpsilon(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool\n```\nInEpsilon asserts that expected and actual have a relative error less than epsilon\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc InEpsilonSlice(t TestingT, expected, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool\n```\nInEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.\n\n```go\nfunc IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool\n```\nIsType asserts that the specified objects are of the same type.\n\n```go\nfunc JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) bool\n```\nJSONEq asserts that two JSON strings are equivalent.\n\n\tassert.JSONEq(t, `{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) bool\n```\nLen asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept.\n\n\tassert.Len(t, mySlice, 3, \"The size of slice is not 3\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool\n```\nNil asserts that the specified object is nil.\n\n\tassert.Nil(t, err, \"err should be nothing\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NoError(t TestingT, err error, msgAndArgs ...interface{}) bool\n```\nNoError asserts that a function returned no error (i.e. \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if assert.NoError(t, err) {\n\t\t   assert.Equal(t, actualObj, expectedObj)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotContains(t TestingT, s, contains interface{}, msgAndArgs ...interface{}) bool\n```\nNotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.\n\n\tassert.NotContains(t, \"Hello World\", \"Earth\", \"But 'Hello World' does NOT contain 'Earth'\")\n\tassert.NotContains(t, [\"Hello\", \"World\"], \"Earth\", \"But ['Hello', 'World'] does NOT contain 'Earth'\")\n\tassert.NotContains(t, {\"Hello\": \"World\"}, \"Earth\", \"But {'Hello': 'World'} does NOT contain 'Earth'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) bool\n```\nNotEmpty asserts that the specified object is NOT empty.  I.e. not nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\tif assert.NotEmpty(t, obj) {\n\t  assert.Equal(t, \"two\", obj[1])\n\t}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool\n```\nNotEqual asserts that the specified values are NOT equal.\n\n\tassert.NotEqual(t, obj1, obj2, \"two objects shouldn't be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool\n```\nNotNil asserts that the specified object is not nil.\n\n\tassert.NotNil(t, err, \"err should be something\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotPanics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool\n```\nNotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n\n\tassert.NotPanics(t, func(){\n\t  RemainCalm()\n\t}, \"Calling RemainCalm() should NOT panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool\n```\nNotRegexp asserts that a specified regexp does not match a string.\n\n\tassert.NotRegexp(t, regexp.MustCompile(\"starts\"), \"it's starting\")\n\tassert.NotRegexp(t, \"^start\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool\n```\nNotZero asserts that i is not the zero value for its type and returns the truth.\n\n```go\nfunc ObjectsAreEqual(expected, actual interface{}) bool\n```\nObjectsAreEqual determines if two objects are considered equal.\n\nThis function does no assertion of any kind.\n\n```go\nfunc ObjectsAreEqualValues(expected, actual interface{}) bool\n```\nObjectsAreEqualValues gets whether two objects are equal, or if their values are equal.\n\n```go\nfunc Panics(t TestingT, f PanicTestFunc, msgAndArgs ...interface{}) bool\n```\nPanics asserts that the code inside the specified PanicTestFunc panics.\n\n\tassert.Panics(t, func(){\n\t  GoCrazy()\n\t}, \"Calling GoCrazy() should panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) bool\n```\nRegexp asserts that a specified regexp matches a string.\n\n\tassert.Regexp(t, regexp.MustCompile(\"start\"), \"it's starting\")\n\tassert.Regexp(t, \"start...$\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc True(t TestingT, value bool, msgAndArgs ...interface{}) bool\n```\nTrue asserts that the specified value is true.\n\n\tassert.True(t, myBool, \"myBool should be true\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc WithinDuration(t TestingT, expected, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool\n```\nWithinDuration asserts that the two times are within duration delta of each other.\n\n\tassert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second, \"The difference should not be more than 10s\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) bool\n```\nZero asserts that i is the zero value for its type and returns the truth.\n\n## Types\n\n```go\ntype Assertions struct {\n\t// contains filtered or unexported fields\n}\n```\nAssertions provides assertion methods around the TestingT interface.\n\n```go\nfunc New(t TestingT) *Assertions\n```\nNew makes a new Assertions object for the specified TestingT.\n\n```go\nfunc (a *Assertions) Condition(comp Comparison, msgAndArgs ...interface{}) bool\n```\nCondition uses a Comparison to assert a complex condition.\n\n```go\nfunc (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool\n```\nContains asserts that the specified string, list(array, slice...) or map contains the specified substring or element.\n\n\ta.Contains(\"Hello World\", \"World\", \"But 'Hello World' does contain 'World'\")\n\ta.Contains([\"Hello\", \"World\"], \"World\", \"But [\"Hello\", \"World\"] does contain 'World'\")\n\ta.Contains({\"Hello\": \"World\"}, \"Hello\", \"But {'Hello': 'World'} does contain 'Hello'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) bool\n```\nEmpty asserts that the specified object is empty.  I.e. nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\ta.Empty(obj)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool\n```\nEqual asserts that two objects are equal.\n\n\ta.Equal(123, 123, \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) bool\n```\nEqualError asserts that a function returned an error (i.e. not \\`nil\\`) and that it is equal to the provided error.\n\n\t  actualObj, err := SomeFunction()\n\t  if assert.Error(t, err, \"An error was expected\") {\n\t\t   assert.Equal(t, err, expectedError)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool\n```\nEqualValues asserts that two objects are equal or convertable to the same types and equal.\n\n\ta.EqualValues(uint32(123), int32(123), \"123 and 123 should be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Error(err error, msgAndArgs ...interface{}) bool\n```\nError asserts that a function returned an error (i.e. not \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if a.Error(err, \"An error was expected\") {\n\t\t   assert.Equal(t, err, expectedError)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool\n```\nExactly asserts that two objects are equal is value and type.\n\n\ta.Exactly(int32(123), int64(123), \"123 and 123 should NOT be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) bool\n```\nFail reports a failure through\n\n```go\nfunc (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) bool\n```\nFailNow fails test\n\n```go\nfunc (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool\n```\nFalse asserts that the specified value is false.\n\n\ta.False(myBool, \"myBool should be false\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}) bool\n```\nHTTPBodyContains asserts that a specified handler returns a body that contains a string.\n\n\ta.HTTPBodyContains(myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}) bool\n```\nHTTPBodyNotContains asserts that a specified handler returns a body that does not contain a string.\n\n\ta.HTTPBodyNotContains(myHandler, \"www.google.com\", nil, \"I'm Feeling Lucky\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values) bool\n```\nHTTPError asserts that a specified handler returns an error status code.\n\n\ta.HTTPError(myHandler, \"POST\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values) bool\n```\nHTTPRedirect asserts that a specified handler returns a redirect status code.\n\n\ta.HTTPRedirect(myHandler, \"GET\", \"/a/b/c\", url.Values{\"a\": []string{\"b\", \"c\"}}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values) bool\n```\nHTTPSuccess asserts that a specified handler returns a success status code.\n\n\ta.HTTPSuccess(myHandler, \"POST\", \"http://www.google.com\", nil)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) bool\n```\nImplements asserts that an object is implemented by the specified interface.\n\n\ta.Implements((*MyInterface)(nil), new(MyObject), \"MyObject\")\n\n```go\nfunc (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool\n```\nInDelta asserts that the two numerals are within delta of each other.\n\n\ta.InDelta(math.Pi, (22 / 7.0), 0.01)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool\n```\nInDeltaSlice is the same as InDelta, except it compares two slices.\n\n```go\nfunc (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) bool\n```\nInEpsilon asserts that expected and actual have a relative error less than epsilon\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) bool\n```\nInEpsilonSlice is the same as InEpsilon, except it compares two slices.\n\n```go\nfunc (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) bool\n```\nIsType asserts that the specified objects are of the same type.\n\n```go\nfunc (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) bool\n```\nJSONEq asserts that two JSON strings are equivalent.\n\n\ta.JSONEq(`{\"hello\": \"world\", \"foo\": \"bar\"}`, `{\"foo\": \"bar\", \"hello\": \"world\"}`)\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool\n```\nLen asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept.\n\n\ta.Len(mySlice, 3, \"The size of slice is not 3\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) bool\n```\nNil asserts that the specified object is nil.\n\n\ta.Nil(err, \"err should be nothing\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NoError(err error, msgAndArgs ...interface{}) bool\n```\nNoError asserts that a function returned no error (i.e. \\`nil\\`).\n\n\t  actualObj, err := SomeFunction()\n\t  if a.NoError(err) {\n\t\t   assert.Equal(t, actualObj, expectedObj)\n\t  }\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) bool\n```\nNotContains asserts that the specified string, list(array, slice...) or map does NOT contain the specified substring or element.\n\n\ta.NotContains(\"Hello World\", \"Earth\", \"But 'Hello World' does NOT contain 'Earth'\")\n\ta.NotContains([\"Hello\", \"World\"], \"Earth\", \"But ['Hello', 'World'] does NOT contain 'Earth'\")\n\ta.NotContains({\"Hello\": \"World\"}, \"Earth\", \"But {'Hello': 'World'} does NOT contain 'Earth'\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) bool\n```\nNotEmpty asserts that the specified object is NOT empty.  I.e. not nil, \"\", false, 0 or either a slice or a channel with len == 0.\n\n\tif a.NotEmpty(obj) {\n\t  assert.Equal(t, \"two\", obj[1])\n\t}\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) bool\n```\nNotEqual asserts that the specified values are NOT equal.\n\n\ta.NotEqual(obj1, obj2, \"two objects shouldn't be equal\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) bool\n```\nNotNil asserts that the specified object is not nil.\n\n\ta.NotNil(err, \"err should be something\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotPanics(f PanicTestFunc, msgAndArgs ...interface{}) bool\n```\nNotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.\n\n\ta.NotPanics(func(){\n\t  RemainCalm()\n\t}, \"Calling RemainCalm() should NOT panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool\n```\nNotRegexp asserts that a specified regexp does not match a string.\n\n\ta.NotRegexp(regexp.MustCompile(\"starts\"), \"it's starting\")\n\ta.NotRegexp(\"^start\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) bool\n```\nNotZero asserts that i is not the zero value for its type and returns the truth.\n\n```go\nfunc (a *Assertions) Panics(f PanicTestFunc, msgAndArgs ...interface{}) bool\n```\nPanics asserts that the code inside the specified PanicTestFunc panics.\n\n\ta.Panics(func(){\n\t  GoCrazy()\n\t}, \"Calling GoCrazy() should panic\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) bool\n```\nRegexp asserts that a specified regexp matches a string.\n\n\ta.Regexp(regexp.MustCompile(\"start\"), \"it's starting\")\n\ta.Regexp(\"start...$\", \"it's not starting\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) True(value bool, msgAndArgs ...interface{}) bool\n```\nTrue asserts that the specified value is true.\n\n\ta.True(myBool, \"myBool should be true\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) bool\n```\nWithinDuration asserts that the two times are within duration delta of each other.\n\n\ta.WithinDuration(time.Now(), time.Now(), 10*time.Second, \"The difference should not be more than 10s\")\n\nReturns whether the assertion was successful (true) or not (false).\n\n```go\nfunc (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) bool\n```\nZero asserts that i is the zero value for its type and returns the truth.\n\n```go\ntype Comparison func() (success bool)\n```\nComparison a custom function that returns true on success and false on failure\n\n```go\ntype PanicTestFunc func()\n```\nPanicTestFunc defines a func that should be passed to the assert.Panics and assert.NotPanics methods, and represents a simple func that takes no arguments, and returns nothing.\n\n```go\ntype TestingT interface {\n\tErrorf(format string, args ...interface{})\n}\n```\nTestingT is an interface wrapper around \\*testing.T\n\n","path":"github.com/Test-Go/Testify/assert","name":"assert","synopsis":"Package assert provides a set of comprehensive testing tools for use with the normal Go testing system.","isRedistributable":true}
