LEFT | RIGHT |
(no file at all) | |
1 // $G $F.go && $L $F.$A && ./$A.out | 1 // run |
2 | 2 |
3 // Copyright 2009 The Go Authors. All rights reserved. | 3 // Copyright 2009 The Go Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
6 | 6 |
7 package main | 7 package main |
8 | 8 |
9 func assertequal(is, shouldbe int, msg string) { | 9 func assertequal(is, shouldbe int, msg string) { |
10 if is != shouldbe { | 10 if is != shouldbe { |
11 print("assertion fail", msg, "\n") | 11 print("assertion fail", msg, "\n") |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 if false { | 82 if false { |
83 count = count + 1 | 83 count = count + 1 |
84 t := 7 | 84 t := 7 |
85 _ = t | 85 _ = t |
86 } else { | 86 } else { |
87 count = count - t | 87 count = count - t |
88 } | 88 } |
89 _ = t | 89 _ = t |
90 assertequal(count, -1, "if else false var outside") | 90 assertequal(count, -1, "if else false var outside") |
91 } | 91 } |
LEFT | RIGHT |