From 9e2f8b2a0ac2cc9c3237908fdd5c0471b6ab311f Mon Sep 17 00:00:00 2001 From: Robert Griesemer Date: Wed, 26 Sep 2018 22:02:40 -0700 Subject: [PATCH] go/internal/gccgoimporter: remove special case for Go1.9 The supported x/tools versions are now all at least Go1.9. Change-Id: I9476329f2be8f3c560efb280f06d65669a3e9f85 Reviewed-on: https://go-review.googlesource.com/137996 Run-TryBot: Robert Griesemer TryBot-Result: Gobot Gobot Reviewed-by: Alan Donovan --- go/internal/gccgoimporter/importer19_test.go | 16 ---------------- go/internal/gccgoimporter/importer_test.go | 11 ++++------- 2 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 go/internal/gccgoimporter/importer19_test.go diff --git a/go/internal/gccgoimporter/importer19_test.go b/go/internal/gccgoimporter/importer19_test.go deleted file mode 100644 index 222d66ca..00000000 --- a/go/internal/gccgoimporter/importer19_test.go +++ /dev/null @@ -1,16 +0,0 @@ -// 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 gccgoimporter - -var aliasTests = []importerTest{ - {pkgpath: "aliases", name: "A14", want: "type A14 = func(int, T0) chan T2"}, - {pkgpath: "aliases", name: "C0", want: "type C0 struct{f1 C1; f2 C1}"}, -} - -func init() { - importerTests = append(importerTests, aliasTests...) -} diff --git a/go/internal/gccgoimporter/importer_test.go b/go/internal/gccgoimporter/importer_test.go index b04711da..69d20397 100644 --- a/go/internal/gccgoimporter/importer_test.go +++ b/go/internal/gccgoimporter/importer_test.go @@ -2,11 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package gccgoimporter +// This is an almost verbatim copy of $GOROOT/src/go/internal/gccgoimporter/importer_test.go. -// This is a verbatim copy of $GOROOT/src/go/internal/gccgoimporter/importer_test.go -// except for the importerTests variable which does not contain Go1.9-specific tests. -// Those are added via importer19_test.go. +package gccgoimporter import ( "go/types" @@ -104,9 +102,8 @@ var importerTests = []importerTest{ {pkgpath: "unicode", name: "IsUpper", want: "func IsUpper(r rune) bool"}, {pkgpath: "unicode", name: "MaxRune", want: "const MaxRune untyped rune", wantval: "1114111"}, {pkgpath: "imports", wantinits: []string{"imports..import", "fmt..import", "math..import"}}, - // moved to importer19_test.go (they import interface types) - // {pkgpath: "aliases", name: "A14", want: "type A14 = func(int, T0) chan T2"}, - // {pkgpath: "aliases", name: "C0", want: "type C0 struct{f1 C1; f2 C1}"}, + {pkgpath: "aliases", name: "A14", want: "type A14 = func(int, T0) chan T2"}, + {pkgpath: "aliases", name: "C0", want: "type C0 struct{f1 C1; f2 C1}"}, {pkgpath: "escapeinfo", name: "NewT", want: "func NewT(data []byte) *T"}, {pkgpath: "issue27856", name: "M", want: "type M struct{E F}"}, }