OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / stretchr / testify / require / require.go
1 /*
2 * CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
3 * THIS FILE MUST NOT BE EDITED BY HAND
4  */
5
6 package require
7
8 import (
9         assert "github.com/stretchr/testify/assert"
10         http "net/http"
11         url "net/url"
12         time "time"
13 )
14
15 // Condition uses a Comparison to assert a complex condition.
16 func Condition(t TestingT, comp assert.Comparison, msgAndArgs ...interface{}) {
17         if !assert.Condition(t, comp, msgAndArgs...) {
18                 t.FailNow()
19         }
20 }
21
22 // Conditionf uses a Comparison to assert a complex condition.
23 func Conditionf(t TestingT, comp assert.Comparison, msg string, args ...interface{}) {
24         if !assert.Conditionf(t, comp, msg, args...) {
25                 t.FailNow()
26         }
27 }
28
29 // Contains asserts that the specified string, list(array, slice...) or map contains the
30 // specified substring or element.
31 //
32 //    assert.Contains(t, "Hello World", "World")
33 //    assert.Contains(t, ["Hello", "World"], "World")
34 //    assert.Contains(t, {"Hello": "World"}, "Hello")
35 //
36 // Returns whether the assertion was successful (true) or not (false).
37 func Contains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
38         if !assert.Contains(t, s, contains, msgAndArgs...) {
39                 t.FailNow()
40         }
41 }
42
43 // Containsf asserts that the specified string, list(array, slice...) or map contains the
44 // specified substring or element.
45 //
46 //    assert.Containsf(t, "Hello World", "World", "error message %s", "formatted")
47 //    assert.Containsf(t, ["Hello", "World"], "World", "error message %s", "formatted")
48 //    assert.Containsf(t, {"Hello": "World"}, "Hello", "error message %s", "formatted")
49 //
50 // Returns whether the assertion was successful (true) or not (false).
51 func Containsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) {
52         if !assert.Containsf(t, s, contains, msg, args...) {
53                 t.FailNow()
54         }
55 }
56
57 // Empty asserts that the specified object is empty.  I.e. nil, "", false, 0 or either
58 // a slice or a channel with len == 0.
59 //
60 //  assert.Empty(t, obj)
61 //
62 // Returns whether the assertion was successful (true) or not (false).
63 func Empty(t TestingT, object interface{}, msgAndArgs ...interface{}) {
64         if !assert.Empty(t, object, msgAndArgs...) {
65                 t.FailNow()
66         }
67 }
68
69 // Emptyf asserts that the specified object is empty.  I.e. nil, "", false, 0 or either
70 // a slice or a channel with len == 0.
71 //
72 //  assert.Emptyf(t, obj, "error message %s", "formatted")
73 //
74 // Returns whether the assertion was successful (true) or not (false).
75 func Emptyf(t TestingT, object interface{}, msg string, args ...interface{}) {
76         if !assert.Emptyf(t, object, msg, args...) {
77                 t.FailNow()
78         }
79 }
80
81 // Equal asserts that two objects are equal.
82 //
83 //    assert.Equal(t, 123, 123)
84 //
85 // Returns whether the assertion was successful (true) or not (false).
86 //
87 // Pointer variable equality is determined based on the equality of the
88 // referenced values (as opposed to the memory addresses). Function equality
89 // cannot be determined and will always fail.
90 func Equal(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
91         if !assert.Equal(t, expected, actual, msgAndArgs...) {
92                 t.FailNow()
93         }
94 }
95
96 // EqualError asserts that a function returned an error (i.e. not `nil`)
97 // and that it is equal to the provided error.
98 //
99 //   actualObj, err := SomeFunction()
100 //   assert.EqualError(t, err,  expectedErrorString)
101 //
102 // Returns whether the assertion was successful (true) or not (false).
103 func EqualError(t TestingT, theError error, errString string, msgAndArgs ...interface{}) {
104         if !assert.EqualError(t, theError, errString, msgAndArgs...) {
105                 t.FailNow()
106         }
107 }
108
109 // EqualErrorf asserts that a function returned an error (i.e. not `nil`)
110 // and that it is equal to the provided error.
111 //
112 //   actualObj, err := SomeFunction()
113 //   assert.EqualErrorf(t, err,  expectedErrorString, "error message %s", "formatted")
114 //
115 // Returns whether the assertion was successful (true) or not (false).
116 func EqualErrorf(t TestingT, theError error, errString string, msg string, args ...interface{}) {
117         if !assert.EqualErrorf(t, theError, errString, msg, args...) {
118                 t.FailNow()
119         }
120 }
121
122 // EqualValues asserts that two objects are equal or convertable to the same types
123 // and equal.
124 //
125 //    assert.EqualValues(t, uint32(123), int32(123))
126 //
127 // Returns whether the assertion was successful (true) or not (false).
128 func EqualValues(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
129         if !assert.EqualValues(t, expected, actual, msgAndArgs...) {
130                 t.FailNow()
131         }
132 }
133
134 // EqualValuesf asserts that two objects are equal or convertable to the same types
135 // and equal.
136 //
137 //    assert.EqualValuesf(t, uint32(123, "error message %s", "formatted"), int32(123))
138 //
139 // Returns whether the assertion was successful (true) or not (false).
140 func EqualValuesf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
141         if !assert.EqualValuesf(t, expected, actual, msg, args...) {
142                 t.FailNow()
143         }
144 }
145
146 // Equalf asserts that two objects are equal.
147 //
148 //    assert.Equalf(t, 123, 123, "error message %s", "formatted")
149 //
150 // Returns whether the assertion was successful (true) or not (false).
151 //
152 // Pointer variable equality is determined based on the equality of the
153 // referenced values (as opposed to the memory addresses). Function equality
154 // cannot be determined and will always fail.
155 func Equalf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
156         if !assert.Equalf(t, expected, actual, msg, args...) {
157                 t.FailNow()
158         }
159 }
160
161 // Error asserts that a function returned an error (i.e. not `nil`).
162 //
163 //   actualObj, err := SomeFunction()
164 //   if assert.Error(t, err) {
165 //         assert.Equal(t, expectedError, err)
166 //   }
167 //
168 // Returns whether the assertion was successful (true) or not (false).
169 func Error(t TestingT, err error, msgAndArgs ...interface{}) {
170         if !assert.Error(t, err, msgAndArgs...) {
171                 t.FailNow()
172         }
173 }
174
175 // Errorf asserts that a function returned an error (i.e. not `nil`).
176 //
177 //   actualObj, err := SomeFunction()
178 //   if assert.Errorf(t, err, "error message %s", "formatted") {
179 //         assert.Equal(t, expectedErrorf, err)
180 //   }
181 //
182 // Returns whether the assertion was successful (true) or not (false).
183 func Errorf(t TestingT, err error, msg string, args ...interface{}) {
184         if !assert.Errorf(t, err, msg, args...) {
185                 t.FailNow()
186         }
187 }
188
189 // Exactly asserts that two objects are equal is value and type.
190 //
191 //    assert.Exactly(t, int32(123), int64(123))
192 //
193 // Returns whether the assertion was successful (true) or not (false).
194 func Exactly(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
195         if !assert.Exactly(t, expected, actual, msgAndArgs...) {
196                 t.FailNow()
197         }
198 }
199
200 // Exactlyf asserts that two objects are equal is value and type.
201 //
202 //    assert.Exactlyf(t, int32(123, "error message %s", "formatted"), int64(123))
203 //
204 // Returns whether the assertion was successful (true) or not (false).
205 func Exactlyf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
206         if !assert.Exactlyf(t, expected, actual, msg, args...) {
207                 t.FailNow()
208         }
209 }
210
211 // Fail reports a failure through
212 func Fail(t TestingT, failureMessage string, msgAndArgs ...interface{}) {
213         if !assert.Fail(t, failureMessage, msgAndArgs...) {
214                 t.FailNow()
215         }
216 }
217
218 // FailNow fails test
219 func FailNow(t TestingT, failureMessage string, msgAndArgs ...interface{}) {
220         if !assert.FailNow(t, failureMessage, msgAndArgs...) {
221                 t.FailNow()
222         }
223 }
224
225 // FailNowf fails test
226 func FailNowf(t TestingT, failureMessage string, msg string, args ...interface{}) {
227         if !assert.FailNowf(t, failureMessage, msg, args...) {
228                 t.FailNow()
229         }
230 }
231
232 // Failf reports a failure through
233 func Failf(t TestingT, failureMessage string, msg string, args ...interface{}) {
234         if !assert.Failf(t, failureMessage, msg, args...) {
235                 t.FailNow()
236         }
237 }
238
239 // False asserts that the specified value is false.
240 //
241 //    assert.False(t, myBool)
242 //
243 // Returns whether the assertion was successful (true) or not (false).
244 func False(t TestingT, value bool, msgAndArgs ...interface{}) {
245         if !assert.False(t, value, msgAndArgs...) {
246                 t.FailNow()
247         }
248 }
249
250 // Falsef asserts that the specified value is false.
251 //
252 //    assert.Falsef(t, myBool, "error message %s", "formatted")
253 //
254 // Returns whether the assertion was successful (true) or not (false).
255 func Falsef(t TestingT, value bool, msg string, args ...interface{}) {
256         if !assert.Falsef(t, value, msg, args...) {
257                 t.FailNow()
258         }
259 }
260
261 // HTTPBodyContains asserts that a specified handler returns a
262 // body that contains a string.
263 //
264 //  assert.HTTPBodyContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky")
265 //
266 // Returns whether the assertion was successful (true) or not (false).
267 func HTTPBodyContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}) {
268         if !assert.HTTPBodyContains(t, handler, method, url, values, str) {
269                 t.FailNow()
270         }
271 }
272
273 // HTTPBodyContainsf asserts that a specified handler returns a
274 // body that contains a string.
275 //
276 //  assert.HTTPBodyContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
277 //
278 // Returns whether the assertion was successful (true) or not (false).
279 func HTTPBodyContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}) {
280         if !assert.HTTPBodyContainsf(t, handler, method, url, values, str) {
281                 t.FailNow()
282         }
283 }
284
285 // HTTPBodyNotContains asserts that a specified handler returns a
286 // body that does not contain a string.
287 //
288 //  assert.HTTPBodyNotContains(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky")
289 //
290 // Returns whether the assertion was successful (true) or not (false).
291 func HTTPBodyNotContains(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}) {
292         if !assert.HTTPBodyNotContains(t, handler, method, url, values, str) {
293                 t.FailNow()
294         }
295 }
296
297 // HTTPBodyNotContainsf asserts that a specified handler returns a
298 // body that does not contain a string.
299 //
300 //  assert.HTTPBodyNotContainsf(t, myHandler, "www.google.com", nil, "I'm Feeling Lucky", "error message %s", "formatted")
301 //
302 // Returns whether the assertion was successful (true) or not (false).
303 func HTTPBodyNotContainsf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values, str interface{}) {
304         if !assert.HTTPBodyNotContainsf(t, handler, method, url, values, str) {
305                 t.FailNow()
306         }
307 }
308
309 // HTTPError asserts that a specified handler returns an error status code.
310 //
311 //  assert.HTTPError(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
312 //
313 // Returns whether the assertion was successful (true) or not (false).
314 func HTTPError(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values) {
315         if !assert.HTTPError(t, handler, method, url, values) {
316                 t.FailNow()
317         }
318 }
319
320 // HTTPErrorf asserts that a specified handler returns an error status code.
321 //
322 //  assert.HTTPErrorf(t, myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
323 //
324 // Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
325 func HTTPErrorf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values) {
326         if !assert.HTTPErrorf(t, handler, method, url, values) {
327                 t.FailNow()
328         }
329 }
330
331 // HTTPRedirect asserts that a specified handler returns a redirect status code.
332 //
333 //  assert.HTTPRedirect(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
334 //
335 // Returns whether the assertion was successful (true) or not (false).
336 func HTTPRedirect(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values) {
337         if !assert.HTTPRedirect(t, handler, method, url, values) {
338                 t.FailNow()
339         }
340 }
341
342 // HTTPRedirectf asserts that a specified handler returns a redirect status code.
343 //
344 //  assert.HTTPRedirectf(t, myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
345 //
346 // Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
347 func HTTPRedirectf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values) {
348         if !assert.HTTPRedirectf(t, handler, method, url, values) {
349                 t.FailNow()
350         }
351 }
352
353 // HTTPSuccess asserts that a specified handler returns a success status code.
354 //
355 //  assert.HTTPSuccess(t, myHandler, "POST", "http://www.google.com", nil)
356 //
357 // Returns whether the assertion was successful (true) or not (false).
358 func HTTPSuccess(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values) {
359         if !assert.HTTPSuccess(t, handler, method, url, values) {
360                 t.FailNow()
361         }
362 }
363
364 // HTTPSuccessf asserts that a specified handler returns a success status code.
365 //
366 //  assert.HTTPSuccessf(t, myHandler, "POST", "http://www.google.com", nil, "error message %s", "formatted")
367 //
368 // Returns whether the assertion was successful (true) or not (false).
369 func HTTPSuccessf(t TestingT, handler http.HandlerFunc, method string, url string, values url.Values) {
370         if !assert.HTTPSuccessf(t, handler, method, url, values) {
371                 t.FailNow()
372         }
373 }
374
375 // Implements asserts that an object is implemented by the specified interface.
376 //
377 //    assert.Implements(t, (*MyInterface)(nil), new(MyObject))
378 func Implements(t TestingT, interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
379         if !assert.Implements(t, interfaceObject, object, msgAndArgs...) {
380                 t.FailNow()
381         }
382 }
383
384 // Implementsf asserts that an object is implemented by the specified interface.
385 //
386 //    assert.Implementsf(t, (*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
387 func Implementsf(t TestingT, interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
388         if !assert.Implementsf(t, interfaceObject, object, msg, args...) {
389                 t.FailNow()
390         }
391 }
392
393 // InDelta asserts that the two numerals are within delta of each other.
394 //
395 //       assert.InDelta(t, math.Pi, (22 / 7.0), 0.01)
396 //
397 // Returns whether the assertion was successful (true) or not (false).
398 func InDelta(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
399         if !assert.InDelta(t, expected, actual, delta, msgAndArgs...) {
400                 t.FailNow()
401         }
402 }
403
404 // InDeltaSlice is the same as InDelta, except it compares two slices.
405 func InDeltaSlice(t TestingT, expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
406         if !assert.InDeltaSlice(t, expected, actual, delta, msgAndArgs...) {
407                 t.FailNow()
408         }
409 }
410
411 // InDeltaSlicef is the same as InDelta, except it compares two slices.
412 func InDeltaSlicef(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
413         if !assert.InDeltaSlicef(t, expected, actual, delta, msg, args...) {
414                 t.FailNow()
415         }
416 }
417
418 // InDeltaf asserts that the two numerals are within delta of each other.
419 //
420 //       assert.InDeltaf(t, math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
421 //
422 // Returns whether the assertion was successful (true) or not (false).
423 func InDeltaf(t TestingT, expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
424         if !assert.InDeltaf(t, expected, actual, delta, msg, args...) {
425                 t.FailNow()
426         }
427 }
428
429 // InEpsilon asserts that expected and actual have a relative error less than epsilon
430 //
431 // Returns whether the assertion was successful (true) or not (false).
432 func InEpsilon(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
433         if !assert.InEpsilon(t, expected, actual, epsilon, msgAndArgs...) {
434                 t.FailNow()
435         }
436 }
437
438 // InEpsilonSlice is the same as InEpsilon, except it compares each value from two slices.
439 func InEpsilonSlice(t TestingT, expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
440         if !assert.InEpsilonSlice(t, expected, actual, epsilon, msgAndArgs...) {
441                 t.FailNow()
442         }
443 }
444
445 // InEpsilonSlicef is the same as InEpsilon, except it compares each value from two slices.
446 func InEpsilonSlicef(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
447         if !assert.InEpsilonSlicef(t, expected, actual, epsilon, msg, args...) {
448                 t.FailNow()
449         }
450 }
451
452 // InEpsilonf asserts that expected and actual have a relative error less than epsilon
453 //
454 // Returns whether the assertion was successful (true) or not (false).
455 func InEpsilonf(t TestingT, expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
456         if !assert.InEpsilonf(t, expected, actual, epsilon, msg, args...) {
457                 t.FailNow()
458         }
459 }
460
461 // IsType asserts that the specified objects are of the same type.
462 func IsType(t TestingT, expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
463         if !assert.IsType(t, expectedType, object, msgAndArgs...) {
464                 t.FailNow()
465         }
466 }
467
468 // IsTypef asserts that the specified objects are of the same type.
469 func IsTypef(t TestingT, expectedType interface{}, object interface{}, msg string, args ...interface{}) {
470         if !assert.IsTypef(t, expectedType, object, msg, args...) {
471                 t.FailNow()
472         }
473 }
474
475 // JSONEq asserts that two JSON strings are equivalent.
476 //
477 //  assert.JSONEq(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`)
478 //
479 // Returns whether the assertion was successful (true) or not (false).
480 func JSONEq(t TestingT, expected string, actual string, msgAndArgs ...interface{}) {
481         if !assert.JSONEq(t, expected, actual, msgAndArgs...) {
482                 t.FailNow()
483         }
484 }
485
486 // JSONEqf asserts that two JSON strings are equivalent.
487 //
488 //  assert.JSONEqf(t, `{"hello": "world", "foo": "bar"}`, `{"foo": "bar", "hello": "world"}`, "error message %s", "formatted")
489 //
490 // Returns whether the assertion was successful (true) or not (false).
491 func JSONEqf(t TestingT, expected string, actual string, msg string, args ...interface{}) {
492         if !assert.JSONEqf(t, expected, actual, msg, args...) {
493                 t.FailNow()
494         }
495 }
496
497 // Len asserts that the specified object has specific length.
498 // Len also fails if the object has a type that len() not accept.
499 //
500 //    assert.Len(t, mySlice, 3)
501 //
502 // Returns whether the assertion was successful (true) or not (false).
503 func Len(t TestingT, object interface{}, length int, msgAndArgs ...interface{}) {
504         if !assert.Len(t, object, length, msgAndArgs...) {
505                 t.FailNow()
506         }
507 }
508
509 // Lenf asserts that the specified object has specific length.
510 // Lenf also fails if the object has a type that len() not accept.
511 //
512 //    assert.Lenf(t, mySlice, 3, "error message %s", "formatted")
513 //
514 // Returns whether the assertion was successful (true) or not (false).
515 func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) {
516         if !assert.Lenf(t, object, length, msg, args...) {
517                 t.FailNow()
518         }
519 }
520
521 // Nil asserts that the specified object is nil.
522 //
523 //    assert.Nil(t, err)
524 //
525 // Returns whether the assertion was successful (true) or not (false).
526 func Nil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
527         if !assert.Nil(t, object, msgAndArgs...) {
528                 t.FailNow()
529         }
530 }
531
532 // Nilf asserts that the specified object is nil.
533 //
534 //    assert.Nilf(t, err, "error message %s", "formatted")
535 //
536 // Returns whether the assertion was successful (true) or not (false).
537 func Nilf(t TestingT, object interface{}, msg string, args ...interface{}) {
538         if !assert.Nilf(t, object, msg, args...) {
539                 t.FailNow()
540         }
541 }
542
543 // NoError asserts that a function returned no error (i.e. `nil`).
544 //
545 //   actualObj, err := SomeFunction()
546 //   if assert.NoError(t, err) {
547 //         assert.Equal(t, expectedObj, actualObj)
548 //   }
549 //
550 // Returns whether the assertion was successful (true) or not (false).
551 func NoError(t TestingT, err error, msgAndArgs ...interface{}) {
552         if !assert.NoError(t, err, msgAndArgs...) {
553                 t.FailNow()
554         }
555 }
556
557 // NoErrorf asserts that a function returned no error (i.e. `nil`).
558 //
559 //   actualObj, err := SomeFunction()
560 //   if assert.NoErrorf(t, err, "error message %s", "formatted") {
561 //         assert.Equal(t, expectedObj, actualObj)
562 //   }
563 //
564 // Returns whether the assertion was successful (true) or not (false).
565 func NoErrorf(t TestingT, err error, msg string, args ...interface{}) {
566         if !assert.NoErrorf(t, err, msg, args...) {
567                 t.FailNow()
568         }
569 }
570
571 // NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
572 // specified substring or element.
573 //
574 //    assert.NotContains(t, "Hello World", "Earth")
575 //    assert.NotContains(t, ["Hello", "World"], "Earth")
576 //    assert.NotContains(t, {"Hello": "World"}, "Earth")
577 //
578 // Returns whether the assertion was successful (true) or not (false).
579 func NotContains(t TestingT, s interface{}, contains interface{}, msgAndArgs ...interface{}) {
580         if !assert.NotContains(t, s, contains, msgAndArgs...) {
581                 t.FailNow()
582         }
583 }
584
585 // NotContainsf asserts that the specified string, list(array, slice...) or map does NOT contain the
586 // specified substring or element.
587 //
588 //    assert.NotContainsf(t, "Hello World", "Earth", "error message %s", "formatted")
589 //    assert.NotContainsf(t, ["Hello", "World"], "Earth", "error message %s", "formatted")
590 //    assert.NotContainsf(t, {"Hello": "World"}, "Earth", "error message %s", "formatted")
591 //
592 // Returns whether the assertion was successful (true) or not (false).
593 func NotContainsf(t TestingT, s interface{}, contains interface{}, msg string, args ...interface{}) {
594         if !assert.NotContainsf(t, s, contains, msg, args...) {
595                 t.FailNow()
596         }
597 }
598
599 // NotEmpty asserts that the specified object is NOT empty.  I.e. not nil, "", false, 0 or either
600 // a slice or a channel with len == 0.
601 //
602 //  if assert.NotEmpty(t, obj) {
603 //    assert.Equal(t, "two", obj[1])
604 //  }
605 //
606 // Returns whether the assertion was successful (true) or not (false).
607 func NotEmpty(t TestingT, object interface{}, msgAndArgs ...interface{}) {
608         if !assert.NotEmpty(t, object, msgAndArgs...) {
609                 t.FailNow()
610         }
611 }
612
613 // NotEmptyf asserts that the specified object is NOT empty.  I.e. not nil, "", false, 0 or either
614 // a slice or a channel with len == 0.
615 //
616 //  if assert.NotEmptyf(t, obj, "error message %s", "formatted") {
617 //    assert.Equal(t, "two", obj[1])
618 //  }
619 //
620 // Returns whether the assertion was successful (true) or not (false).
621 func NotEmptyf(t TestingT, object interface{}, msg string, args ...interface{}) {
622         if !assert.NotEmptyf(t, object, msg, args...) {
623                 t.FailNow()
624         }
625 }
626
627 // NotEqual asserts that the specified values are NOT equal.
628 //
629 //    assert.NotEqual(t, obj1, obj2)
630 //
631 // Returns whether the assertion was successful (true) or not (false).
632 //
633 // Pointer variable equality is determined based on the equality of the
634 // referenced values (as opposed to the memory addresses).
635 func NotEqual(t TestingT, expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
636         if !assert.NotEqual(t, expected, actual, msgAndArgs...) {
637                 t.FailNow()
638         }
639 }
640
641 // NotEqualf asserts that the specified values are NOT equal.
642 //
643 //    assert.NotEqualf(t, obj1, obj2, "error message %s", "formatted")
644 //
645 // Returns whether the assertion was successful (true) or not (false).
646 //
647 // Pointer variable equality is determined based on the equality of the
648 // referenced values (as opposed to the memory addresses).
649 func NotEqualf(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
650         if !assert.NotEqualf(t, expected, actual, msg, args...) {
651                 t.FailNow()
652         }
653 }
654
655 // NotNil asserts that the specified object is not nil.
656 //
657 //    assert.NotNil(t, err)
658 //
659 // Returns whether the assertion was successful (true) or not (false).
660 func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) {
661         if !assert.NotNil(t, object, msgAndArgs...) {
662                 t.FailNow()
663         }
664 }
665
666 // NotNilf asserts that the specified object is not nil.
667 //
668 //    assert.NotNilf(t, err, "error message %s", "formatted")
669 //
670 // Returns whether the assertion was successful (true) or not (false).
671 func NotNilf(t TestingT, object interface{}, msg string, args ...interface{}) {
672         if !assert.NotNilf(t, object, msg, args...) {
673                 t.FailNow()
674         }
675 }
676
677 // NotPanics asserts that the code inside the specified PanicTestFunc does NOT panic.
678 //
679 //   assert.NotPanics(t, func(){ RemainCalm() })
680 //
681 // Returns whether the assertion was successful (true) or not (false).
682 func NotPanics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
683         if !assert.NotPanics(t, f, msgAndArgs...) {
684                 t.FailNow()
685         }
686 }
687
688 // NotPanicsf asserts that the code inside the specified PanicTestFunc does NOT panic.
689 //
690 //   assert.NotPanicsf(t, func(){ RemainCalm() }, "error message %s", "formatted")
691 //
692 // Returns whether the assertion was successful (true) or not (false).
693 func NotPanicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) {
694         if !assert.NotPanicsf(t, f, msg, args...) {
695                 t.FailNow()
696         }
697 }
698
699 // NotRegexp asserts that a specified regexp does not match a string.
700 //
701 //  assert.NotRegexp(t, regexp.MustCompile("starts"), "it's starting")
702 //  assert.NotRegexp(t, "^start", "it's not starting")
703 //
704 // Returns whether the assertion was successful (true) or not (false).
705 func NotRegexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
706         if !assert.NotRegexp(t, rx, str, msgAndArgs...) {
707                 t.FailNow()
708         }
709 }
710
711 // NotRegexpf asserts that a specified regexp does not match a string.
712 //
713 //  assert.NotRegexpf(t, regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
714 //  assert.NotRegexpf(t, "^start", "it's not starting", "error message %s", "formatted")
715 //
716 // Returns whether the assertion was successful (true) or not (false).
717 func NotRegexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) {
718         if !assert.NotRegexpf(t, rx, str, msg, args...) {
719                 t.FailNow()
720         }
721 }
722
723 // NotSubset asserts that the specified list(array, slice...) contains not all
724 // elements given in the specified subset(array, slice...).
725 //
726 //    assert.NotSubset(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]")
727 //
728 // Returns whether the assertion was successful (true) or not (false).
729 func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
730         if !assert.NotSubset(t, list, subset, msgAndArgs...) {
731                 t.FailNow()
732         }
733 }
734
735 // NotSubsetf asserts that the specified list(array, slice...) contains not all
736 // elements given in the specified subset(array, slice...).
737 //
738 //    assert.NotSubsetf(t, [1, 3, 4], [1, 2], "But [1, 3, 4] does not contain [1, 2]", "error message %s", "formatted")
739 //
740 // Returns whether the assertion was successful (true) or not (false).
741 func NotSubsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {
742         if !assert.NotSubsetf(t, list, subset, msg, args...) {
743                 t.FailNow()
744         }
745 }
746
747 // NotZero asserts that i is not the zero value for its type and returns the truth.
748 func NotZero(t TestingT, i interface{}, msgAndArgs ...interface{}) {
749         if !assert.NotZero(t, i, msgAndArgs...) {
750                 t.FailNow()
751         }
752 }
753
754 // NotZerof asserts that i is not the zero value for its type and returns the truth.
755 func NotZerof(t TestingT, i interface{}, msg string, args ...interface{}) {
756         if !assert.NotZerof(t, i, msg, args...) {
757                 t.FailNow()
758         }
759 }
760
761 // Panics asserts that the code inside the specified PanicTestFunc panics.
762 //
763 //   assert.Panics(t, func(){ GoCrazy() })
764 //
765 // Returns whether the assertion was successful (true) or not (false).
766 func Panics(t TestingT, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
767         if !assert.Panics(t, f, msgAndArgs...) {
768                 t.FailNow()
769         }
770 }
771
772 // PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
773 // the recovered panic value equals the expected panic value.
774 //
775 //   assert.PanicsWithValue(t, "crazy error", func(){ GoCrazy() })
776 //
777 // Returns whether the assertion was successful (true) or not (false).
778 func PanicsWithValue(t TestingT, expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
779         if !assert.PanicsWithValue(t, expected, f, msgAndArgs...) {
780                 t.FailNow()
781         }
782 }
783
784 // PanicsWithValuef asserts that the code inside the specified PanicTestFunc panics, and that
785 // the recovered panic value equals the expected panic value.
786 //
787 //   assert.PanicsWithValuef(t, "crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
788 //
789 // Returns whether the assertion was successful (true) or not (false).
790 func PanicsWithValuef(t TestingT, expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) {
791         if !assert.PanicsWithValuef(t, expected, f, msg, args...) {
792                 t.FailNow()
793         }
794 }
795
796 // Panicsf asserts that the code inside the specified PanicTestFunc panics.
797 //
798 //   assert.Panicsf(t, func(){ GoCrazy() }, "error message %s", "formatted")
799 //
800 // Returns whether the assertion was successful (true) or not (false).
801 func Panicsf(t TestingT, f assert.PanicTestFunc, msg string, args ...interface{}) {
802         if !assert.Panicsf(t, f, msg, args...) {
803                 t.FailNow()
804         }
805 }
806
807 // Regexp asserts that a specified regexp matches a string.
808 //
809 //  assert.Regexp(t, regexp.MustCompile("start"), "it's starting")
810 //  assert.Regexp(t, "start...$", "it's not starting")
811 //
812 // Returns whether the assertion was successful (true) or not (false).
813 func Regexp(t TestingT, rx interface{}, str interface{}, msgAndArgs ...interface{}) {
814         if !assert.Regexp(t, rx, str, msgAndArgs...) {
815                 t.FailNow()
816         }
817 }
818
819 // Regexpf asserts that a specified regexp matches a string.
820 //
821 //  assert.Regexpf(t, regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
822 //  assert.Regexpf(t, "start...$", "it's not starting", "error message %s", "formatted")
823 //
824 // Returns whether the assertion was successful (true) or not (false).
825 func Regexpf(t TestingT, rx interface{}, str interface{}, msg string, args ...interface{}) {
826         if !assert.Regexpf(t, rx, str, msg, args...) {
827                 t.FailNow()
828         }
829 }
830
831 // Subset asserts that the specified list(array, slice...) contains all
832 // elements given in the specified subset(array, slice...).
833 //
834 //    assert.Subset(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]")
835 //
836 // Returns whether the assertion was successful (true) or not (false).
837 func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
838         if !assert.Subset(t, list, subset, msgAndArgs...) {
839                 t.FailNow()
840         }
841 }
842
843 // Subsetf asserts that the specified list(array, slice...) contains all
844 // elements given in the specified subset(array, slice...).
845 //
846 //    assert.Subsetf(t, [1, 2, 3], [1, 2], "But [1, 2, 3] does contain [1, 2]", "error message %s", "formatted")
847 //
848 // Returns whether the assertion was successful (true) or not (false).
849 func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {
850         if !assert.Subsetf(t, list, subset, msg, args...) {
851                 t.FailNow()
852         }
853 }
854
855 // True asserts that the specified value is true.
856 //
857 //    assert.True(t, myBool)
858 //
859 // Returns whether the assertion was successful (true) or not (false).
860 func True(t TestingT, value bool, msgAndArgs ...interface{}) {
861         if !assert.True(t, value, msgAndArgs...) {
862                 t.FailNow()
863         }
864 }
865
866 // Truef asserts that the specified value is true.
867 //
868 //    assert.Truef(t, myBool, "error message %s", "formatted")
869 //
870 // Returns whether the assertion was successful (true) or not (false).
871 func Truef(t TestingT, value bool, msg string, args ...interface{}) {
872         if !assert.Truef(t, value, msg, args...) {
873                 t.FailNow()
874         }
875 }
876
877 // WithinDuration asserts that the two times are within duration delta of each other.
878 //
879 //   assert.WithinDuration(t, time.Now(), time.Now(), 10*time.Second)
880 //
881 // Returns whether the assertion was successful (true) or not (false).
882 func WithinDuration(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) {
883         if !assert.WithinDuration(t, expected, actual, delta, msgAndArgs...) {
884                 t.FailNow()
885         }
886 }
887
888 // WithinDurationf asserts that the two times are within duration delta of each other.
889 //
890 //   assert.WithinDurationf(t, time.Now(), time.Now(), 10*time.Second, "error message %s", "formatted")
891 //
892 // Returns whether the assertion was successful (true) or not (false).
893 func WithinDurationf(t TestingT, expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) {
894         if !assert.WithinDurationf(t, expected, actual, delta, msg, args...) {
895                 t.FailNow()
896         }
897 }
898
899 // Zero asserts that i is the zero value for its type and returns the truth.
900 func Zero(t TestingT, i interface{}, msgAndArgs ...interface{}) {
901         if !assert.Zero(t, i, msgAndArgs...) {
902                 t.FailNow()
903         }
904 }
905
906 // Zerof asserts that i is the zero value for its type and returns the truth.
907 func Zerof(t TestingT, i interface{}, msg string, args ...interface{}) {
908         if !assert.Zerof(t, i, msg, args...) {
909                 t.FailNow()
910         }
911 }