summaryrefslogtreecommitdiff
path: root/test/ken
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2012-02-24 16:24:24 +1100
committerRob Pike <r@golang.org>2012-02-24 16:24:24 +1100
commit2f478ff747cecf05f5ee523d09ab7e6511c30df6 (patch)
treed4421ce147849d3aa67d41475bff5fa59976b980 /test/ken
parentef32ed10a40b440d82d5352be2c24320a7ef7c2b (diff)
downloadgo-2f478ff747cecf05f5ee523d09ab7e6511c30df6.tar.gz
test: document ken/*.go
R=golang-dev, rsc CC=golang-dev http://codereview.appspot.com/5694065
Diffstat (limited to 'test/ken')
-rw-r--r--test/ken/array.go2
-rw-r--r--test/ken/chan.go2
-rw-r--r--test/ken/chan1.go2
-rw-r--r--test/ken/complit.go2
-rw-r--r--test/ken/convert.go3
-rw-r--r--test/ken/cplx0.go2
-rw-r--r--test/ken/cplx1.go2
-rw-r--r--test/ken/cplx2.go2
-rw-r--r--test/ken/cplx3.go2
-rw-r--r--test/ken/cplx4.go3
-rw-r--r--test/ken/cplx5.go2
-rw-r--r--test/ken/divconst.go2
-rw-r--r--test/ken/divmod.go2
-rw-r--r--test/ken/embed.go2
-rw-r--r--test/ken/for.go1
-rw-r--r--test/ken/interbasic.go2
-rw-r--r--test/ken/interfun.go2
-rw-r--r--test/ken/intervar.go2
-rw-r--r--test/ken/label.go2
-rw-r--r--test/ken/litfun.go1
-rw-r--r--test/ken/mfunc.go2
-rw-r--r--test/ken/modconst.go2
-rw-r--r--test/ken/ptrfun.go1
-rw-r--r--test/ken/ptrvar.go1
-rw-r--r--test/ken/range.go2
-rw-r--r--test/ken/rob1.go2
-rw-r--r--test/ken/rob2.go3
-rw-r--r--test/ken/robfor.go2
-rw-r--r--test/ken/robfunc.go2
-rw-r--r--test/ken/shift.go2
-rw-r--r--test/ken/simparray.go2
-rw-r--r--test/ken/simpbool.go2
-rw-r--r--test/ken/simpconv.go2
-rw-r--r--test/ken/simpfun.go1
-rw-r--r--test/ken/simpswitch.go2
-rw-r--r--test/ken/simpvar.go2
-rw-r--r--test/ken/slicearray.go2
-rw-r--r--test/ken/sliceslice.go2
-rw-r--r--test/ken/string.go1
-rw-r--r--test/ken/strvar.go1
40 files changed, 75 insertions, 1 deletions
diff --git a/test/ken/array.go b/test/ken/array.go
index 53f6fc88e..9412e3502 100644
--- a/test/ken/array.go
+++ b/test/ken/array.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.
+// Test arrays and slices.
+
package main
func setpd(a []int) {
diff --git a/test/ken/chan.go b/test/ken/chan.go
index 3bfa5b2d2..36b18f80e 100644
--- a/test/ken/chan.go
+++ b/test/ken/chan.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.
+// Test communication operations including select.
+
package main
import "os"
diff --git a/test/ken/chan1.go b/test/ken/chan1.go
index ccb261995..798b058ce 100644
--- a/test/ken/chan1.go
+++ b/test/ken/chan1.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.
+// Test communication with multiple simultanous goroutines.
+
package main
import "runtime"
diff --git a/test/ken/complit.go b/test/ken/complit.go
index cab3bca38..bc50bbe22 100644
--- a/test/ken/complit.go
+++ b/test/ken/complit.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.
+// Test composite literals.
+
package main
type M map[int]int
diff --git a/test/ken/convert.go b/test/ken/convert.go
index 83e573a3f..33acbd8cd 100644
--- a/test/ken/convert.go
+++ b/test/ken/convert.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.
-// near-exhaustive test of converting numbers between types.
+// Test, near-exhaustive, of converting numbers between types.
+// No complex numbers though.
package main
diff --git a/test/ken/cplx0.go b/test/ken/cplx0.go
index 912b8c489..665e52a5f 100644
--- a/test/ken/cplx0.go
+++ b/test/ken/cplx0.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.
+// Test trivial, bootstrap-level complex numbers, including printing.
+
package main
const (
diff --git a/test/ken/cplx1.go b/test/ken/cplx1.go
index 9421c53e1..78240a563 100644
--- a/test/ken/cplx1.go
+++ b/test/ken/cplx1.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.
+// Test simple arithmetic and assignment for complex numbers.
+
package main
const (
diff --git a/test/ken/cplx2.go b/test/ken/cplx2.go
index a3c1570ba..eb1da7b8c 100644
--- a/test/ken/cplx2.go
+++ b/test/ken/cplx2.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.
+// Test arithmetic on complex numbers, including multiplication and division.
+
package main
const (
diff --git a/test/ken/cplx3.go b/test/ken/cplx3.go
index 092354983..be0b8646a 100644
--- a/test/ken/cplx3.go
+++ b/test/ken/cplx3.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.
+// Test composition, decomposition, and reflection on complex numbers.
+
package main
import "unsafe"
diff --git a/test/ken/cplx4.go b/test/ken/cplx4.go
index 8104ff14d..97d5d16f4 100644
--- a/test/ken/cplx4.go
+++ b/test/ken/cplx4.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 complex numbers,including fmt support.
+// Used to crash.
+
package main
import "fmt"
diff --git a/test/ken/cplx5.go b/test/ken/cplx5.go
index 0e2c88221..4e8f4433d 100644
--- a/test/ken/cplx5.go
+++ b/test/ken/cplx5.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.
+// Test compound types made of complex numbers.
+
package main
var a [12]complex128
diff --git a/test/ken/divconst.go b/test/ken/divconst.go
index 46786fb67..670e07417 100644
--- a/test/ken/divconst.go
+++ b/test/ken/divconst.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.
+// Test integer division by constants.
+
package main
import "math/rand"
diff --git a/test/ken/divmod.go b/test/ken/divmod.go
index 02c762dd0..f1bd56ec6 100644
--- a/test/ken/divmod.go
+++ b/test/ken/divmod.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.
+// Test integer division and modulus.
+
package main
const (
diff --git a/test/ken/embed.go b/test/ken/embed.go
index a3e1980e8..9b35c56ac 100644
--- a/test/ken/embed.go
+++ b/test/ken/embed.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.
+// Test embedded fields of structs, including methods.
+
package main
diff --git a/test/ken/for.go b/test/ken/for.go
index 914229b58..db35548db 100644
--- a/test/ken/for.go
+++ b/test/ken/for.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple for loop.
package main
diff --git a/test/ken/interbasic.go b/test/ken/interbasic.go
index 113fe3c9b..d8fbb95a3 100644
--- a/test/ken/interbasic.go
+++ b/test/ken/interbasic.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.
+// Test interfaces on basic types.
+
package main
type myint int
diff --git a/test/ken/interfun.go b/test/ken/interfun.go
index ca875e837..9432181df 100644
--- a/test/ken/interfun.go
+++ b/test/ken/interfun.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.
+// Test interfaces and methods.
+
package main
type S struct {
diff --git a/test/ken/intervar.go b/test/ken/intervar.go
index 30815d06b..8a2fca0d4 100644
--- a/test/ken/intervar.go
+++ b/test/ken/intervar.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.
+// Test interface assignment.
+
package main
type Iputs interface {
diff --git a/test/ken/label.go b/test/ken/label.go
index b8867a7d1..fcb3e611d 100644
--- a/test/ken/label.go
+++ b/test/ken/label.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.
+// Test goto and labels.
+
package main
func main() {
diff --git a/test/ken/litfun.go b/test/ken/litfun.go
index 4c40ee24c..e241d4edb 100644
--- a/test/ken/litfun.go
+++ b/test/ken/litfun.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple function literals.
package main
diff --git a/test/ken/mfunc.go b/test/ken/mfunc.go
index 2213b8132..ef2499194 100644
--- a/test/ken/mfunc.go
+++ b/test/ken/mfunc.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.
+// Test simple multi-argument multi-valued function.
+
package main
func
diff --git a/test/ken/modconst.go b/test/ken/modconst.go
index 3905b8123..d88cf1003 100644
--- a/test/ken/modconst.go
+++ b/test/ken/modconst.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.
+// Test integer modulus by contstants.
+
package main
import "math/rand"
diff --git a/test/ken/ptrfun.go b/test/ken/ptrfun.go
index b11593156..af806cfd9 100644
--- a/test/ken/ptrfun.go
+++ b/test/ken/ptrfun.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test method invocation with pointer receivers and function-valued fields.
package main
diff --git a/test/ken/ptrvar.go b/test/ken/ptrvar.go
index c6b4656fc..d78170c9d 100644
--- a/test/ken/ptrvar.go
+++ b/test/ken/ptrvar.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test pointers and the . (selector) operator on structs.
package main
diff --git a/test/ken/range.go b/test/ken/range.go
index 07d0e9a67..89c14e5c3 100644
--- a/test/ken/range.go
+++ b/test/ken/range.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.
+// Test 'for range' on arrays, slices, and maps.
+
package main
const size = 16
diff --git a/test/ken/rob1.go b/test/ken/rob1.go
index 35720c928..3042a671b 100644
--- a/test/ken/rob1.go
+++ b/test/ken/rob1.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.
+// Test general operation using a list implementation.
+
package main
type Item interface {
diff --git a/test/ken/rob2.go b/test/ken/rob2.go
index bd8a43515..4b4410ee8 100644
--- a/test/ken/rob2.go
+++ b/test/ken/rob2.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 general operation using s-list.
+// First Go program ever run (although not in this exact form).
+
package main
import "fmt"
diff --git a/test/ken/robfor.go b/test/ken/robfor.go
index 958efca3a..c6a420b39 100644
--- a/test/ken/robfor.go
+++ b/test/ken/robfor.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.
+// Test for loops of many forms.
+
package main
func assertequal(is, shouldbe int, msg string) {
diff --git a/test/ken/robfunc.go b/test/ken/robfunc.go
index 40c5b9042..885267e30 100644
--- a/test/ken/robfunc.go
+++ b/test/ken/robfunc.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.
+// Test functions of many signatures.
+
package main
func assertequal(is, shouldbe int, msg string) {
diff --git a/test/ken/shift.go b/test/ken/shift.go
index c60143d70..af8789615 100644
--- a/test/ken/shift.go
+++ b/test/ken/shift.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.
+// Test shift.
+
package main
var ians [18]int;
diff --git a/test/ken/simparray.go b/test/ken/simparray.go
index 553bc4d68..0e81a341b 100644
--- a/test/ken/simparray.go
+++ b/test/ken/simparray.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.
+// Test simple operations on arrays.
+
package main
var b[10] float32;
diff --git a/test/ken/simpbool.go b/test/ken/simpbool.go
index 4a8324ccb..ab2ecc21a 100644
--- a/test/ken/simpbool.go
+++ b/test/ken/simpbool.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.
+// Test basic operations on bool.
+
package main
type s struct {
diff --git a/test/ken/simpconv.go b/test/ken/simpconv.go
index 9dc7ebf93..22cad2ad0 100644
--- a/test/ken/simpconv.go
+++ b/test/ken/simpconv.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.
+// Test simple arithmetic conversion.
+
package main
type vlong int64
diff --git a/test/ken/simpfun.go b/test/ken/simpfun.go
index b2c803e89..e5dc2b249 100644
--- a/test/ken/simpfun.go
+++ b/test/ken/simpfun.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple functions.
package main
diff --git a/test/ken/simpswitch.go b/test/ken/simpswitch.go
index cc5f281fc..b28250b1d 100644
--- a/test/ken/simpswitch.go
+++ b/test/ken/simpswitch.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.
+// Test simple switch.
+
package main
func main() {
diff --git a/test/ken/simpvar.go b/test/ken/simpvar.go
index 324008d23..c6eefbb5a 100644
--- a/test/ken/simpvar.go
+++ b/test/ken/simpvar.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.
+// Test scoping of variables.
+
package main
diff --git a/test/ken/slicearray.go b/test/ken/slicearray.go
index e0f2d322b..6cf676c58 100644
--- a/test/ken/slicearray.go
+++ b/test/ken/slicearray.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.
+// Test basic operations of slices and arrays.
+
package main
var bx [10]byte
diff --git a/test/ken/sliceslice.go b/test/ken/sliceslice.go
index ed1a5fe5a..c07c59125 100644
--- a/test/ken/sliceslice.go
+++ b/test/ken/sliceslice.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.
+// Test slicing and re-slicing.
+
package main
var bx []byte
diff --git a/test/ken/string.go b/test/ken/string.go
index 9bd905d3d..6df8dc4dd 100644
--- a/test/ken/string.go
+++ b/test/ken/string.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test string operations including printing.
package main
diff --git a/test/ken/strvar.go b/test/ken/strvar.go
index 34b2621b1..4d511fe67 100644
--- a/test/ken/strvar.go
+++ b/test/ken/strvar.go
@@ -4,6 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test struct-valued variables (not pointers).
package main