diff options
Diffstat (limited to 'vendor/golang.org/x/net/http')
-rw-r--r-- | vendor/golang.org/x/net/http/httpproxy/go19_test.go | 13 | ||||
-rw-r--r-- | vendor/golang.org/x/net/http/httpproxy/proxy_test.go | 5 |
2 files changed, 17 insertions, 1 deletions
diff --git a/vendor/golang.org/x/net/http/httpproxy/go19_test.go b/vendor/golang.org/x/net/http/httpproxy/go19_test.go new file mode 100644 index 0000000..2117ca5 --- /dev/null +++ b/vendor/golang.org/x/net/http/httpproxy/go19_test.go @@ -0,0 +1,13 @@ +// Copyright 2017 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.9 + +package httpproxy_test + +import "testing" + +func init() { + setHelper = func(t *testing.T) { t.Helper() } +} diff --git a/vendor/golang.org/x/net/http/httpproxy/proxy_test.go b/vendor/golang.org/x/net/http/httpproxy/proxy_test.go index f307964..e4af199 100644 --- a/vendor/golang.org/x/net/http/httpproxy/proxy_test.go +++ b/vendor/golang.org/x/net/http/httpproxy/proxy_test.go @@ -16,6 +16,9 @@ import ( "golang.org/x/net/http/httpproxy" ) +// setHelper calls t.Helper() for Go 1.9+ (see go19_test.go) and does nothing otherwise. +var setHelper = func(t *testing.T) {} + type proxyForURLTest struct { cfg httpproxy.Config req string // URL to fetch; blank means "http://example.com" @@ -166,7 +169,7 @@ var proxyForURLTests = []proxyForURLTest{{ }} func testProxyForURL(t *testing.T, tt proxyForURLTest) { - t.Helper() + setHelper(t) reqURLStr := tt.req if reqURLStr == "" { reqURLStr = "http://example.com" |