diff --git a/test/interface/bigdata.go b/test/interface/bigdata.go index 0d8c408c817..0f2e9a990ec 100644 --- a/test/interface/bigdata.go +++ b/test/interface/bigdata.go @@ -4,8 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// check that big vs small, pointer vs not -// interface methods work. +// Test big vs. small, pointer vs. value interface methods. package main diff --git a/test/interface/convert.go b/test/interface/convert.go index 2b4f45d14f0..eb6fd1d5542 100644 --- a/test/interface/convert.go +++ b/test/interface/convert.go @@ -4,8 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Check uses of all the different interface -// conversion runtime functions. +// Test all the different interface conversion runtime functions. package main diff --git a/test/interface/convert1.go b/test/interface/convert1.go index 4833e847a24..4a3ec8a375d 100644 --- a/test/interface/convert1.go +++ b/test/interface/convert1.go @@ -4,8 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Check that static interface conversion of -// interface value nil succeeds. +// Test static interface conversion of interface value nil. package main diff --git a/test/interface/convert2.go b/test/interface/convert2.go index 4833e847a24..4a3ec8a375d 100644 --- a/test/interface/convert2.go +++ b/test/interface/convert2.go @@ -4,8 +4,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Check that static interface conversion of -// interface value nil succeeds. +// Test static interface conversion of interface value nil. package main diff --git a/test/interface/embed.go b/test/interface/embed.go index 46c02cc80e4..5c52ac02323 100644 --- a/test/interface/embed.go +++ b/test/interface/embed.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. -// Check methods derived from embedded interface values. +// Test methods derived from embedded interface values. package main diff --git a/test/interface/embed0.go b/test/interface/embed0.go index bbd81e76038..dee8319e4e9 100644 --- a/test/interface/embed0.go +++ b/test/interface/embed0.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. -// Check that embedded interface types can have local methods. +// Test that embedded interface types can have local methods. package p diff --git a/test/interface/embed1.go b/test/interface/embed1.go index 24e50471f2d..ee502a162fc 100644 --- a/test/interface/embed1.go +++ b/test/interface/embed1.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. -// Check that embedded interface types can have local methods. +// Test that embedded interface types can have local methods. package main diff --git a/test/interface/embed2.go b/test/interface/embed2.go index bac214397ab..1636db78eb8 100644 --- a/test/interface/embed2.go +++ b/test/interface/embed2.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. -// Check methods derived from embedded interface and *interface values. +// Test methods derived from embedded interface and *interface values. package main diff --git a/test/interface/explicit.go b/test/interface/explicit.go index fbe65e7e399..d19480a6856 100644 --- a/test/interface/explicit.go +++ b/test/interface/explicit.go @@ -4,7 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Static error messages about interface conversions. +// Verify compiler messages about erroneous static interface conversions. +// Does not compile. package main diff --git a/test/interface/fail.go b/test/interface/fail.go index 5a2f57fe9f4..72b854dc00c 100644 --- a/test/interface/fail.go +++ b/test/interface/fail.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. -// Check that interface conversion fails when method is missing. +// Test that interface conversion fails when method is missing. package main diff --git a/test/interface/fake.go b/test/interface/fake.go index 55650cc8dd5..861a640842f 100644 --- a/test/interface/fake.go +++ b/test/interface/fake.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. -// Interface comparisons using types hidden +// Test interface comparisons using types hidden // inside reflected-on structs. package main diff --git a/test/interface/noeq.go b/test/interface/noeq.go index b89fd0e8248..1c5166ededf 100644 --- a/test/interface/noeq.go +++ b/test/interface/noeq.go @@ -4,7 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Interface values containing types that cannot be compared for equality. +// Test run-time error detection for interface values containing types +// that cannot be compared for equality. package main diff --git a/test/interface/pointer.go b/test/interface/pointer.go index 0548c240463..2927050669a 100644 --- a/test/interface/pointer.go +++ b/test/interface/pointer.go @@ -4,7 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Check that interface{M()} = *interface{M()} produces a compiler error. +// Test that interface{M()} = *interface{M()} produces a compiler error. +// Does not compile. package main diff --git a/test/interface/private.go b/test/interface/private.go index 37890c923a5..14dfc1ae554 100644 --- a/test/interface/private.go +++ b/test/interface/private.go @@ -4,6 +4,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Test that unexported methods are not visible outside the package. +// Does not compile. + package main import "./private1" diff --git a/test/interface/private1.go b/test/interface/private1.go index 3173fbef41f..9c831a2f477 100644 --- a/test/interface/private1.go +++ b/test/interface/private1.go @@ -4,6 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Imported by private.go, which should not be able to see the private method. + package p type Exported interface { diff --git a/test/interface/receiver.go b/test/interface/receiver.go index dc2e7808f7a..4511ab3b473 100644 --- a/test/interface/receiver.go +++ b/test/interface/receiver.go @@ -4,8 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Implicit methods for embedded types. -// Mixed pointer and non-pointer receivers. +// Test Implicit methods for embedded types and +// mixed pointer and non-pointer receivers. package main diff --git a/test/interface/receiver1.go b/test/interface/receiver1.go index 19ca6d46261..2b7ccdc1a7b 100644 --- a/test/interface/receiver1.go +++ b/test/interface/receiver1.go @@ -4,7 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -// Error messages about missing implicit methods. +// Verify compiler complains about missing implicit methods. +// Does not compile. package main diff --git a/test/interface/recursive1.go b/test/interface/recursive1.go index 2c93a28363a..524dda82c6f 100644 --- a/test/interface/recursive1.go +++ b/test/interface/recursive1.go @@ -4,6 +4,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +// Mutually recursive type definitions imported and used by recursive1.go. + package p type I1 interface { diff --git a/test/interface/recursive2.go b/test/interface/recursive2.go index a7f9ab5dbd9..5129ceb022d 100644 --- a/test/interface/recursive2.go +++ b/test/interface/recursive2.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. -// Check that the mutually recursive types in recursive1.go made it +// Test that the mutually recursive types in recursive1.go made it // intact and with the same meaning, by assigning to or using them. package main diff --git a/test/interface/returntype.go b/test/interface/returntype.go index b7bebe4f61c..4d86f391840 100644 --- a/test/interface/returntype.go +++ b/test/interface/returntype.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. -// Check methods with different return types. +// Test interface methods with different return types are distinct. package main diff --git a/test/interface/struct.go b/test/interface/struct.go index 3c9d01da4a8..f60819ca811 100644 --- a/test/interface/struct.go +++ b/test/interface/struct.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. -// Interface values containing structures. +// Test interface values containing structures. package main