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 float) int {
28 return (a+b)/2 + int(c);
35 func f6(a int) (r int) {
39 func f7(a int) (x int, y float) {
44 func f8(a int) (x int, y float) {
52 func (t *T) m10(a int, b float) int {
53 return (t.x+a) * (t.y+int(b));
57 //BUG func f9(a int) (i int, f float) { // multiple returns not ready yet
58 // BUG funny return value
70 assertequal(r3, 3, "3");
72 assertequal(r4, 4, "4");
74 assertequal(r5, 5, "5");
76 assertequal(r6, 6, "6");
80 //BUG assertequal(r7, 7, "r7");
81 //BUG assertequal(int(s7), 7, "s7");
85 //BUG assertequal(r8, 8, "r8");
86 //BUG assertequal(int(s8), 8, "s8");
90 //BUG assertequal(r9, 9, "r9");
91 //BUG assertequal(int(s9), 9, "s9");
96 assertequal(r10, 10, "10");