summaryrefslogtreecommitdiff
path: root/test/ken/for.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2008-06-06 14:27:34 -0700
committerRob Pike <r@golang.org>2008-06-06 14:27:34 -0700
commitf47dd1a887306dbc45a43701b92a93b9ca3cd10a (patch)
tree22e573d0f4432512779320404d5df24503fc4919 /test/ken/for.go
parentbaa3be75b8d3039bd88eab7951096319655a5d45 (diff)
downloadgo-f47dd1a887306dbc45a43701b92a93b9ca3cd10a.tar.gz
add ken's tests.
update run to work with multiple directories SVN=121485
Diffstat (limited to 'test/ken/for.go')
-rw-r--r--test/ken/for.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/ken/for.go b/test/ken/for.go
new file mode 100644
index 000000000..52ccbff08
--- /dev/null
+++ b/test/ken/for.go
@@ -0,0 +1,19 @@
+// $G $D/$F.go && $L $F.$A && ./$A.out
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+
+package main
+
+func
+main()
+{
+ var t,i int;
+
+ for i=0; i<100; i=i+1 {
+ t = t+i;
+ }
+ if t != 50*99 { panic t; }
+}