summaryrefslogtreecommitdiff
path: root/src/pkg/go/parser/testdata
diff options
context:
space:
mode:
authorTianon Gravi <admwiggin@gmail.com>2015-01-15 11:54:00 -0700
committerTianon Gravi <admwiggin@gmail.com>2015-01-15 11:54:00 -0700
commitf154da9e12608589e8d5f0508f908a0c3e88a1bb (patch)
treef8255d51e10c6f1e0ed69702200b966c9556a431 /src/pkg/go/parser/testdata
parent8d8329ed5dfb9622c82a9fbec6fd99a580f9c9f6 (diff)
downloadgolang-upstream/1.4.tar.gz
Imported Upstream version 1.4upstream/1.4
Diffstat (limited to 'src/pkg/go/parser/testdata')
-rw-r--r--src/pkg/go/parser/testdata/commas.src19
-rw-r--r--src/pkg/go/parser/testdata/issue3106.src46
2 files changed, 0 insertions, 65 deletions
diff --git a/src/pkg/go/parser/testdata/commas.src b/src/pkg/go/parser/testdata/commas.src
deleted file mode 100644
index af6e70645..000000000
--- a/src/pkg/go/parser/testdata/commas.src
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2012 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.
-
-// Test case for error messages/parser synchronization
-// after missing commas.
-
-package p
-
-var _ = []int{
- 0 /* ERROR "missing ','" */
-}
-
-var _ = []int{
- 0,
- 1,
- 2,
- 3 /* ERROR "missing ','" */
-}
diff --git a/src/pkg/go/parser/testdata/issue3106.src b/src/pkg/go/parser/testdata/issue3106.src
deleted file mode 100644
index 82796c8ce..000000000
--- a/src/pkg/go/parser/testdata/issue3106.src
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2012 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.
-
-// Test case for issue 3106: Better synchronization of
-// parser after certain syntax errors.
-
-package main
-
-func f() {
- var m Mutex
- c := MakeCond(&m)
- percent := 0
- const step = 10
- for i := 0; i < 5; i++ {
- go func() {
- for {
- // Emulates some useful work.
- time.Sleep(1e8)
- m.Lock()
- defer
- if /* ERROR "expected operand, found 'if'" */ percent == 100 {
- m.Unlock()
- break
- }
- percent++
- if percent % step == 0 {
- //c.Signal()
- }
- m.Unlock()
- }
- }()
- }
- for {
- m.Lock()
- if percent == 0 || percent % step != 0 {
- c.Wait()
- }
- fmt.Print(",")
- if percent == 100 {
- m.Unlock()
- break
- }
- m.Unlock()
- }
-}