1
2
3 package require
4
5 import (
6 assert "github.com/stretchr/testify/assert"
7 http "net/http"
8 url "net/url"
9 time "time"
10 )
11
12
13 func (a *Assertions) Condition(comp assert.Comparison, msgAndArgs ...interface{}) {
14 if h, ok := a.t.(tHelper); ok {
15 h.Helper()
16 }
17 Condition(a.t, comp, msgAndArgs...)
18 }
19
20
21 func (a *Assertions) Conditionf(comp assert.Comparison, msg string, args ...interface{}) {
22 if h, ok := a.t.(tHelper); ok {
23 h.Helper()
24 }
25 Conditionf(a.t, comp, msg, args...)
26 }
27
28
29
30
31
32
33
34 func (a *Assertions) Contains(s interface{}, contains interface{}, msgAndArgs ...interface{}) {
35 if h, ok := a.t.(tHelper); ok {
36 h.Helper()
37 }
38 Contains(a.t, s, contains, msgAndArgs...)
39 }
40
41
42
43
44
45
46
47 func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string, args ...interface{}) {
48 if h, ok := a.t.(tHelper); ok {
49 h.Helper()
50 }
51 Containsf(a.t, s, contains, msg, args...)
52 }
53
54
55
56 func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) {
57 if h, ok := a.t.(tHelper); ok {
58 h.Helper()
59 }
60 DirExists(a.t, path, msgAndArgs...)
61 }
62
63
64
65 func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) {
66 if h, ok := a.t.(tHelper); ok {
67 h.Helper()
68 }
69 DirExistsf(a.t, path, msg, args...)
70 }
71
72
73
74
75
76
77 func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) {
78 if h, ok := a.t.(tHelper); ok {
79 h.Helper()
80 }
81 ElementsMatch(a.t, listA, listB, msgAndArgs...)
82 }
83
84
85
86
87
88
89 func (a *Assertions) ElementsMatchf(listA interface{}, listB interface{}, msg string, args ...interface{}) {
90 if h, ok := a.t.(tHelper); ok {
91 h.Helper()
92 }
93 ElementsMatchf(a.t, listA, listB, msg, args...)
94 }
95
96
97
98
99
100 func (a *Assertions) Empty(object interface{}, msgAndArgs ...interface{}) {
101 if h, ok := a.t.(tHelper); ok {
102 h.Helper()
103 }
104 Empty(a.t, object, msgAndArgs...)
105 }
106
107
108
109
110
111 func (a *Assertions) Emptyf(object interface{}, msg string, args ...interface{}) {
112 if h, ok := a.t.(tHelper); ok {
113 h.Helper()
114 }
115 Emptyf(a.t, object, msg, args...)
116 }
117
118
119
120
121
122
123
124
125 func (a *Assertions) Equal(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
126 if h, ok := a.t.(tHelper); ok {
127 h.Helper()
128 }
129 Equal(a.t, expected, actual, msgAndArgs...)
130 }
131
132
133
134
135
136
137 func (a *Assertions) EqualError(theError error, errString string, msgAndArgs ...interface{}) {
138 if h, ok := a.t.(tHelper); ok {
139 h.Helper()
140 }
141 EqualError(a.t, theError, errString, msgAndArgs...)
142 }
143
144
145
146
147
148
149 func (a *Assertions) EqualErrorf(theError error, errString string, msg string, args ...interface{}) {
150 if h, ok := a.t.(tHelper); ok {
151 h.Helper()
152 }
153 EqualErrorf(a.t, theError, errString, msg, args...)
154 }
155
156
157
158
159
160
161
162
163
164
165
166 func (a *Assertions) EqualExportedValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
167 if h, ok := a.t.(tHelper); ok {
168 h.Helper()
169 }
170 EqualExportedValues(a.t, expected, actual, msgAndArgs...)
171 }
172
173
174
175
176
177
178
179
180
181
182
183 func (a *Assertions) EqualExportedValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
184 if h, ok := a.t.(tHelper); ok {
185 h.Helper()
186 }
187 EqualExportedValuesf(a.t, expected, actual, msg, args...)
188 }
189
190
191
192
193
194 func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
195 if h, ok := a.t.(tHelper); ok {
196 h.Helper()
197 }
198 EqualValues(a.t, expected, actual, msgAndArgs...)
199 }
200
201
202
203
204
205 func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
206 if h, ok := a.t.(tHelper); ok {
207 h.Helper()
208 }
209 EqualValuesf(a.t, expected, actual, msg, args...)
210 }
211
212
213
214
215
216
217
218
219 func (a *Assertions) Equalf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
220 if h, ok := a.t.(tHelper); ok {
221 h.Helper()
222 }
223 Equalf(a.t, expected, actual, msg, args...)
224 }
225
226
227
228
229
230
231
232 func (a *Assertions) Error(err error, msgAndArgs ...interface{}) {
233 if h, ok := a.t.(tHelper); ok {
234 h.Helper()
235 }
236 Error(a.t, err, msgAndArgs...)
237 }
238
239
240
241 func (a *Assertions) ErrorAs(err error, target interface{}, msgAndArgs ...interface{}) {
242 if h, ok := a.t.(tHelper); ok {
243 h.Helper()
244 }
245 ErrorAs(a.t, err, target, msgAndArgs...)
246 }
247
248
249
250 func (a *Assertions) ErrorAsf(err error, target interface{}, msg string, args ...interface{}) {
251 if h, ok := a.t.(tHelper); ok {
252 h.Helper()
253 }
254 ErrorAsf(a.t, err, target, msg, args...)
255 }
256
257
258
259
260
261
262 func (a *Assertions) ErrorContains(theError error, contains string, msgAndArgs ...interface{}) {
263 if h, ok := a.t.(tHelper); ok {
264 h.Helper()
265 }
266 ErrorContains(a.t, theError, contains, msgAndArgs...)
267 }
268
269
270
271
272
273
274 func (a *Assertions) ErrorContainsf(theError error, contains string, msg string, args ...interface{}) {
275 if h, ok := a.t.(tHelper); ok {
276 h.Helper()
277 }
278 ErrorContainsf(a.t, theError, contains, msg, args...)
279 }
280
281
282
283 func (a *Assertions) ErrorIs(err error, target error, msgAndArgs ...interface{}) {
284 if h, ok := a.t.(tHelper); ok {
285 h.Helper()
286 }
287 ErrorIs(a.t, err, target, msgAndArgs...)
288 }
289
290
291
292 func (a *Assertions) ErrorIsf(err error, target error, msg string, args ...interface{}) {
293 if h, ok := a.t.(tHelper); ok {
294 h.Helper()
295 }
296 ErrorIsf(a.t, err, target, msg, args...)
297 }
298
299
300
301
302
303
304
305 func (a *Assertions) Errorf(err error, msg string, args ...interface{}) {
306 if h, ok := a.t.(tHelper); ok {
307 h.Helper()
308 }
309 Errorf(a.t, err, msg, args...)
310 }
311
312
313
314
315
316 func (a *Assertions) Eventually(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {
317 if h, ok := a.t.(tHelper); ok {
318 h.Helper()
319 }
320 Eventually(a.t, condition, waitFor, tick, msgAndArgs...)
321 }
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341 func (a *Assertions) EventuallyWithT(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {
342 if h, ok := a.t.(tHelper); ok {
343 h.Helper()
344 }
345 EventuallyWithT(a.t, condition, waitFor, tick, msgAndArgs...)
346 }
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366 func (a *Assertions) EventuallyWithTf(condition func(collect *assert.CollectT), waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {
367 if h, ok := a.t.(tHelper); ok {
368 h.Helper()
369 }
370 EventuallyWithTf(a.t, condition, waitFor, tick, msg, args...)
371 }
372
373
374
375
376
377 func (a *Assertions) Eventuallyf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {
378 if h, ok := a.t.(tHelper); ok {
379 h.Helper()
380 }
381 Eventuallyf(a.t, condition, waitFor, tick, msg, args...)
382 }
383
384
385
386
387 func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
388 if h, ok := a.t.(tHelper); ok {
389 h.Helper()
390 }
391 Exactly(a.t, expected, actual, msgAndArgs...)
392 }
393
394
395
396
397 func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
398 if h, ok := a.t.(tHelper); ok {
399 h.Helper()
400 }
401 Exactlyf(a.t, expected, actual, msg, args...)
402 }
403
404
405 func (a *Assertions) Fail(failureMessage string, msgAndArgs ...interface{}) {
406 if h, ok := a.t.(tHelper); ok {
407 h.Helper()
408 }
409 Fail(a.t, failureMessage, msgAndArgs...)
410 }
411
412
413 func (a *Assertions) FailNow(failureMessage string, msgAndArgs ...interface{}) {
414 if h, ok := a.t.(tHelper); ok {
415 h.Helper()
416 }
417 FailNow(a.t, failureMessage, msgAndArgs...)
418 }
419
420
421 func (a *Assertions) FailNowf(failureMessage string, msg string, args ...interface{}) {
422 if h, ok := a.t.(tHelper); ok {
423 h.Helper()
424 }
425 FailNowf(a.t, failureMessage, msg, args...)
426 }
427
428
429 func (a *Assertions) Failf(failureMessage string, msg string, args ...interface{}) {
430 if h, ok := a.t.(tHelper); ok {
431 h.Helper()
432 }
433 Failf(a.t, failureMessage, msg, args...)
434 }
435
436
437
438
439 func (a *Assertions) False(value bool, msgAndArgs ...interface{}) {
440 if h, ok := a.t.(tHelper); ok {
441 h.Helper()
442 }
443 False(a.t, value, msgAndArgs...)
444 }
445
446
447
448
449 func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) {
450 if h, ok := a.t.(tHelper); ok {
451 h.Helper()
452 }
453 Falsef(a.t, value, msg, args...)
454 }
455
456
457
458 func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) {
459 if h, ok := a.t.(tHelper); ok {
460 h.Helper()
461 }
462 FileExists(a.t, path, msgAndArgs...)
463 }
464
465
466
467 func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) {
468 if h, ok := a.t.(tHelper); ok {
469 h.Helper()
470 }
471 FileExistsf(a.t, path, msg, args...)
472 }
473
474
475
476
477
478
479 func (a *Assertions) Greater(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {
480 if h, ok := a.t.(tHelper); ok {
481 h.Helper()
482 }
483 Greater(a.t, e1, e2, msgAndArgs...)
484 }
485
486
487
488
489
490
491
492 func (a *Assertions) GreaterOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {
493 if h, ok := a.t.(tHelper); ok {
494 h.Helper()
495 }
496 GreaterOrEqual(a.t, e1, e2, msgAndArgs...)
497 }
498
499
500
501
502
503
504
505 func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {
506 if h, ok := a.t.(tHelper); ok {
507 h.Helper()
508 }
509 GreaterOrEqualf(a.t, e1, e2, msg, args...)
510 }
511
512
513
514
515
516
517 func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {
518 if h, ok := a.t.(tHelper); ok {
519 h.Helper()
520 }
521 Greaterf(a.t, e1, e2, msg, args...)
522 }
523
524
525
526
527
528
529
530 func (a *Assertions) HTTPBodyContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
531 if h, ok := a.t.(tHelper); ok {
532 h.Helper()
533 }
534 HTTPBodyContains(a.t, handler, method, url, values, str, msgAndArgs...)
535 }
536
537
538
539
540
541
542
543 func (a *Assertions) HTTPBodyContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
544 if h, ok := a.t.(tHelper); ok {
545 h.Helper()
546 }
547 HTTPBodyContainsf(a.t, handler, method, url, values, str, msg, args...)
548 }
549
550
551
552
553
554
555
556 func (a *Assertions) HTTPBodyNotContains(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msgAndArgs ...interface{}) {
557 if h, ok := a.t.(tHelper); ok {
558 h.Helper()
559 }
560 HTTPBodyNotContains(a.t, handler, method, url, values, str, msgAndArgs...)
561 }
562
563
564
565
566
567
568
569 func (a *Assertions) HTTPBodyNotContainsf(handler http.HandlerFunc, method string, url string, values url.Values, str interface{}, msg string, args ...interface{}) {
570 if h, ok := a.t.(tHelper); ok {
571 h.Helper()
572 }
573 HTTPBodyNotContainsf(a.t, handler, method, url, values, str, msg, args...)
574 }
575
576
577
578
579
580
581 func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
582 if h, ok := a.t.(tHelper); ok {
583 h.Helper()
584 }
585 HTTPError(a.t, handler, method, url, values, msgAndArgs...)
586 }
587
588
589
590
591
592
593 func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
594 if h, ok := a.t.(tHelper); ok {
595 h.Helper()
596 }
597 HTTPErrorf(a.t, handler, method, url, values, msg, args...)
598 }
599
600
601
602
603
604
605 func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
606 if h, ok := a.t.(tHelper); ok {
607 h.Helper()
608 }
609 HTTPRedirect(a.t, handler, method, url, values, msgAndArgs...)
610 }
611
612
613
614
615
616
617 func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
618 if h, ok := a.t.(tHelper); ok {
619 h.Helper()
620 }
621 HTTPRedirectf(a.t, handler, method, url, values, msg, args...)
622 }
623
624
625
626
627
628
629 func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) {
630 if h, ok := a.t.(tHelper); ok {
631 h.Helper()
632 }
633 HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...)
634 }
635
636
637
638
639
640
641 func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) {
642 if h, ok := a.t.(tHelper); ok {
643 h.Helper()
644 }
645 HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...)
646 }
647
648
649
650
651
652
653 func (a *Assertions) HTTPSuccess(handler http.HandlerFunc, method string, url string, values url.Values, msgAndArgs ...interface{}) {
654 if h, ok := a.t.(tHelper); ok {
655 h.Helper()
656 }
657 HTTPSuccess(a.t, handler, method, url, values, msgAndArgs...)
658 }
659
660
661
662
663
664
665 func (a *Assertions) HTTPSuccessf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
666 if h, ok := a.t.(tHelper); ok {
667 h.Helper()
668 }
669 HTTPSuccessf(a.t, handler, method, url, values, msg, args...)
670 }
671
672
673
674
675 func (a *Assertions) Implements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
676 if h, ok := a.t.(tHelper); ok {
677 h.Helper()
678 }
679 Implements(a.t, interfaceObject, object, msgAndArgs...)
680 }
681
682
683
684
685 func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
686 if h, ok := a.t.(tHelper); ok {
687 h.Helper()
688 }
689 Implementsf(a.t, interfaceObject, object, msg, args...)
690 }
691
692
693
694
695 func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
696 if h, ok := a.t.(tHelper); ok {
697 h.Helper()
698 }
699 InDelta(a.t, expected, actual, delta, msgAndArgs...)
700 }
701
702
703 func (a *Assertions) InDeltaMapValues(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
704 if h, ok := a.t.(tHelper); ok {
705 h.Helper()
706 }
707 InDeltaMapValues(a.t, expected, actual, delta, msgAndArgs...)
708 }
709
710
711 func (a *Assertions) InDeltaMapValuesf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
712 if h, ok := a.t.(tHelper); ok {
713 h.Helper()
714 }
715 InDeltaMapValuesf(a.t, expected, actual, delta, msg, args...)
716 }
717
718
719 func (a *Assertions) InDeltaSlice(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
720 if h, ok := a.t.(tHelper); ok {
721 h.Helper()
722 }
723 InDeltaSlice(a.t, expected, actual, delta, msgAndArgs...)
724 }
725
726
727 func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
728 if h, ok := a.t.(tHelper); ok {
729 h.Helper()
730 }
731 InDeltaSlicef(a.t, expected, actual, delta, msg, args...)
732 }
733
734
735
736
737 func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
738 if h, ok := a.t.(tHelper); ok {
739 h.Helper()
740 }
741 InDeltaf(a.t, expected, actual, delta, msg, args...)
742 }
743
744
745 func (a *Assertions) InEpsilon(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
746 if h, ok := a.t.(tHelper); ok {
747 h.Helper()
748 }
749 InEpsilon(a.t, expected, actual, epsilon, msgAndArgs...)
750 }
751
752
753 func (a *Assertions) InEpsilonSlice(expected interface{}, actual interface{}, epsilon float64, msgAndArgs ...interface{}) {
754 if h, ok := a.t.(tHelper); ok {
755 h.Helper()
756 }
757 InEpsilonSlice(a.t, expected, actual, epsilon, msgAndArgs...)
758 }
759
760
761 func (a *Assertions) InEpsilonSlicef(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
762 if h, ok := a.t.(tHelper); ok {
763 h.Helper()
764 }
765 InEpsilonSlicef(a.t, expected, actual, epsilon, msg, args...)
766 }
767
768
769 func (a *Assertions) InEpsilonf(expected interface{}, actual interface{}, epsilon float64, msg string, args ...interface{}) {
770 if h, ok := a.t.(tHelper); ok {
771 h.Helper()
772 }
773 InEpsilonf(a.t, expected, actual, epsilon, msg, args...)
774 }
775
776
777
778
779
780
781 func (a *Assertions) IsDecreasing(object interface{}, msgAndArgs ...interface{}) {
782 if h, ok := a.t.(tHelper); ok {
783 h.Helper()
784 }
785 IsDecreasing(a.t, object, msgAndArgs...)
786 }
787
788
789
790
791
792
793 func (a *Assertions) IsDecreasingf(object interface{}, msg string, args ...interface{}) {
794 if h, ok := a.t.(tHelper); ok {
795 h.Helper()
796 }
797 IsDecreasingf(a.t, object, msg, args...)
798 }
799
800
801
802
803
804
805 func (a *Assertions) IsIncreasing(object interface{}, msgAndArgs ...interface{}) {
806 if h, ok := a.t.(tHelper); ok {
807 h.Helper()
808 }
809 IsIncreasing(a.t, object, msgAndArgs...)
810 }
811
812
813
814
815
816
817 func (a *Assertions) IsIncreasingf(object interface{}, msg string, args ...interface{}) {
818 if h, ok := a.t.(tHelper); ok {
819 h.Helper()
820 }
821 IsIncreasingf(a.t, object, msg, args...)
822 }
823
824
825
826
827
828
829 func (a *Assertions) IsNonDecreasing(object interface{}, msgAndArgs ...interface{}) {
830 if h, ok := a.t.(tHelper); ok {
831 h.Helper()
832 }
833 IsNonDecreasing(a.t, object, msgAndArgs...)
834 }
835
836
837
838
839
840
841 func (a *Assertions) IsNonDecreasingf(object interface{}, msg string, args ...interface{}) {
842 if h, ok := a.t.(tHelper); ok {
843 h.Helper()
844 }
845 IsNonDecreasingf(a.t, object, msg, args...)
846 }
847
848
849
850
851
852
853 func (a *Assertions) IsNonIncreasing(object interface{}, msgAndArgs ...interface{}) {
854 if h, ok := a.t.(tHelper); ok {
855 h.Helper()
856 }
857 IsNonIncreasing(a.t, object, msgAndArgs...)
858 }
859
860
861
862
863
864
865 func (a *Assertions) IsNonIncreasingf(object interface{}, msg string, args ...interface{}) {
866 if h, ok := a.t.(tHelper); ok {
867 h.Helper()
868 }
869 IsNonIncreasingf(a.t, object, msg, args...)
870 }
871
872
873 func (a *Assertions) IsType(expectedType interface{}, object interface{}, msgAndArgs ...interface{}) {
874 if h, ok := a.t.(tHelper); ok {
875 h.Helper()
876 }
877 IsType(a.t, expectedType, object, msgAndArgs...)
878 }
879
880
881 func (a *Assertions) IsTypef(expectedType interface{}, object interface{}, msg string, args ...interface{}) {
882 if h, ok := a.t.(tHelper); ok {
883 h.Helper()
884 }
885 IsTypef(a.t, expectedType, object, msg, args...)
886 }
887
888
889
890
891 func (a *Assertions) JSONEq(expected string, actual string, msgAndArgs ...interface{}) {
892 if h, ok := a.t.(tHelper); ok {
893 h.Helper()
894 }
895 JSONEq(a.t, expected, actual, msgAndArgs...)
896 }
897
898
899
900
901 func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ...interface{}) {
902 if h, ok := a.t.(tHelper); ok {
903 h.Helper()
904 }
905 JSONEqf(a.t, expected, actual, msg, args...)
906 }
907
908
909
910
911
912 func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) {
913 if h, ok := a.t.(tHelper); ok {
914 h.Helper()
915 }
916 Len(a.t, object, length, msgAndArgs...)
917 }
918
919
920
921
922
923 func (a *Assertions) Lenf(object interface{}, length int, msg string, args ...interface{}) {
924 if h, ok := a.t.(tHelper); ok {
925 h.Helper()
926 }
927 Lenf(a.t, object, length, msg, args...)
928 }
929
930
931
932
933
934
935 func (a *Assertions) Less(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {
936 if h, ok := a.t.(tHelper); ok {
937 h.Helper()
938 }
939 Less(a.t, e1, e2, msgAndArgs...)
940 }
941
942
943
944
945
946
947
948 func (a *Assertions) LessOrEqual(e1 interface{}, e2 interface{}, msgAndArgs ...interface{}) {
949 if h, ok := a.t.(tHelper); ok {
950 h.Helper()
951 }
952 LessOrEqual(a.t, e1, e2, msgAndArgs...)
953 }
954
955
956
957
958
959
960
961 func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {
962 if h, ok := a.t.(tHelper); ok {
963 h.Helper()
964 }
965 LessOrEqualf(a.t, e1, e2, msg, args...)
966 }
967
968
969
970
971
972
973 func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {
974 if h, ok := a.t.(tHelper); ok {
975 h.Helper()
976 }
977 Lessf(a.t, e1, e2, msg, args...)
978 }
979
980
981
982
983
984 func (a *Assertions) Negative(e interface{}, msgAndArgs ...interface{}) {
985 if h, ok := a.t.(tHelper); ok {
986 h.Helper()
987 }
988 Negative(a.t, e, msgAndArgs...)
989 }
990
991
992
993
994
995 func (a *Assertions) Negativef(e interface{}, msg string, args ...interface{}) {
996 if h, ok := a.t.(tHelper); ok {
997 h.Helper()
998 }
999 Negativef(a.t, e, msg, args...)
1000 }
1001
1002
1003
1004
1005
1006 func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {
1007 if h, ok := a.t.(tHelper); ok {
1008 h.Helper()
1009 }
1010 Never(a.t, condition, waitFor, tick, msgAndArgs...)
1011 }
1012
1013
1014
1015
1016
1017 func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {
1018 if h, ok := a.t.(tHelper); ok {
1019 h.Helper()
1020 }
1021 Neverf(a.t, condition, waitFor, tick, msg, args...)
1022 }
1023
1024
1025
1026
1027 func (a *Assertions) Nil(object interface{}, msgAndArgs ...interface{}) {
1028 if h, ok := a.t.(tHelper); ok {
1029 h.Helper()
1030 }
1031 Nil(a.t, object, msgAndArgs...)
1032 }
1033
1034
1035
1036
1037 func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) {
1038 if h, ok := a.t.(tHelper); ok {
1039 h.Helper()
1040 }
1041 Nilf(a.t, object, msg, args...)
1042 }
1043
1044
1045
1046 func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) {
1047 if h, ok := a.t.(tHelper); ok {
1048 h.Helper()
1049 }
1050 NoDirExists(a.t, path, msgAndArgs...)
1051 }
1052
1053
1054
1055 func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) {
1056 if h, ok := a.t.(tHelper); ok {
1057 h.Helper()
1058 }
1059 NoDirExistsf(a.t, path, msg, args...)
1060 }
1061
1062
1063
1064
1065
1066
1067
1068 func (a *Assertions) NoError(err error, msgAndArgs ...interface{}) {
1069 if h, ok := a.t.(tHelper); ok {
1070 h.Helper()
1071 }
1072 NoError(a.t, err, msgAndArgs...)
1073 }
1074
1075
1076
1077
1078
1079
1080
1081 func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) {
1082 if h, ok := a.t.(tHelper); ok {
1083 h.Helper()
1084 }
1085 NoErrorf(a.t, err, msg, args...)
1086 }
1087
1088
1089
1090 func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) {
1091 if h, ok := a.t.(tHelper); ok {
1092 h.Helper()
1093 }
1094 NoFileExists(a.t, path, msgAndArgs...)
1095 }
1096
1097
1098
1099 func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) {
1100 if h, ok := a.t.(tHelper); ok {
1101 h.Helper()
1102 }
1103 NoFileExistsf(a.t, path, msg, args...)
1104 }
1105
1106
1107
1108
1109
1110
1111
1112 func (a *Assertions) NotContains(s interface{}, contains interface{}, msgAndArgs ...interface{}) {
1113 if h, ok := a.t.(tHelper); ok {
1114 h.Helper()
1115 }
1116 NotContains(a.t, s, contains, msgAndArgs...)
1117 }
1118
1119
1120
1121
1122
1123
1124
1125 func (a *Assertions) NotContainsf(s interface{}, contains interface{}, msg string, args ...interface{}) {
1126 if h, ok := a.t.(tHelper); ok {
1127 h.Helper()
1128 }
1129 NotContainsf(a.t, s, contains, msg, args...)
1130 }
1131
1132
1133
1134
1135
1136
1137
1138 func (a *Assertions) NotEmpty(object interface{}, msgAndArgs ...interface{}) {
1139 if h, ok := a.t.(tHelper); ok {
1140 h.Helper()
1141 }
1142 NotEmpty(a.t, object, msgAndArgs...)
1143 }
1144
1145
1146
1147
1148
1149
1150
1151 func (a *Assertions) NotEmptyf(object interface{}, msg string, args ...interface{}) {
1152 if h, ok := a.t.(tHelper); ok {
1153 h.Helper()
1154 }
1155 NotEmptyf(a.t, object, msg, args...)
1156 }
1157
1158
1159
1160
1161
1162
1163
1164 func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
1165 if h, ok := a.t.(tHelper); ok {
1166 h.Helper()
1167 }
1168 NotEqual(a.t, expected, actual, msgAndArgs...)
1169 }
1170
1171
1172
1173
1174 func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
1175 if h, ok := a.t.(tHelper); ok {
1176 h.Helper()
1177 }
1178 NotEqualValues(a.t, expected, actual, msgAndArgs...)
1179 }
1180
1181
1182
1183
1184 func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
1185 if h, ok := a.t.(tHelper); ok {
1186 h.Helper()
1187 }
1188 NotEqualValuesf(a.t, expected, actual, msg, args...)
1189 }
1190
1191
1192
1193
1194
1195
1196
1197 func (a *Assertions) NotEqualf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
1198 if h, ok := a.t.(tHelper); ok {
1199 h.Helper()
1200 }
1201 NotEqualf(a.t, expected, actual, msg, args...)
1202 }
1203
1204
1205
1206 func (a *Assertions) NotErrorIs(err error, target error, msgAndArgs ...interface{}) {
1207 if h, ok := a.t.(tHelper); ok {
1208 h.Helper()
1209 }
1210 NotErrorIs(a.t, err, target, msgAndArgs...)
1211 }
1212
1213
1214
1215 func (a *Assertions) NotErrorIsf(err error, target error, msg string, args ...interface{}) {
1216 if h, ok := a.t.(tHelper); ok {
1217 h.Helper()
1218 }
1219 NotErrorIsf(a.t, err, target, msg, args...)
1220 }
1221
1222
1223
1224
1225 func (a *Assertions) NotImplements(interfaceObject interface{}, object interface{}, msgAndArgs ...interface{}) {
1226 if h, ok := a.t.(tHelper); ok {
1227 h.Helper()
1228 }
1229 NotImplements(a.t, interfaceObject, object, msgAndArgs...)
1230 }
1231
1232
1233
1234
1235 func (a *Assertions) NotImplementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
1236 if h, ok := a.t.(tHelper); ok {
1237 h.Helper()
1238 }
1239 NotImplementsf(a.t, interfaceObject, object, msg, args...)
1240 }
1241
1242
1243
1244
1245 func (a *Assertions) NotNil(object interface{}, msgAndArgs ...interface{}) {
1246 if h, ok := a.t.(tHelper); ok {
1247 h.Helper()
1248 }
1249 NotNil(a.t, object, msgAndArgs...)
1250 }
1251
1252
1253
1254
1255 func (a *Assertions) NotNilf(object interface{}, msg string, args ...interface{}) {
1256 if h, ok := a.t.(tHelper); ok {
1257 h.Helper()
1258 }
1259 NotNilf(a.t, object, msg, args...)
1260 }
1261
1262
1263
1264
1265 func (a *Assertions) NotPanics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1266 if h, ok := a.t.(tHelper); ok {
1267 h.Helper()
1268 }
1269 NotPanics(a.t, f, msgAndArgs...)
1270 }
1271
1272
1273
1274
1275 func (a *Assertions) NotPanicsf(f assert.PanicTestFunc, msg string, args ...interface{}) {
1276 if h, ok := a.t.(tHelper); ok {
1277 h.Helper()
1278 }
1279 NotPanicsf(a.t, f, msg, args...)
1280 }
1281
1282
1283
1284
1285
1286 func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) {
1287 if h, ok := a.t.(tHelper); ok {
1288 h.Helper()
1289 }
1290 NotRegexp(a.t, rx, str, msgAndArgs...)
1291 }
1292
1293
1294
1295
1296
1297 func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {
1298 if h, ok := a.t.(tHelper); ok {
1299 h.Helper()
1300 }
1301 NotRegexpf(a.t, rx, str, msg, args...)
1302 }
1303
1304
1305
1306
1307
1308
1309
1310 func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
1311 if h, ok := a.t.(tHelper); ok {
1312 h.Helper()
1313 }
1314 NotSame(a.t, expected, actual, msgAndArgs...)
1315 }
1316
1317
1318
1319
1320
1321
1322
1323 func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) {
1324 if h, ok := a.t.(tHelper); ok {
1325 h.Helper()
1326 }
1327 NotSamef(a.t, expected, actual, msg, args...)
1328 }
1329
1330
1331
1332
1333
1334
1335
1336 func (a *Assertions) NotSubset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
1337 if h, ok := a.t.(tHelper); ok {
1338 h.Helper()
1339 }
1340 NotSubset(a.t, list, subset, msgAndArgs...)
1341 }
1342
1343
1344
1345
1346
1347
1348
1349 func (a *Assertions) NotSubsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {
1350 if h, ok := a.t.(tHelper); ok {
1351 h.Helper()
1352 }
1353 NotSubsetf(a.t, list, subset, msg, args...)
1354 }
1355
1356
1357 func (a *Assertions) NotZero(i interface{}, msgAndArgs ...interface{}) {
1358 if h, ok := a.t.(tHelper); ok {
1359 h.Helper()
1360 }
1361 NotZero(a.t, i, msgAndArgs...)
1362 }
1363
1364
1365 func (a *Assertions) NotZerof(i interface{}, msg string, args ...interface{}) {
1366 if h, ok := a.t.(tHelper); ok {
1367 h.Helper()
1368 }
1369 NotZerof(a.t, i, msg, args...)
1370 }
1371
1372
1373
1374
1375 func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1376 if h, ok := a.t.(tHelper); ok {
1377 h.Helper()
1378 }
1379 Panics(a.t, f, msgAndArgs...)
1380 }
1381
1382
1383
1384
1385
1386
1387 func (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1388 if h, ok := a.t.(tHelper); ok {
1389 h.Helper()
1390 }
1391 PanicsWithError(a.t, errString, f, msgAndArgs...)
1392 }
1393
1394
1395
1396
1397
1398
1399 func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) {
1400 if h, ok := a.t.(tHelper); ok {
1401 h.Helper()
1402 }
1403 PanicsWithErrorf(a.t, errString, f, msg, args...)
1404 }
1405
1406
1407
1408
1409
1410 func (a *Assertions) PanicsWithValue(expected interface{}, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
1411 if h, ok := a.t.(tHelper); ok {
1412 h.Helper()
1413 }
1414 PanicsWithValue(a.t, expected, f, msgAndArgs...)
1415 }
1416
1417
1418
1419
1420
1421 func (a *Assertions) PanicsWithValuef(expected interface{}, f assert.PanicTestFunc, msg string, args ...interface{}) {
1422 if h, ok := a.t.(tHelper); ok {
1423 h.Helper()
1424 }
1425 PanicsWithValuef(a.t, expected, f, msg, args...)
1426 }
1427
1428
1429
1430
1431 func (a *Assertions) Panicsf(f assert.PanicTestFunc, msg string, args ...interface{}) {
1432 if h, ok := a.t.(tHelper); ok {
1433 h.Helper()
1434 }
1435 Panicsf(a.t, f, msg, args...)
1436 }
1437
1438
1439
1440
1441
1442 func (a *Assertions) Positive(e interface{}, msgAndArgs ...interface{}) {
1443 if h, ok := a.t.(tHelper); ok {
1444 h.Helper()
1445 }
1446 Positive(a.t, e, msgAndArgs...)
1447 }
1448
1449
1450
1451
1452
1453 func (a *Assertions) Positivef(e interface{}, msg string, args ...interface{}) {
1454 if h, ok := a.t.(tHelper); ok {
1455 h.Helper()
1456 }
1457 Positivef(a.t, e, msg, args...)
1458 }
1459
1460
1461
1462
1463
1464 func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...interface{}) {
1465 if h, ok := a.t.(tHelper); ok {
1466 h.Helper()
1467 }
1468 Regexp(a.t, rx, str, msgAndArgs...)
1469 }
1470
1471
1472
1473
1474
1475 func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {
1476 if h, ok := a.t.(tHelper); ok {
1477 h.Helper()
1478 }
1479 Regexpf(a.t, rx, str, msg, args...)
1480 }
1481
1482
1483
1484
1485
1486
1487
1488 func (a *Assertions) Same(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
1489 if h, ok := a.t.(tHelper); ok {
1490 h.Helper()
1491 }
1492 Same(a.t, expected, actual, msgAndArgs...)
1493 }
1494
1495
1496
1497
1498
1499
1500
1501 func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) {
1502 if h, ok := a.t.(tHelper); ok {
1503 h.Helper()
1504 }
1505 Samef(a.t, expected, actual, msg, args...)
1506 }
1507
1508
1509
1510
1511
1512
1513 func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
1514 if h, ok := a.t.(tHelper); ok {
1515 h.Helper()
1516 }
1517 Subset(a.t, list, subset, msgAndArgs...)
1518 }
1519
1520
1521
1522
1523
1524
1525 func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) {
1526 if h, ok := a.t.(tHelper); ok {
1527 h.Helper()
1528 }
1529 Subsetf(a.t, list, subset, msg, args...)
1530 }
1531
1532
1533
1534
1535 func (a *Assertions) True(value bool, msgAndArgs ...interface{}) {
1536 if h, ok := a.t.(tHelper); ok {
1537 h.Helper()
1538 }
1539 True(a.t, value, msgAndArgs...)
1540 }
1541
1542
1543
1544
1545 func (a *Assertions) Truef(value bool, msg string, args ...interface{}) {
1546 if h, ok := a.t.(tHelper); ok {
1547 h.Helper()
1548 }
1549 Truef(a.t, value, msg, args...)
1550 }
1551
1552
1553
1554
1555 func (a *Assertions) WithinDuration(expected time.Time, actual time.Time, delta time.Duration, msgAndArgs ...interface{}) {
1556 if h, ok := a.t.(tHelper); ok {
1557 h.Helper()
1558 }
1559 WithinDuration(a.t, expected, actual, delta, msgAndArgs...)
1560 }
1561
1562
1563
1564
1565 func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta time.Duration, msg string, args ...interface{}) {
1566 if h, ok := a.t.(tHelper); ok {
1567 h.Helper()
1568 }
1569 WithinDurationf(a.t, expected, actual, delta, msg, args...)
1570 }
1571
1572
1573
1574
1575 func (a *Assertions) WithinRange(actual time.Time, start time.Time, end time.Time, msgAndArgs ...interface{}) {
1576 if h, ok := a.t.(tHelper); ok {
1577 h.Helper()
1578 }
1579 WithinRange(a.t, actual, start, end, msgAndArgs...)
1580 }
1581
1582
1583
1584
1585 func (a *Assertions) WithinRangef(actual time.Time, start time.Time, end time.Time, msg string, args ...interface{}) {
1586 if h, ok := a.t.(tHelper); ok {
1587 h.Helper()
1588 }
1589 WithinRangef(a.t, actual, start, end, msg, args...)
1590 }
1591
1592
1593 func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) {
1594 if h, ok := a.t.(tHelper); ok {
1595 h.Helper()
1596 }
1597 YAMLEq(a.t, expected, actual, msgAndArgs...)
1598 }
1599
1600
1601 func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) {
1602 if h, ok := a.t.(tHelper); ok {
1603 h.Helper()
1604 }
1605 YAMLEqf(a.t, expected, actual, msg, args...)
1606 }
1607
1608
1609 func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) {
1610 if h, ok := a.t.(tHelper); ok {
1611 h.Helper()
1612 }
1613 Zero(a.t, i, msgAndArgs...)
1614 }
1615
1616
1617 func (a *Assertions) Zerof(i interface{}, msg string, args ...interface{}) {
1618 if h, ok := a.t.(tHelper); ok {
1619 h.Helper()
1620 }
1621 Zerof(a.t, i, msg, args...)
1622 }
1623
View as plain text