]> Cypherpunks repositories - gostls13.git/commitdiff
all: remove unnecessary return after skipping test
authorTobias Klauser <tklauser@distanz.ch>
Wed, 1 Nov 2017 10:03:41 +0000 (11:03 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Wed, 1 Nov 2017 11:57:47 +0000 (11:57 +0000)
testing.Skip{,f} will exit the test via runtime.Goexit. Thus, the
successive return is never reached and can be removed.

Change-Id: I1e399f3d5db753ece1ffba648850427e1b4be300
Reviewed-on: https://go-review.googlesource.com/74990
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
src/go/internal/gccgoimporter/gccgoinstallation_test.go
src/go/internal/gccgoimporter/importer_test.go
src/runtime/pprof/pprof_test.go

index 23db6054c1300c7f3b044793b6d6578f293ea12d..e601411237f9cde04908e6025ddc3195e8dc3a6f 100644 (file)
@@ -152,7 +152,6 @@ func TestInstallationImporter(t *testing.T) {
        // were compiled with gccgo.
        if runtime.Compiler != "gccgo" {
                t.Skip("This test needs gccgo")
-               return
        }
 
        var inst GccgoInstallation
index 61c07bc72a402dc39b34dcd4db0190c1ca41b4c0..26f5d9f5b7e8999a3bf08a1ab3d5a1f74b4fb043 100644 (file)
@@ -122,7 +122,6 @@ func TestObjImporter(t *testing.T) {
        // were compiled with gccgo.
        if runtime.Compiler != "gccgo" {
                t.Skip("This test needs gccgo")
-               return
        }
 
        tmpdir, err := ioutil.TempDir("", "")
index 955964c721ec3c89205442c6afb4bdc9ab61043a..81c44af2b7c683eae1def7072437002cfe4eb37f 100644 (file)
@@ -179,7 +179,6 @@ func testCPUProfile(t *testing.T, need []string, f func(dur time.Duration)) {
 
        if badOS[runtime.GOOS] {
                t.Skipf("ignoring failure on %s; see golang.org/issue/13841", runtime.GOOS)
-               return
        }
        // Ignore the failure if the tests are running in a QEMU-based emulator,
        // QEMU is not perfect at emulating everything.
@@ -187,7 +186,6 @@ func testCPUProfile(t *testing.T, need []string, f func(dur time.Duration)) {
        // IN_QEMU=1 indicates that the tests are running in QEMU. See issue 9605.
        if os.Getenv("IN_QEMU") == "1" {
                t.Skip("ignore the failure in QEMU; see golang.org/issue/9605")
-               return
        }
        t.FailNow()
 }