]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: use testlib in a few more cases
authorShenghou Ma <minux.ma@gmail.com>
Wed, 21 Mar 2012 18:14:44 +0000 (02:14 +0800)
committerShenghou Ma <minux.ma@gmail.com>
Wed, 21 Mar 2012 18:14:44 +0000 (02:14 +0800)
        Introduce a new skip cmd.

R=golang-dev, bradfitz, iant, iant
CC=golang-dev
https://golang.org/cl/5868048

test/cmplxdivide.c
test/cmplxdivide1.go
test/ddd2.go
test/fixedbugs/bug223.go
test/import2.go
test/interface/embed0.go
test/interface/private1.go
test/interface/recursive1.go
test/method4a.go
test/run.go
test/testlib

index b340f04d8873c5082711a811975cd155b73e1d26..12dc4f1c0c914c3293a5604083c5d4c56c67054f 100644 (file)
@@ -51,6 +51,7 @@ main(void)
        int i, j, k, l;
        double complex n, d, q;
        
+       printf("// skip\n");
        printf("// # generated by cmplxdivide.c\n");
        printf("\n");
        printf("package main\n");
index 6a1dee9fe784cda31c5417e092932c7f7d60d3de..e9031dd15143248b5857d4a891dde0800a1d6596 100644 (file)
@@ -1,3 +1,4 @@
+// skip
 // # generated by cmplxdivide.c
 
 package main
index 2edae36b1ed193de95f129c938fe15303518f401..a141a39c7667a53b59ec275f944c3eae840a8b1d 100644 (file)
@@ -1,4 +1,4 @@
-// true
+// skip
 
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
index 80f9cae8199c78a3dc7e8018e106d61b1d7d9f41..eccf574a14c095e23bbd3424e623a24846f9ac18 100644 (file)
@@ -1,4 +1,4 @@
-// (! $G $D/$F.go) | grep 'initialization loop' >/dev/null || echo BUG: bug223
+// errorcheck
 
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
@@ -18,4 +18,4 @@ func f() {
        }
 }
 
-var m = map[string]F{"f": f}
+var m = map[string]F{"f": f} // ERROR "initialization loop"
index 0acfabcc1821dcb7742142c8760709e2477e5a60..5c275f34b36b818d2891afb84a71d85359bdb205 100644 (file)
@@ -1,4 +1,4 @@
-// true  # used by import3
+// skip # used by import3
 
 // Copyright 2010 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
index dee8319e4e98d819e6b66294b96fd3949712f5d3..e2ee20adebaceda1fc55fc480a196d5d8a4a7107 100644 (file)
@@ -1,4 +1,4 @@
-// true        # used by embed1.go
+// skip # used by embed1.go
 
 // Copyright 2009 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index 9c831a2f4776be2fa16cac5f58d6578354cab68d..3281c38be606452ab5a5cc810f390cabb8ad0ba4 100644 (file)
@@ -1,4 +1,4 @@
-// true  # used by private.go
+// skip # used by private.go
 
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index 524dda82c6f0faff819c087419d3577fe1f6574a..cc3cdc37f1ae482768ff4038b4a50f9fd60dfaa7 100644 (file)
@@ -1,4 +1,4 @@
-// true  # used by recursive2
+// skip # used by recursive2
 
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
index 11fa218f3d903709aed7a5040471f089ba04ae71..d23039bfaaa35ebdbf26e10618e09c5474f6a1c0 100644 (file)
@@ -1,4 +1,4 @@
-// true
+// skip
 
 // Copyright 2012 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
index bf79079b6479da4f8a4e111cafc551887f162168..ac6e3c0e27600cd6bf1e5038f2c09baeac5f592f 100644 (file)
@@ -1,4 +1,4 @@
-// #ignore
+// skip
 
 // Copyright 2012 The Go Authors.  All rights reserved.
 // Use of this source code is governed by a BSD-style
@@ -172,7 +172,7 @@ type test struct {
        donec       chan bool // closed when done
 
        src    string
-       action string // "compile", "build", "run", "errorcheck"
+       action string // "compile", "build", "run", "errorcheck", "skip"
 
        tempDir string
        err     error
@@ -253,6 +253,9 @@ func (t *test) run() {
                fallthrough
        case "compile", "build", "run", "errorcheck":
                t.action = action
+       case "skip":
+               t.action = "skip"
+               return
        default:
                t.err = skipError("skipped; unknown pattern: " + action)
                t.action = "??"
index 4c7d9578b53ec44e87ecea2dff5003cfd5ee4691..3858431a7e1b4b5a851d44112c149476693e12d8 100644 (file)
@@ -38,3 +38,7 @@ cmpout() {
 errorcheck() {
        errchk $G -e $D/$F.go
 }
+
+skip() {
+       true
+}