From 040fe32119580cbb480d38dec8cfffd06d2dbf3a Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 3 Feb 2012 11:43:24 -0800 Subject: [PATCH] test: don't use package main for files without a main function Part of issue 2833, but works fine with current test runner. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5606056 --- test/eof1.go | 2 +- test/fixedbugs/bug063.go | 2 +- test/fixedbugs/bug066.go | 2 +- test/fixedbugs/bug071.go | 2 +- test/fixedbugs/bug109.go | 2 +- test/fixedbugs/bug118.go | 2 +- test/fixedbugs/bug150.go | 2 +- test/fixedbugs/bug151.go | 2 +- test/fixedbugs/bug219.go | 2 +- test/fixedbugs/bug232.go | 2 +- test/fixedbugs/bug233.go | 2 +- test/fixedbugs/bug235.go | 2 +- test/fixedbugs/bug250.go | 2 +- test/fixedbugs/bug267.go | 2 +- test/fixedbugs/bug283.go | 2 +- test/fixedbugs/bug309.go | 2 +- test/fixedbugs/bug354.go | 2 +- test/fixedbugs/bug393.go | 2 +- test/interface/recursive.go | 2 +- test/rune.go | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/test/eof1.go b/test/eof1.go index c39a3cfdb15..060c902e7e0 100644 --- a/test/eof1.go +++ b/test/eof1.go @@ -4,6 +4,6 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package eof1 // No newline at the end of this comment. \ No newline at end of file diff --git a/test/fixedbugs/bug063.go b/test/fixedbugs/bug063.go index 543e0b72607..15ca44cf055 100644 --- a/test/fixedbugs/bug063.go +++ b/test/fixedbugs/bug063.go @@ -4,5 +4,5 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug063 const c = 0 ^ 0 diff --git a/test/fixedbugs/bug066.go b/test/fixedbugs/bug066.go index 2fa5048f1bf..ccd09e9b3db 100644 --- a/test/fixedbugs/bug066.go +++ b/test/fixedbugs/bug066.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug066 type Scope struct { entries map[string] *Object; diff --git a/test/fixedbugs/bug071.go b/test/fixedbugs/bug071.go index a5003ffb976..9f2932c7a92 100644 --- a/test/fixedbugs/bug071.go +++ b/test/fixedbugs/bug071.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug071 type rat struct { den int; diff --git a/test/fixedbugs/bug109.go b/test/fixedbugs/bug109.go index 7666577230f..459c29ff2d3 100644 --- a/test/fixedbugs/bug109.go +++ b/test/fixedbugs/bug109.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug109 func f(a float64) float64 { e := 1.0 diff --git a/test/fixedbugs/bug118.go b/test/fixedbugs/bug118.go index 1271f5b0cb2..84006816fde 100644 --- a/test/fixedbugs/bug118.go +++ b/test/fixedbugs/bug118.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug118 func Send(c chan int) int { select { diff --git a/test/fixedbugs/bug150.go b/test/fixedbugs/bug150.go index fc25444b652..017cabdf8ad 100644 --- a/test/fixedbugs/bug150.go +++ b/test/fixedbugs/bug150.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug150 type T int func (t T) M() diff --git a/test/fixedbugs/bug151.go b/test/fixedbugs/bug151.go index 46546dfe1ea..b2406773733 100644 --- a/test/fixedbugs/bug151.go +++ b/test/fixedbugs/bug151.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug151 type S string diff --git a/test/fixedbugs/bug219.go b/test/fixedbugs/bug219.go index 966d3fcf31a..f7eba81a818 100644 --- a/test/fixedbugs/bug219.go +++ b/test/fixedbugs/bug219.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug219 func f(func()) int { return 0 } diff --git a/test/fixedbugs/bug232.go b/test/fixedbugs/bug232.go index 99bd02ff699..ed47d59dfdf 100644 --- a/test/fixedbugs/bug232.go +++ b/test/fixedbugs/bug232.go @@ -4,5 +4,5 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug232 type I interface { X(...int) } diff --git a/test/fixedbugs/bug233.go b/test/fixedbugs/bug233.go index 31bb673ebd6..f3d556c2328 100644 --- a/test/fixedbugs/bug233.go +++ b/test/fixedbugs/bug233.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug233 import p "fmt" var _ = p.Print var fmt = 10 diff --git a/test/fixedbugs/bug235.go b/test/fixedbugs/bug235.go index 8cecd9d047d..a494c50f537 100644 --- a/test/fixedbugs/bug235.go +++ b/test/fixedbugs/bug235.go @@ -6,7 +6,7 @@ // used to crash the compiler -package main +package bug235 type T struct { x [4]byte diff --git a/test/fixedbugs/bug250.go b/test/fixedbugs/bug250.go index cd28642bfc9..a3a52d2457b 100644 --- a/test/fixedbugs/bug250.go +++ b/test/fixedbugs/bug250.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug250 type I1 interface { m() I2 diff --git a/test/fixedbugs/bug267.go b/test/fixedbugs/bug267.go index 9646142f2a0..06ebb89946f 100644 --- a/test/fixedbugs/bug267.go +++ b/test/fixedbugs/bug267.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package bug267 type T []int diff --git a/test/fixedbugs/bug283.go b/test/fixedbugs/bug283.go index 45ee9082f0c..2bbc44a0110 100644 --- a/test/fixedbugs/bug283.go +++ b/test/fixedbugs/bug283.go @@ -7,7 +7,7 @@ // http://code.google.com/p/go/issues/detail?id=806 // triggered out of registers on 8g -package main +package bug283 type Point struct { x int diff --git a/test/fixedbugs/bug309.go b/test/fixedbugs/bug309.go index d893916cd96..37033f6cc08 100644 --- a/test/fixedbugs/bug309.go +++ b/test/fixedbugs/bug309.go @@ -6,7 +6,7 @@ // issue 1016 -package main +package bug309 func foo(t interface{}, c chan int) { switch v := t.(type) { diff --git a/test/fixedbugs/bug354.go b/test/fixedbugs/bug354.go index a95256e272e..6a7dfca25f9 100644 --- a/test/fixedbugs/bug354.go +++ b/test/fixedbugs/bug354.go @@ -7,7 +7,7 @@ // issue 2086 // was calling makeclosure twice on the closure -package main +package bug354 type Inner struct { F func() error diff --git a/test/fixedbugs/bug393.go b/test/fixedbugs/bug393.go index e21b9c4a416..45d80157902 100644 --- a/test/fixedbugs/bug393.go +++ b/test/fixedbugs/bug393.go @@ -7,7 +7,7 @@ // issue 2672 // was trying binary search with an interface type -package main +package bug393 func f(x interface{}) int { switch x { diff --git a/test/interface/recursive.go b/test/interface/recursive.go index 1eb56e97672..77897704ad5 100644 --- a/test/interface/recursive.go +++ b/test/interface/recursive.go @@ -6,7 +6,7 @@ // Check mutually recursive interfaces -package main +package recursive type I1 interface { foo() I2 diff --git a/test/rune.go b/test/rune.go index 3386972b6d7..d62a1766dae 100644 --- a/test/rune.go +++ b/test/rune.go @@ -4,7 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package main +package rune var ( r0 = 'a'