]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test/interface: document tests
authorRob Pike <r@golang.org>
Sun, 19 Feb 2012 06:33:41 +0000 (17:33 +1100)
committerRob Pike <r@golang.org>
Sun, 19 Feb 2012 06:33:41 +0000 (17:33 +1100)
Most already had comments (yay); adjusted for consistency.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5676102

21 files changed:
test/interface/bigdata.go
test/interface/convert.go
test/interface/convert1.go
test/interface/convert2.go
test/interface/embed.go
test/interface/embed0.go
test/interface/embed1.go
test/interface/embed2.go
test/interface/explicit.go
test/interface/fail.go
test/interface/fake.go
test/interface/noeq.go
test/interface/pointer.go
test/interface/private.go
test/interface/private1.go
test/interface/receiver.go
test/interface/receiver1.go
test/interface/recursive1.go
test/interface/recursive2.go
test/interface/returntype.go
test/interface/struct.go

index 0d8c408c81759d2df802a03aebb14c8a2be14475..0f2e9a990ec9d142b8beddd9b602b90d465d6388 100644 (file)
@@ -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
 
index 2b4f45d14f088097912da8b9c4904ac884cdf697..eb6fd1d5542f206225202a35eedbb6b6a70c9613 100644 (file)
@@ -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
 
index 4833e847a24f9649c54314e02271661da6c9e7f6..4a3ec8a375da2f68535fdc48fd0d86abaeff8942 100644 (file)
@@ -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
 
index 4833e847a24f9649c54314e02271661da6c9e7f6..4a3ec8a375da2f68535fdc48fd0d86abaeff8942 100644 (file)
@@ -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
 
index 46c02cc80e4c97f43aa8e8fd8147f7dc566204aa..5c52ac0232346651c196e6a4e8fb1321cc8c4940 100644 (file)
@@ -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
 
index bbd81e7603805d8f52ed92567671fc76fd51d382..dee8319e4e98d819e6b66294b96fd3949712f5d3 100644 (file)
@@ -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
 
index 24e50471f2d43440d5e7c294c1fd1242fc71d08d..ee502a162fc4771c057f2997171a92dbf45fe389 100644 (file)
@@ -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
 
index bac214397aba9d863d5374d014b93a70255f8622..1636db78eb89c734ba940b7a14481b77954bb79a 100644 (file)
@@ -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
 
index fbe65e7e3998f422b6c9187990f97429bfef0f5a..d19480a6856840b6ad597abf968b0b57d73a6bd1 100644 (file)
@@ -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
 
index 5a2f57fe9f4a701edbbfa4262c21cad5481785b1..72b854dc00c753dcd8639f4186813837883f4a9f 100644 (file)
@@ -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
 
index 55650cc8dd5cf4fa6c2a5b6491068ff3a8c873ea..861a640842f6400f62ca2eea88a2ee401f6fefa9 100644 (file)
@@ -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
index b89fd0e8248d2d2ef3b49903f4be334ffdc6159e..1c5166ededf6d99d0a26cc22df78022235407c17 100644 (file)
@@ -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
 
index 0548c240463078198ec9d50b192f449cc6a8ac99..2927050669a9f58e710a577258d6ad28bc1a7bce 100644 (file)
@@ -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
 
index 37890c923a51ef0a26c1ffa023d6c35f1c8bcbd8..14dfc1ae5544d5a010d57742cf302db2519f59f3 100644 (file)
@@ -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"
index 3173fbef41ff75eda87aec56983ff329eedd5914..9c831a2f4776be2fa16cac5f58d6578354cab68d 100644 (file)
@@ -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 {
index dc2e7808f7afeeb6a19804b41dbe1a65f8272cb4..4511ab3b473c1e11786e2a59b4b43f72f56ba1c5 100644 (file)
@@ -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
 
index 19ca6d462616e408bc913d5f05050c0ff6108a6b..2b7ccdc1a7bdcad99d8a00834b154fee59187293 100644 (file)
@@ -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
 
index 2c93a28363aa89b86980025123c1fa86ce719ae8..524dda82c6f0faff819c087419d3577fe1f6574a 100644 (file)
@@ -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 {
index a7f9ab5dbd98e71b2deacdb6b12889d736c9b764..5129ceb022dc0b5632780ed03079131b7cb6d13b 100644 (file)
@@ -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
index b7bebe4f61c83547dc4da345166c0bf9b51678c5..4d86f39184090727a471f5881851d32f760310c4 100644 (file)
@@ -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
 
index 3c9d01da4a8288f61c6f58cb052fd5f2c648e82d..f60819ca8116f24c77132cc8a3cb6676ff76b922 100644 (file)
@@ -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