summaryrefslogtreecommitdiff
path: root/test/ken/simpvar.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
commitab34d15f69de4e5b3330b43e23f99bf3ee2ed10a (patch)
tree22e573d0f4432512779320404d5df24503fc4919 /test/ken/simpvar.go
parent384c5bed2d921027085cd1f2d4eff9a2652b6513 (diff)
downloadgo-git-ab34d15f69de4e5b3330b43e23f99bf3ee2ed10a.tar.gz
add ken's tests.
update run to work with multiple directories SVN=121485
Diffstat (limited to 'test/ken/simpvar.go')
-rw-r--r--test/ken/simpvar.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/ken/simpvar.go b/test/ken/simpvar.go
new file mode 100644
index 0000000000..2dd4e73acd
--- /dev/null
+++ b/test/ken/simpvar.go
@@ -0,0 +1,25 @@
+// $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
+
+var x,y int;
+
+func
+main()
+{
+
+ x = 15;
+ y = 20;
+ {
+ var x int;
+ x = 25;
+ y = 25;
+ }
+ x = x+y;
+ if(x != 40) { panic x; }
+}