LEFT | RIGHT |
(no file at all) | |
1 // $G $D/$F.go && $L $F.$A && ./$A.out >tmp.go && | 1 // runoutput |
2 // $G tmp.go && $L tmp.$A && ./$A.out || echo BUG: select5 | |
3 // rm -f tmp.go | |
4 | 2 |
5 // Copyright 2011 The Go Authors. All rights reserved. | 3 // Copyright 2011 The Go Authors. All rights reserved. |
6 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
7 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
8 | 6 |
9 // Generate test of channel operations and simple selects. | 7 // Generate test of channel operations and simple selects. |
10 // The output of this program is compiled and run to do the | 8 // The output of this program is compiled and run to do the |
11 // actual test. | 9 // actual test. |
12 | 10 |
13 // Each test does only one real send or receive at a time, but phrased | 11 // Each test does only one real send or receive at a time, but phrased |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 } | 472 } |
475 if cp < 0 { | 473 if cp < 0 { |
476 choices = choices[:0] | 474 choices = choices[:0] |
477 return false | 475 return false |
478 } | 476 } |
479 choices[cp].i++ | 477 choices[cp].i++ |
480 choices = choices[:cp+1] | 478 choices = choices[:cp+1] |
481 cp = 0 | 479 cp = 0 |
482 return true | 480 return true |
483 } | 481 } |
LEFT | RIGHT |