| 1 | /* |
| 2 | * CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen |
| 3 | * THIS FILE MUST NOT BE EDITED BY HAND |
| 4 | */ |
| 5 | |
| 6 | package assertscip-go gomod github.com/tj/assert . `github.com/tj/assert`/ |
| 7 | |
| 8 | import ( |
| 9 | httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/ "net/httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/" |
| 10 | urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/ "net/urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/" |
| 11 | timescip-go gomod github.com/golang/go/src go1.14 time/ "timescip-go gomod github.com/golang/go/src go1.14 time/" |
| 12 | |
| 13 | assertscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/ "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/" |
| 14 | ) |
| 15 | |
| 16 | // Condition uses a Comparison to assert a complex condition. |
| 17 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Conditionscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Condition().(comp assertscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/.Comparisonscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/Comparison#, msgAndArgs ...interface{}) { |
| 18 | Conditionscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Condition().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., comp, msgAndArgs...) |
| 19 | } |
| 20 | |
| 21 | // Contains asserts that the specified string, list(array, slice...) or map contains the |
| 22 | // specified substring or element. |
| 23 | // |
| 24 | // a.Contains("Hello World", "World") |
| 25 | // a.Contains(["Hello", "World"], "World") |
| 26 | // a.Contains({"Hello": "World"}, "Hello") |
| 27 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Containsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Contains().(s interface{}, contains interface{}, msgAndArgs ...interface{}) { |
| 28 | Containsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Contains().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., s, contains, msgAndArgs...) |
| 29 | } |
| 30 | |
| 31 | // DirExists checks whether a directory exists in the given path. It also fails |
| 32 | // if the path is a file rather a directory or there is an error checking whether it exists. |
| 33 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) DirExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#DirExists().(path string, msgAndArgs ...interface{}) { |
| 34 | DirExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/DirExists().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., path, msgAndArgs...) |
| 35 | } |
| 36 | |
| 37 | // ElementsMatch asserts that the specified listA(array, slice...) is equal to specified |
| 38 | // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, |
| 39 | // the number of appearances of each of them in both lists should match. |
| 40 | // |
| 41 | // a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2]) |
| 42 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) ElementsMatchscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#ElementsMatch().(listA interface{}, listB interface{}, msgAndArgs ...interface{}) { |
| 43 | ElementsMatchscip-go gomod github.com/tj/assert . `github.com/tj/assert`/ElementsMatch().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., listA, listB, msgAndArgs...) |
| 44 | } |
| 45 | |
| 46 | // Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either |
| 47 | // a slice or a channel with len == 0. |
| 48 | // |
| 49 | // a.Empty(obj) |
| 50 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Emptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Empty().(object interface{}, msgAndArgs ...interface{}) { |
| 51 | Emptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Empty().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., object, msgAndArgs...) |
| 52 | } |
| 53 | |
| 54 | // Equal asserts that two objects are equal. |
| 55 | // |
| 56 | // a.Equal(123, 123) |
| 57 | // |
| 58 | // Pointer variable equality is determined based on the equality of the |
| 59 | // referenced values (as opposed to the memory addresses). Function equality |
| 60 | // cannot be determined and will always fail. |
| 61 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Equalscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Equal().(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { |
| 62 | Equalscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Equal().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 63 | } |
| 64 | |
| 65 | // EqualError asserts that a function returned an error (i.e. not `nil`) |
| 66 | // and that it is equal to the provided error. |
| 67 | // |
| 68 | // actualObj, err := SomeFunction() |
| 69 | // a.EqualError(err, expectedErrorString) |
| 70 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) EqualErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#EqualError().(theError error, errString string, msgAndArgs ...interface{}) { |
| 71 | EqualErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/EqualError().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., theError, errString, msgAndArgs...) |
| 72 | } |
| 73 | |
| 74 | // EqualValues asserts that two objects are equal or convertable to the same types |
| 75 | // and equal. |
| 76 | // |
| 77 | // a.EqualValues(uint32(123), int32(123)) |
| 78 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) EqualValuesscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#EqualValues().(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { |
| 79 | EqualValuesscip-go gomod github.com/tj/assert . `github.com/tj/assert`/EqualValues().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 80 | } |
| 81 | |
| 82 | // Error asserts that a function returned an error (i.e. not `nil`). |
| 83 | // |
| 84 | // actualObj, err := SomeFunction() |
| 85 | // if a.Error(err) { |
| 86 | // assert.Equal(t, expectedError, err) |
| 87 | // } |
| 88 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Errorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Error().(err error, msgAndArgs ...interface{}) { |
| 89 | Errorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Error().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., err, msgAndArgs...) |
| 90 | } |
| 91 | |
| 92 | // Eventually asserts that given condition will be met in waitFor time, |
| 93 | // periodically checking target function each tick. |
| 94 | // |
| 95 | // a.Eventually(func() bool { return true; }, time.Second, 10*time.Millisecond) |
| 96 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Eventuallyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Eventually().(condition func() bool, waitFor timescip-go gomod github.com/golang/go/src go1.14 time/.Durationscip-go gomod github.com/golang/go/src go1.14 time/Duration#, tick timescip-go gomod github.com/golang/go/src go1.14 time/.Durationscip-go gomod github.com/golang/go/src go1.14 time/Duration#, msgAndArgs ...interface{}) { |
| 97 | Eventuallyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Eventually().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., condition, waitFor, tick, msgAndArgs...) |
| 98 | } |
| 99 | |
| 100 | // Exactly asserts that two objects are equal in value and type. |
| 101 | // |
| 102 | // a.Exactly(int32(123), int64(123)) |
| 103 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Exactlyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Exactly().(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { |
| 104 | Exactlyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Exactly().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 105 | } |
| 106 | |
| 107 | // Fail reports a failure through |
| 108 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Failscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Fail().(failureMessage string, msgAndArgs ...interface{}) { |
| 109 | Failscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Fail().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., failureMessage, msgAndArgs...) |
| 110 | } |
| 111 | |
| 112 | // FailNow fails test |
| 113 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) FailNowscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#FailNow().(failureMessage string, msgAndArgs ...interface{}) { |
| 114 | FailNowscip-go gomod github.com/tj/assert . `github.com/tj/assert`/FailNow().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., failureMessage, msgAndArgs...) |
| 115 | } |
| 116 | |
| 117 | // False asserts that the specified value is false. |
| 118 | // |
| 119 | // a.False(myBool) |
| 120 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Falsescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#False().(value bool, msgAndArgs ...interface{}) { |
| 121 | Falsescip-go gomod github.com/tj/assert . `github.com/tj/assert`/False().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., value, msgAndArgs...) |
| 122 | } |
| 123 | |
| 124 | // FileExists checks whether a file exists in the given path. It also fails if |
| 125 | // the path points to a directory or there is an error when trying to check the file. |
| 126 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) FileExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#FileExists().(path string, msgAndArgs ...interface{}) { |
| 127 | FileExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/FileExists().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., path, msgAndArgs...) |
| 128 | } |
| 129 | |
| 130 | // Greater asserts that the first element is greater than the second |
| 131 | // |
| 132 | // a.Greater(2, 1) |
| 133 | // a.Greater(float64(2), float64(1)) |
| 134 | // a.Greater("b", "a") |
| 135 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Greaterscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Greater().(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { |
| 136 | Greaterscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Greater().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., e1, e2, msgAndArgs...) |
| 137 | } |
| 138 | |
| 139 | // GreaterOrEqual asserts that the first element is greater than or equal to the second |
| 140 | // |
| 141 | // a.GreaterOrEqual(2, 1) |
| 142 | // a.GreaterOrEqual(2, 2) |
| 143 | // a.GreaterOrEqual("b", "a") |
| 144 | // a.GreaterOrEqual("b", "b") |
| 145 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) GreaterOrEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#GreaterOrEqual().(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { |
| 146 | GreaterOrEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/GreaterOrEqual().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., e1, e2, msgAndArgs...) |
| 147 | } |
| 148 | |
| 149 | // HTTPBodyContains asserts that a specified handler returns a |
| 150 | // body that contains a string. |
| 151 | // |
| 152 | // a.HTTPBodyContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") |
| 153 | // |
| 154 | // Returns whether the assertion was successful (true) or not (false). |
| 155 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) HTTPBodyContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#HTTPBodyContains().(handler httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/.HandlerFuncscip-go gomod github.com/golang/go/src go1.14 `net/http`/HandlerFunc#, method string, url string, values urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.14 `net/url`/Values#, str interface{}, msgAndArgs ...interface{}) { |
| 156 | HTTPBodyContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/HTTPBodyContains().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., handler, method, url, values, str, msgAndArgs...) |
| 157 | } |
| 158 | |
| 159 | // HTTPBodyNotContains asserts that a specified handler returns a |
| 160 | // body that does not contain a string. |
| 161 | // |
| 162 | // a.HTTPBodyNotContains(myHandler, "GET", "www.google.com", nil, "I'm Feeling Lucky") |
| 163 | // |
| 164 | // Returns whether the assertion was successful (true) or not (false). |
| 165 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) HTTPBodyNotContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#HTTPBodyNotContains().(handler httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/.HandlerFuncscip-go gomod github.com/golang/go/src go1.14 `net/http`/HandlerFunc#, method string, url string, values urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.14 `net/url`/Values#, str interface{}, msgAndArgs ...interface{}) { |
| 166 | HTTPBodyNotContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/HTTPBodyNotContains().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., handler, method, url, values, str, msgAndArgs...) |
| 167 | } |
| 168 | |
| 169 | // HTTPError asserts that a specified handler returns an error status code. |
| 170 | // |
| 171 | // a.HTTPError(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}} |
| 172 | // |
| 173 | // Returns whether the assertion was successful (true) or not (false). |
| 174 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) HTTPErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#HTTPError().(handler httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/.HandlerFuncscip-go gomod github.com/golang/go/src go1.14 `net/http`/HandlerFunc#, method string, url string, values urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.14 `net/url`/Values#, msgAndArgs ...interface{}) { |
| 175 | HTTPErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/HTTPError().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., handler, method, url, values, msgAndArgs...) |
| 176 | } |
| 177 | |
| 178 | // HTTPRedirect asserts that a specified handler returns a redirect status code. |
| 179 | // |
| 180 | // a.HTTPRedirect(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}} |
| 181 | // |
| 182 | // Returns whether the assertion was successful (true) or not (false). |
| 183 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) HTTPRedirectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#HTTPRedirect().(handler httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/.HandlerFuncscip-go gomod github.com/golang/go/src go1.14 `net/http`/HandlerFunc#, method string, url string, values urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.14 `net/url`/Values#, msgAndArgs ...interface{}) { |
| 184 | HTTPRedirectscip-go gomod github.com/tj/assert . `github.com/tj/assert`/HTTPRedirect().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., handler, method, url, values, msgAndArgs...) |
| 185 | } |
| 186 | |
| 187 | // HTTPStatusCode asserts that a specified handler returns a specified status code. |
| 188 | // |
| 189 | // a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501) |
| 190 | // |
| 191 | // Returns whether the assertion was successful (true) or not (false). |
| 192 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) HTTPStatusCodescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#HTTPStatusCode().(handler httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/.HandlerFuncscip-go gomod github.com/golang/go/src go1.14 `net/http`/HandlerFunc#, method string, url string, values urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.14 `net/url`/Values#, statuscode int, msgAndArgs ...interface{}) { |
| 193 | HTTPStatusCodescip-go gomod github.com/tj/assert . `github.com/tj/assert`/HTTPStatusCode().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., handler, method, url, values, statuscode, msgAndArgs...) |
| 194 | } |
| 195 | |
| 196 | // HTTPSuccess asserts that a specified handler returns a success status code. |
| 197 | // |
| 198 | // a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil) |
| 199 | // |
| 200 | // Returns whether the assertion was successful (true) or not (false). |
| 201 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) HTTPSuccessscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#HTTPSuccess().(handler httpscip-go gomod github.com/golang/go/src go1.14 `net/http`/.HandlerFuncscip-go gomod github.com/golang/go/src go1.14 `net/http`/HandlerFunc#, method string, url string, values urlscip-go gomod github.com/golang/go/src go1.14 `net/url`/.Valuesscip-go gomod github.com/golang/go/src go1.14 `net/url`/Values#, msgAndArgs ...interface{}) { |
| 202 | HTTPSuccessscip-go gomod github.com/tj/assert . `github.com/tj/assert`/HTTPSuccess().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., handler, method, url, values, msgAndArgs...) |
| 203 | } |
| 204 | |
| 205 | // Implements asserts that an object is implemented by the specified interface. |
| 206 | // |
| 207 | // a.Implements((*MyInterface)(nil), new(MyObject)) |
| 208 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Implementsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Implements().(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) { |
| 209 | Implementsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Implements().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., interfaceObject, object, msgAndArgs...) |
| 210 | } |
| 211 | |
| 212 | // InDelta asserts that the two numerals are within delta of each other. |
| 213 | // |
| 214 | // a.InDelta(math.Pi, 22/7.0, 0.01) |
| 215 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) InDeltascip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#InDelta().(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { |
| 216 | InDeltascip-go gomod github.com/tj/assert . `github.com/tj/assert`/InDelta().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, delta, msgAndArgs...) |
| 217 | } |
| 218 | |
| 219 | // InDeltaMapValues is the same as InDelta, but it compares all values between two maps. Both maps must have exactly the same keys. |
| 220 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) InDeltaMapValuesscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#InDeltaMapValues().(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { |
| 221 | InDeltaMapValuesscip-go gomod github.com/tj/assert . `github.com/tj/assert`/InDeltaMapValues().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, delta, msgAndArgs...) |
| 222 | } |
| 223 | |
| 224 | // InDeltaSlice is the same as InDelta, except it compares two slices. |
| 225 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) InDeltaSlicescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#InDeltaSlice().(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) { |
| 226 | InDeltaSlicescip-go gomod github.com/tj/assert . `github.com/tj/assert`/InDeltaSlice().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, delta, msgAndArgs...) |
| 227 | } |
| 228 | |
| 229 | // InEpsilon asserts that expected and actual have a relative error less than epsilon |
| 230 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) InEpsilonscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#InEpsilon().(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { |
| 231 | InEpsilonscip-go gomod github.com/tj/assert . `github.com/tj/assert`/InEpsilon().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, epsilon, msgAndArgs...) |
| 232 | } |
| 233 | |
| 234 | // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices. |
| 235 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) InEpsilonSlicescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#InEpsilonSlice().(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) { |
| 236 | InEpsilonSlicescip-go gomod github.com/tj/assert . `github.com/tj/assert`/InEpsilonSlice().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, epsilon, msgAndArgs...) |
| 237 | } |
| 238 | |
| 239 | // IsType asserts that the specified objects are of the same type. |
| 240 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) IsTypescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#IsType().(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) { |
| 241 | IsTypescip-go gomod github.com/tj/assert . `github.com/tj/assert`/IsType().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expectedType, object, msgAndArgs...) |
| 242 | } |
| 243 | |
| 244 | // JSONEq asserts that two JSON strings are equivalent. |
| 245 | // |
| 246 | // a.JSONEq(`{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`) |
| 247 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#JSONEq().(expected string, actual string, msgAndArgs ...interface{}) { |
| 248 | JSONEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/JSONEq().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 249 | } |
| 250 | |
| 251 | // Len asserts that the specified object has specific length. |
| 252 | // Len also fails if the object has a type that len() not accept. |
| 253 | // |
| 254 | // a.Len(mySlice, 3) |
| 255 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Lenscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Len().(object interface{}, length int, msgAndArgs ...interface{}) { |
| 256 | Lenscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Len().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., object, length, msgAndArgs...) |
| 257 | } |
| 258 | |
| 259 | // Less asserts that the first element is less than the second |
| 260 | // |
| 261 | // a.Less(1, 2) |
| 262 | // a.Less(float64(1), float64(2)) |
| 263 | // a.Less("a", "b") |
| 264 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Lessscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Less().(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { |
| 265 | Lessscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Less().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., e1, e2, msgAndArgs...) |
| 266 | } |
| 267 | |
| 268 | // LessOrEqual asserts that the first element is less than or equal to the second |
| 269 | // |
| 270 | // a.LessOrEqual(1, 2) |
| 271 | // a.LessOrEqual(2, 2) |
| 272 | // a.LessOrEqual("a", "b") |
| 273 | // a.LessOrEqual("b", "b") |
| 274 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) LessOrEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#LessOrEqual().(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) { |
| 275 | LessOrEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/LessOrEqual().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., e1, e2, msgAndArgs...) |
| 276 | } |
| 277 | |
| 278 | // Never asserts that the given condition doesn't satisfy in waitFor time, |
| 279 | // periodically checking the target function each tick. |
| 280 | // |
| 281 | // a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond) |
| 282 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Neverscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Never().(condition func() bool, waitFor timescip-go gomod github.com/golang/go/src go1.14 time/.Durationscip-go gomod github.com/golang/go/src go1.14 time/Duration#, tick timescip-go gomod github.com/golang/go/src go1.14 time/.Durationscip-go gomod github.com/golang/go/src go1.14 time/Duration#, msgAndArgs ...interface{}) { |
| 283 | Neverscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Never().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., condition, waitFor, tick, msgAndArgs...) |
| 284 | } |
| 285 | |
| 286 | // Nil asserts that the specified object is nil. |
| 287 | // |
| 288 | // a.Nil(err) |
| 289 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Nilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Nil().(object interface{}, msgAndArgs ...interface{}) { |
| 290 | Nilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Nil().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., object, msgAndArgs...) |
| 291 | } |
| 292 | |
| 293 | // NoDirExists checks whether a directory does not exist in the given path. |
| 294 | // It fails if the path points to an existing _directory_ only. |
| 295 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NoDirExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NoDirExists().(path string, msgAndArgs ...interface{}) { |
| 296 | NoDirExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NoDirExists().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., path, msgAndArgs...) |
| 297 | } |
| 298 | |
| 299 | // NoError asserts that a function returned no error (i.e. `nil`). |
| 300 | // |
| 301 | // actualObj, err := SomeFunction() |
| 302 | // if a.NoError(err) { |
| 303 | // assert.Equal(t, expectedObj, actualObj) |
| 304 | // } |
| 305 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NoErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NoError().(err error, msgAndArgs ...interface{}) { |
| 306 | NoErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NoError().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., err, msgAndArgs...) |
| 307 | } |
| 308 | |
| 309 | // NoFileExists checks whether a file does not exist in a given path. It fails |
| 310 | // if the path points to an existing _file_ only. |
| 311 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NoFileExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NoFileExists().(path string, msgAndArgs ...interface{}) { |
| 312 | NoFileExistsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NoFileExists().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., path, msgAndArgs...) |
| 313 | } |
| 314 | |
| 315 | // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the |
| 316 | // specified substring or element. |
| 317 | // |
| 318 | // a.NotContains("Hello World", "Earth") |
| 319 | // a.NotContains(["Hello", "World"], "Earth") |
| 320 | // a.NotContains({"Hello": "World"}, "Earth") |
| 321 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotContains().(s interface{}, contains interface{}, msgAndArgs ...interface{}) { |
| 322 | NotContainsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotContains().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., s, contains, msgAndArgs...) |
| 323 | } |
| 324 | |
| 325 | // NotEmpty asserts that the specified object is NOT empty. I.e. not nil, "", false, 0 or either |
| 326 | // a slice or a channel with len == 0. |
| 327 | // |
| 328 | // if a.NotEmpty(obj) { |
| 329 | // assert.Equal(t, "two", obj[1]) |
| 330 | // } |
| 331 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotEmptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotEmpty().(object interface{}, msgAndArgs ...interface{}) { |
| 332 | NotEmptyscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotEmpty().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., object, msgAndArgs...) |
| 333 | } |
| 334 | |
| 335 | // NotEqual asserts that the specified values are NOT equal. |
| 336 | // |
| 337 | // a.NotEqual(obj1, obj2) |
| 338 | // |
| 339 | // Pointer variable equality is determined based on the equality of the |
| 340 | // referenced values (as opposed to the memory addresses). |
| 341 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotEqual().(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { |
| 342 | NotEqualscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotEqual().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 343 | } |
| 344 | |
| 345 | // NotEqualValues asserts that two objects are not equal even when converted to the same type |
| 346 | // |
| 347 | // a.NotEqualValues(obj1, obj2) |
| 348 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotEqualValuesscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotEqualValues().(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { |
| 349 | NotEqualValuesscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotEqualValues().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 350 | } |
| 351 | |
| 352 | // NotNil asserts that the specified object is not nil. |
| 353 | // |
| 354 | // a.NotNil(err) |
| 355 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotNilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotNil().(object interface{}, msgAndArgs ...interface{}) { |
| 356 | NotNilscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotNil().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., object, msgAndArgs...) |
| 357 | } |
| 358 | |
| 359 | // NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic. |
| 360 | // |
| 361 | // a.NotPanics(func(){ RemainCalm() }) |
| 362 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotPanicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotPanics().(f assertscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/.PanicTestFuncscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/PanicTestFunc#, msgAndArgs ...interface{}) { |
| 363 | NotPanicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotPanics().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., f, msgAndArgs...) |
| 364 | } |
| 365 | |
| 366 | // NotRegexp asserts that a specified regexp does not match a string. |
| 367 | // |
| 368 | // a.NotRegexp(regexp.MustCompile("starts"), "it's starting") |
| 369 | // a.NotRegexp("^start", "it's not starting") |
| 370 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotRegexpscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotRegexp().(rx interface{}, str interface{}, msgAndArgs ...interface{}) { |
| 371 | NotRegexpscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotRegexp().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., rx, str, msgAndArgs...) |
| 372 | } |
| 373 | |
| 374 | // NotSame asserts that two pointers do not reference the same object. |
| 375 | // |
| 376 | // a.NotSame(ptr1, ptr2) |
| 377 | // |
| 378 | // Both arguments must be pointer variables. Pointer variable sameness is |
| 379 | // determined based on the equality of both type and value. |
| 380 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotSamescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotSame().(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { |
| 381 | NotSamescip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotSame().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 382 | } |
| 383 | |
| 384 | // NotSubset asserts that the specified list(array, slice...) contains not all |
| 385 | // elements given in the specified subset(array, slice...). |
| 386 | // |
| 387 | // a.NotSubset([1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]") |
| 388 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotSubsetscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotSubset().(list interface{}, subset interface{}, msgAndArgs ...interface{}) { |
| 389 | NotSubsetscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotSubset().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., list, subset, msgAndArgs...) |
| 390 | } |
| 391 | |
| 392 | // NotZero asserts that i is not the zero value for its type. |
| 393 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) NotZeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#NotZero().(i interface{}, msgAndArgs ...interface{}) { |
| 394 | NotZeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/NotZero().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., i, msgAndArgs...) |
| 395 | } |
| 396 | |
| 397 | // Panics asserts that the code inside the specified PanicTestFunc panics. |
| 398 | // |
| 399 | // a.Panics(func(){ GoCrazy() }) |
| 400 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Panicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Panics().(f assertscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/.PanicTestFuncscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/PanicTestFunc#, msgAndArgs ...interface{}) { |
| 401 | Panicsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Panics().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., f, msgAndArgs...) |
| 402 | } |
| 403 | |
| 404 | // PanicsWithError asserts that the code inside the specified PanicTestFunc |
| 405 | // panics, and that the recovered panic value is an error that satisfies the |
| 406 | // EqualError comparison. |
| 407 | // |
| 408 | // a.PanicsWithError("crazy error", func(){ GoCrazy() }) |
| 409 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) PanicsWithErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#PanicsWithError().(errString string, f assertscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/.PanicTestFuncscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/PanicTestFunc#, msgAndArgs ...interface{}) { |
| 410 | PanicsWithErrorscip-go gomod github.com/tj/assert . `github.com/tj/assert`/PanicsWithError().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., errString, f, msgAndArgs...) |
| 411 | } |
| 412 | |
| 413 | // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that |
| 414 | // the recovered panic value equals the expected panic value. |
| 415 | // |
| 416 | // a.PanicsWithValue("crazy error", func(){ GoCrazy() }) |
| 417 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) PanicsWithValuescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#PanicsWithValue().(expected interface{}, f assertscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/.PanicTestFuncscip-go gomod github.com/stretchr/testify v1.6.1 `github.com/stretchr/testify/assert`/PanicTestFunc#, msgAndArgs ...interface{}) { |
| 418 | PanicsWithValuescip-go gomod github.com/tj/assert . `github.com/tj/assert`/PanicsWithValue().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, f, msgAndArgs...) |
| 419 | } |
| 420 | |
| 421 | // Regexp asserts that a specified regexp matches a string. |
| 422 | // |
| 423 | // a.Regexp(regexp.MustCompile("start"), "it's starting") |
| 424 | // a.Regexp("start...$", "it's not starting") |
| 425 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Regexpscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Regexp().(rx interface{}, str interface{}, msgAndArgs ...interface{}) { |
| 426 | Regexpscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Regexp().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., rx, str, msgAndArgs...) |
| 427 | } |
| 428 | |
| 429 | // Same asserts that two pointers reference the same object. |
| 430 | // |
| 431 | // a.Same(ptr1, ptr2) |
| 432 | // |
| 433 | // Both arguments must be pointer variables. Pointer variable sameness is |
| 434 | // determined based on the equality of both type and value. |
| 435 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Samescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Same().(expected interface{}, actual interface{}, msgAndArgs ...interface{}) { |
| 436 | Samescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Same().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 437 | } |
| 438 | |
| 439 | // Subset asserts that the specified list(array, slice...) contains all |
| 440 | // elements given in the specified subset(array, slice...). |
| 441 | // |
| 442 | // a.Subset([1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]") |
| 443 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Subsetscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Subset().(list interface{}, subset interface{}, msgAndArgs ...interface{}) { |
| 444 | Subsetscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Subset().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., list, subset, msgAndArgs...) |
| 445 | } |
| 446 | |
| 447 | // True asserts that the specified value is true. |
| 448 | // |
| 449 | // a.True(myBool) |
| 450 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Truescip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#True().(value bool, msgAndArgs ...interface{}) { |
| 451 | Truescip-go gomod github.com/tj/assert . `github.com/tj/assert`/True().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., value, msgAndArgs...) |
| 452 | } |
| 453 | |
| 454 | // WithinDuration asserts that the two times are within duration delta of each other. |
| 455 | // |
| 456 | // a.WithinDuration(time.Now(), time.Now(), 10*time.Second) |
| 457 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) WithinDurationscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#WithinDuration().(expected timescip-go gomod github.com/golang/go/src go1.14 time/.Timescip-go gomod github.com/golang/go/src go1.14 time/Time#, actual timescip-go gomod github.com/golang/go/src go1.14 time/.Timescip-go gomod github.com/golang/go/src go1.14 time/Time#, delta timescip-go gomod github.com/golang/go/src go1.14 time/.Durationscip-go gomod github.com/golang/go/src go1.14 time/Duration#, msgAndArgs ...interface{}) { |
| 458 | WithinDurationscip-go gomod github.com/tj/assert . `github.com/tj/assert`/WithinDuration().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, delta, msgAndArgs...) |
| 459 | } |
| 460 | |
| 461 | // YAMLEq asserts that two YAML strings are equivalent. |
| 462 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) YAMLEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#YAMLEq().(expected string, actual string, msgAndArgs ...interface{}) { |
| 463 | YAMLEqscip-go gomod github.com/tj/assert . `github.com/tj/assert`/YAMLEq().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., expected, actual, msgAndArgs...) |
| 464 | } |
| 465 | |
| 466 | // Zero asserts that i is the zero value for its type. |
| 467 | func (a *Assertionsscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#) Zeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#Zero().(i interface{}, msgAndArgs ...interface{}) { |
| 468 | Zeroscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Zero().(a.tscip-go gomod github.com/tj/assert . `github.com/tj/assert`/Assertions#t., i, msgAndArgs...) |
| 469 | } |