LEFT | RIGHT |
1 // run|run - | 1 // runoutput |
2 | 2 |
3 // Copyright 2011 The Go Authors. All rights reserved. | 3 // Copyright 2011 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 // Generate test of channel operations and simple selects. | 7 // Generate test of channel operations and simple selects. |
8 // 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 |
9 // actual test. | 9 // actual test. |
10 | 10 |
11 // 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... |
472 } | 472 } |
473 if cp < 0 { | 473 if cp < 0 { |
474 choices = choices[:0] | 474 choices = choices[:0] |
475 return false | 475 return false |
476 } | 476 } |
477 choices[cp].i++ | 477 choices[cp].i++ |
478 choices = choices[:cp+1] | 478 choices = choices[:cp+1] |
479 cp = 0 | 479 cp = 0 |
480 return true | 480 return true |
481 } | 481 } |
LEFT | RIGHT |