1
0
mirror of https://github.com/golang/go synced 2024-11-25 00:07:56 -07:00

test: document ken/*.go

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5694065
This commit is contained in:
Rob Pike 2012-02-24 16:24:24 +11:00
parent 51a84bbfaa
commit eb37b5b744
40 changed files with 75 additions and 1 deletions

View 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.
// Test arrays and slices.
package main
func setpd(a []int) {

View 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.
// Test communication operations including select.
package main
import "os"

View 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.
// Test communication with multiple simultanous goroutines.
package main
import "runtime"

View 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.
// Test composite literals.
package main
type M map[int]int

View 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.
// near-exhaustive test of converting numbers between types.
// Test, near-exhaustive, of converting numbers between types.
// No complex numbers though.
package main

View 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.
// Test trivial, bootstrap-level complex numbers, including printing.
package main
const (

View 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.
// Test simple arithmetic and assignment for complex numbers.
package main
const (

View 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.
// Test arithmetic on complex numbers, including multiplication and division.
package main
const (

View 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.
// Test composition, decomposition, and reflection on complex numbers.
package main
import "unsafe"

View 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 complex numbers,including fmt support.
// Used to crash.
package main
import "fmt"

View 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.
// Test compound types made of complex numbers.
package main
var a [12]complex128

View 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.
// Test integer division by constants.
package main
import "math/rand"

View 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.
// Test integer division and modulus.
package main
const (

View 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.
// Test embedded fields of structs, including methods.
package main

View File

@ -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

View 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.
// Test interfaces on basic types.
package main
type myint int

View 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.
// Test interfaces and methods.
package main
type S struct {

View 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.
// Test interface assignment.
package main
type Iputs interface {

View 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.
// Test goto and labels.
package main
func main() {

View File

@ -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

View 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.
// Test simple multi-argument multi-valued function.
package main
func

View 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.
// Test integer modulus by contstants.
package main
import "math/rand"

View File

@ -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

View File

@ -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

View 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.
// Test 'for range' on arrays, slices, and maps.
package main
const size = 16

View 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.
// Test general operation using a list implementation.
package main
type Item interface {

View 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 general operation using s-list.
// First Go program ever run (although not in this exact form).
package main
import "fmt"

View 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.
// Test for loops of many forms.
package main
func assertequal(is, shouldbe int, msg string) {

View 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.
// Test functions of many signatures.
package main
func assertequal(is, shouldbe int, msg string) {

View 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.
// Test shift.
package main
var ians [18]int;

View 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.
// Test simple operations on arrays.
package main
var b[10] float32;

View 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.
// Test basic operations on bool.
package main
type s struct {

View 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.
// Test simple arithmetic conversion.
package main
type vlong int64

View File

@ -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

View 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.
// Test simple switch.
package main
func main() {

View 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.
// Test scoping of variables.
package main

View 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.
// Test basic operations of slices and arrays.
package main
var bx [10]byte

View 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.
// Test slicing and re-slicing.
package main
var bx []byte

View File

@ -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

View File

@ -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