@@ -41,63 +41,6 @@ func FailNow(fn func()) {
4141 fn ()
4242}
4343
44- // FailNowOn function turns an ENV flag on to stop further test execution immediately if one test fails.
45- // This switch is enabled within the test. Not only during function.
46- /*
47- func Test(t *testing.T) {
48- actually.FailNowOn(t)
49- actually.Got(something).Nil(t) // Fail Now
50- actually.Got(something).Expect(something).Same(t) // Fail Now
51- }
52- */
53- // Warning: Do not use FailNowOn along with t.Parallel.
54- func FailNowOn (t * testing.T ) {
55- t .Setenv (envKey_FailNow , envKey_FailNow )
56- }
57-
58- // FailNotNowOn function turns an ENV flag off to stop further test execution immediately if one test fails.
59- // If you want to turn the ENV flag on, then you should call `FailNowOn`.
60- /*
61- func Test(t *testing.T) {
62- // turn on to fail right now
63- actually.FailNowOn(t)
64- actually.Got(something).Nil(t) // Fail Now
65- actually.Got(something).Expect(something).Same(t) // Fail Now
66-
67- // turn off
68- actually.FailNotNowOn(t)
69- actually.Got(something).Nil(t) // NOT Fail Now
70- actually.Got(something).Expect(something).Same(t) // NOT Fail Now
71-
72- // Fail Now by FailNow() in the chain
73- actually.Got(something).FailNow().Nil(t) // Fail Now
74-
75- // Again, turn on to fail right now
76- actually.FailNowOn(t)
77- actually.Got(something).Nil(t) // Fail Now
78- }
79- */
80- // This switch is enabled within the test. Not only during function.
81- func FailNotNowOn (t * testing.T ) {
82- t .Setenv (envKey_FailNow , "" )
83- }
84-
85- // FailNotNow turns a flag off, so that even if the test fails, execution does not stop immediately.
86- /*
87- It behaves this way by default. If you want the opposite behavior, call `FailNow` method.
88- */
89- // Deprecated: Anyone uses? This method will be removed in the near future.
90- func FailNotNow () * testingA {
91- return & testingA {
92- failNow : failNowPtr (false ),
93- }
94- }
95- func (a * testingA ) FailNotNow () * testingA {
96- a .failNow = failNowPtr (false )
97-
98- return a
99- }
100-
10144// X turns on a flag to show test values as raw in a fail report.
10245func (a * testingA ) X () * testingA {
10346 a .showRawData = true
0 commit comments