OSDN Git Service

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