Russ Cox | 2b1c9b4 | 2012-02-16 23:49:30 -0500 | [diff] [blame] | 1 | // run |
Russ Cox | 2273115 | 2008-09-12 16:35:02 -0700 | [diff] [blame] | 2 | |
| 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. |
| 6 | |
| 7 | package main |
| 8 | |
Russ Cox | be2edb5 | 2009-03-03 08:39:12 -0800 | [diff] [blame] | 9 | var a = []int { 1, 2, 3 } |
Russ Cox | 2273115 | 2008-09-12 16:35:02 -0700 | [diff] [blame] | 10 | |
| 11 | func main() { |
| 12 | if len(a) != 3 { panic("array len") } |
| 13 | // print(a[0], " ", a[1], " ", a[2], "\n") |
| 14 | if a[0] != 1 || a[1] != 2 || a[2] != 3 { panic("array contents") } |
| 15 | } |