commit | 3a613be75ed75cdbb6565e1d780aa0ef4593b9dc | [log] [tgz] |
---|---|---|
author | Rob Pike <r@golang.org> | Thu Jul 03 16:48:59 2008 -0700 |
committer | Rob Pike <r@golang.org> | Thu Jul 03 16:48:59 2008 -0700 |
tree | 6369d83d6c39184666ca90c1afc346375b02ed8e | |
parent | d915b961000acdc2fc3f4ad726c540e1fc1e6aa2 [diff] [blame] |
fix some tests SVN=125987
diff --git a/test/simassign.go b/test/simassign.go index aeb988d..5b8c3f3 100644 --- a/test/simassign.go +++ b/test/simassign.go
@@ -33,7 +33,13 @@ i == 9; } -func main() +func +swap(x, y int) (u, v int) { + return y, x +} + +func +main() { a = 1; b = 2; @@ -65,4 +71,13 @@ printit(); panic; } + + a, b = swap(1, 2); + if a != 2 || b != 1 { + panic "bad swap"; + } +//BUG a, b = swap(swap(a, b)); +// if a != 2 || b != 1 { +// panic "bad swap"; +// } }