Skip to content

Commit 1efb25a

Browse files
committed
Revert "fix: implement testing {Skip,Fail}Now"
This reverts commit c5879c6. It doesn't look like this is working (see #4736 (comment)), and it doesn't have any tests anyway to prove that it does work. So I think it's best to revert it for now and add a working implementation with tests in the future.
1 parent 17bb1fe commit 1efb25a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/testing/testing.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"io/fs"
1818
"math/rand"
1919
"os"
20-
"runtime"
2120
"strconv"
2221
"strings"
2322
"time"
@@ -208,8 +207,9 @@ func (c *common) Failed() bool {
208207
// current goroutine).
209208
func (c *common) FailNow() {
210209
c.Fail()
210+
211211
c.finished = true
212-
runtime.Goexit()
212+
c.Error("FailNow is incomplete, requires runtime.Goexit()")
213213
}
214214

215215
// log generates the output.
@@ -281,7 +281,7 @@ func (c *common) Skipf(format string, args ...interface{}) {
281281
func (c *common) SkipNow() {
282282
c.skip()
283283
c.finished = true
284-
runtime.Goexit()
284+
c.Error("SkipNow is incomplete, requires runtime.Goexit()")
285285
}
286286

287287
func (c *common) skip() {

0 commit comments

Comments
 (0)