浏览代码

unix: fix test compilation error on Go 1.7

testing.Run was introduced in Go 1.7. Skip the tests using it if built
with Go 1.6 or below.

Change-Id: I24c81426ea6d3eaaca5a565ad79b62b30e645d04
Reviewed-on: https://go-review.googlesource.com/78255
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Tobias Klauser 8 年之前
父节点
当前提交
328643532e
共有 6 个文件被更改,包括 12 次插入0 次删除
  1. 2 0
      unix/dev_darwin_test.go
  2. 2 0
      unix/dev_dragonfly_test.go
  3. 2 0
      unix/dev_linux_test.go
  4. 2 0
      unix/dev_netbsd_test.go
  5. 2 0
      unix/dev_openbsd_test.go
  6. 2 0
      unix/dev_solaris_test.go

+ 2 - 0
unix/dev_darwin_test.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build go1.7
+
 package unix_test
 
 import (

+ 2 - 0
unix/dev_dragonfly_test.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build go1.7
+
 package unix_test
 
 import (

+ 2 - 0
unix/dev_linux_test.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build go1.7
+
 package unix_test
 
 import (

+ 2 - 0
unix/dev_netbsd_test.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build go1.7
+
 package unix_test
 
 import (

+ 2 - 0
unix/dev_openbsd_test.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build go1.7
+
 package unix_test
 
 import (

+ 2 - 0
unix/dev_solaris_test.go

@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+// +build go1.7
+
 package unix_test
 
 import (