mirror of
https://github.com/golang/go
synced 2024-11-21 16:54:46 -07:00
test/interface: document tests
Most already had comments (yay); adjusted for consistency. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5676102
This commit is contained in:
parent
990f9f4c00
commit
13514d4e0b
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user