浏览代码

Update Travis to test multiple golang versions.

David Hill 9 年之前
父节点
当前提交
864f55d8b0
共有 2 个文件被更改,包括 7 次插入3 次删除
  1. 5 2
      .travis.yml
  2. 2 1
      spew/dumpcgo_test.go

+ 5 - 2
.travis.yml

@@ -1,7 +1,10 @@
 language: go
-go: 1.2
+go:
+    - 1.5.4
+    - 1.6.3
+    - 1.7
 install:
-    - go get -v code.google.com/p/go.tools/cmd/cover
+    - go get -v golang.org/x/tools/cmd/cover
 script:
     - go test -v -tags=disableunsafe ./spew
     - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov

+ 2 - 1
spew/dumpcgo_test.go

@@ -59,10 +59,11 @@ func addCgoDumpTests() {
 	v3Len := fmt.Sprintf("%d", v3l)
 	v3Cap := fmt.Sprintf("%d", v3c)
 	v3t := "[6]testdata._Ctype_unsignedchar"
+	v3t2 := "[6]testdata._Ctype_uchar"
 	v3s := "(len=" + v3Len + " cap=" + v3Cap + ") " +
 		"{\n 00000000  74 65 73 74 33 00                               " +
 		"  |test3.|\n}"
-	addDumpTest(v3, "("+v3t+") "+v3s+"\n")
+	addDumpTest(v3, "("+v3t+") "+v3s+"\n", "("+v3t2+") "+v3s+"\n")
 
 	// C signed char array.
 	v4, v4l, v4c := testdata.GetCgoSignedCharArray()