diff options
author | Shenghou Ma <minux@golang.org> | 2015-04-08 04:27:58 -0400 |
---|---|---|
committer | Minux Ma <minux@golang.org> | 2015-04-08 08:46:42 +0000 |
commit | a50b24c649f09e5b65e707fc634637aa984b9d96 (patch) | |
tree | 2d4c9ef1977e2e8c019f08c7a1482c7891fd08cf /src/cmd/api/goapi_test.go | |
parent | 63d72f69011a47234d61380849c466f416459d8c (diff) | |
download | go-git-a50b24c649f09e5b65e707fc634637aa984b9d96.tar.gz |
cmd/api: make the test more robust
Previously, the TestCompareAPI test would fail if runtime.Version()
is "dev", or, more importantly, "go1.5"; because compareAPI depends
on runtime.Version and -allow_new flag. Move that logic out make
its test more robust.
Change-Id: I8f40daa1838b8acd26adac8848762d95315053b0
Reviewed-on: https://go-review.googlesource.com/8622
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src/cmd/api/goapi_test.go')
-rw-r--r-- | src/cmd/api/goapi_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/api/goapi_test.go b/src/cmd/api/goapi_test.go index 9f5b0c8bb4..00c45c3bcd 100644 --- a/src/cmd/api/goapi_test.go +++ b/src/cmd/api/goapi_test.go @@ -131,7 +131,7 @@ func TestCompareAPI(t *testing.T) { } for _, tt := range tests { buf := new(bytes.Buffer) - gotok := compareAPI(buf, tt.features, tt.required, tt.optional, tt.exception) + gotok := compareAPI(buf, tt.features, tt.required, tt.optional, tt.exception, true) if gotok != tt.ok { t.Errorf("%s: ok = %v; want %v", tt.name, gotok, tt.ok) } |