mirror of
https://github.com/golang/go
synced 2024-11-21 22:34:48 -07:00
test: document ken/*.go
R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5694065
This commit is contained in:
parent
51a84bbfaa
commit
eb37b5b744
@ -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) {
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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 (
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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 (
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
@ -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"
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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() {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user