summaryrefslogtreecommitdiff
path: root/test/syntax
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2011-09-13 13:11:55 +0200
committerOndřej Surý <ondrej@sury.org>2011-09-13 13:11:55 +0200
commit80f18fc933cf3f3e829c5455a1023d69f7b86e52 (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /test/syntax
parent28592ee1ea1f5cdffcf85472f9de0285d928cf12 (diff)
downloadgolang-80f18fc933cf3f3e829c5455a1023d69f7b86e52.tar.gz
Imported Upstream version 60
Diffstat (limited to 'test/syntax')
-rw-r--r--test/syntax/chan.go17
-rw-r--r--test/syntax/chan1.go17
-rw-r--r--test/syntax/forvar.go10
-rw-r--r--test/syntax/if.go18
-rw-r--r--test/syntax/import.go14
-rw-r--r--test/syntax/interface.go14
-rw-r--r--test/syntax/semi1.go14
-rw-r--r--test/syntax/semi2.go14
-rw-r--r--test/syntax/semi3.go14
-rw-r--r--test/syntax/semi4.go14
-rw-r--r--test/syntax/semi5.go13
-rw-r--r--test/syntax/semi6.go13
-rw-r--r--test/syntax/semi7.go14
-rw-r--r--test/syntax/topexpr.go20
-rw-r--r--test/syntax/typesw.go13
-rw-r--r--test/syntax/vareq.go10
-rw-r--r--test/syntax/vareq1.go10
17 files changed, 0 insertions, 239 deletions
diff --git a/test/syntax/chan.go b/test/syntax/chan.go
deleted file mode 100644
index ff3577502..000000000
--- a/test/syntax/chan.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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
-
-type xyz struct {
- ch chan
-} // ERROR "unexpected .*}.* in channel type"
-
-func Foo(y chan) { // ERROR "unexpected .*\).* in channel type"
-}
-
-func Bar(x chan, y int) { // ERROR "unexpected comma in channel type"
-}
diff --git a/test/syntax/chan1.go b/test/syntax/chan1.go
deleted file mode 100644
index 9c12e5e6f..000000000
--- a/test/syntax/chan1.go
+++ /dev/null
@@ -1,17 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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 c chan int
-var v int
-
-func main() {
- if c <- v { // ERROR "send statement.*value.*select"
- }
-}
-
-var _ = c <- v // ERROR "send statement.*value.*select"
diff --git a/test/syntax/forvar.go b/test/syntax/forvar.go
deleted file mode 100644
index f12ce55ca..000000000
--- a/test/syntax/forvar.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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() {
- for var x = 0; x < 10; x++ { // ERROR "var declaration not allowed in for initializer"
diff --git a/test/syntax/if.go b/test/syntax/if.go
deleted file mode 100644
index a3b51f0c0..000000000
--- a/test/syntax/if.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// errchk $G $D/$F.go
-
-// Copyright 2011 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 x() {
-}
-
-func main() {
- if { // ERROR "missing condition"
- }
-
- if x(); { // ERROR "missing condition"
- }
-}
diff --git a/test/syntax/import.go b/test/syntax/import.go
deleted file mode 100644
index dd1f26134..000000000
--- a/test/syntax/import.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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
-
-import (
- "io", // ERROR "unexpected comma"
- "os"
-)
-
-
diff --git a/test/syntax/interface.go b/test/syntax/interface.go
deleted file mode 100644
index a7f43533a..000000000
--- a/test/syntax/interface.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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
-
-type T interface {
- f, g () // ERROR "name list not allowed in interface type"
-}
-
-
-
diff --git a/test/syntax/semi1.go b/test/syntax/semi1.go
deleted file mode 100644
index 547d9bf79..000000000
--- a/test/syntax/semi1.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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() {
- if x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined"
- {
- z // GCCGO_ERROR "undefined"
-
-
diff --git a/test/syntax/semi2.go b/test/syntax/semi2.go
deleted file mode 100644
index 28d1d3906..000000000
--- a/test/syntax/semi2.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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() {
- switch x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined"
- {
- z
-
-
diff --git a/test/syntax/semi3.go b/test/syntax/semi3.go
deleted file mode 100644
index ab5941bda..000000000
--- a/test/syntax/semi3.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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() {
- for x; y; z // ERROR "unexpected semicolon or newline before .?{.?|undefined"
- {
- z // GCCGO_ERROR "undefined"
-
-
diff --git a/test/syntax/semi4.go b/test/syntax/semi4.go
deleted file mode 100644
index 7a9c2956e..000000000
--- a/test/syntax/semi4.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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() {
- for x // GCCGO_ERROR "undefined"
- { // ERROR "unexpected semicolon or newline before .?{.?"
- z // GCCGO_ERROR "undefined"
-
-
diff --git a/test/syntax/semi5.go b/test/syntax/semi5.go
deleted file mode 100644
index 5f8ccc688..000000000
--- a/test/syntax/semi5.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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()
-{ // ERROR "unexpected semicolon or newline before .?{.?"
-
-
-
diff --git a/test/syntax/semi6.go b/test/syntax/semi6.go
deleted file mode 100644
index b6279ed30..000000000
--- a/test/syntax/semi6.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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
-
-type T // ERROR "unexpected semicolon or newline in type declaration"
-{
-
-
-
diff --git a/test/syntax/semi7.go b/test/syntax/semi7.go
deleted file mode 100644
index 5a7b3ff4c..000000000
--- a/test/syntax/semi7.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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() {
- if x { } // GCCGO_ERROR "undefined"
- else { } // ERROR "unexpected semicolon or newline before .?else.?"
-}
-
-
diff --git a/test/syntax/topexpr.go b/test/syntax/topexpr.go
deleted file mode 100644
index 93d86fbe9..000000000
--- a/test/syntax/topexpr.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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
-
-fmt.Printf("hello") // ERROR "non-declaration statement outside function body|expected declaration"
-
-func main() {
-}
-
-x++ // ERROR "non-declaration statement outside function body|expected declaration"
-
-func init() {
-}
-
-x,y := 1, 2 // ERROR "non-declaration statement outside function body|expected declaration"
-
diff --git a/test/syntax/typesw.go b/test/syntax/typesw.go
deleted file mode 100644
index 47f683cdf..000000000
--- a/test/syntax/typesw.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2011 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() {
- switch main() := interface{}(nil).(type) { // ERROR "invalid variable name"
- default:
- }
-}
diff --git a/test/syntax/vareq.go b/test/syntax/vareq.go
deleted file mode 100644
index 8525be8cf..000000000
--- a/test/syntax/vareq.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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 x map[string]string{"a":"b"} // ERROR "unexpected { at end of statement|expected ';' or '}' or newline"
diff --git a/test/syntax/vareq1.go b/test/syntax/vareq1.go
deleted file mode 100644
index 9d70bea39..000000000
--- a/test/syntax/vareq1.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// errchk $G -e $D/$F.go
-
-// Copyright 2010 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 map[string]string{"a":"b"} // ERROR "unexpected { at end of statement|expected ';' or newline after top level declaration"
-