1
// $G $F.go && $L $F.$A && ./$A.out
3
// Copyright 2009 The Go Authors. All rights reserved.
4
// Use of this source code is governed by a BSD-style
5
// license that can be found in the LICENSE file.
10
func assertequal(is, shouldbe int, msg string) {
12
print("assertion fail", msg, "\n")
23
func f3(a, b int) int {
27
func f4(a, b int, c float32) int {
28
return (a+b)/2 + int(c)
35
func f6(a int) (r int) {
39
func f7(a int) (x int, y float32) {
44
func f8(a int) (x int, y float32) {
52
func (t *T) m10(a int, b float32) int {
53
return (t.x + a) * (t.y + int(b))
57
func f9(a int) (i int, f float32) {
68
assertequal(r3, 3, "3")
70
assertequal(r4, 4, "4")
72
assertequal(r5, 5, "5")
74
assertequal(r6, 6, "6")
76
assertequal(r7, 7, "r7")
77
assertequal(int(s7), 7, "s7")
79
assertequal(r8, 8, "r8")
80
assertequal(int(s8), 8, "s8")
82
assertequal(r9, 9, "r9")
83
assertequal(int(s9), 9, "s9")
88
assertequal(r10, 10, "10")