Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
7a0dc1c9
Commit
7a0dc1c9
authored
Jun 28, 2013
by
Rémy Oudompheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: match gccgo error strings.
R=golang-dev, iant CC=golang-dev
https://golang.org/cl/10741043
parent
a3f842a4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
44 deletions
+44
-44
test/fixedbugs/issue4232.go
test/fixedbugs/issue4232.go
+14
-14
test/fixedbugs/issue4452.go
test/fixedbugs/issue4452.go
+1
-1
test/fixedbugs/issue4463.go
test/fixedbugs/issue4463.go
+22
-22
test/fixedbugs/issue4813.go
test/fixedbugs/issue4813.go
+6
-6
test/fixedbugs/issue5609.go
test/fixedbugs/issue5609.go
+1
-1
No files found.
test/fixedbugs/issue4232.go
View file @
7a0dc1c9
...
...
@@ -8,26 +8,26 @@ package p
func
f
()
{
var
a
[
10
]
int
_
=
a
[
-
1
]
// ERROR "invalid array index -1
"
_
=
a
[
-
1
:
]
// ERROR "invalid slice index -1"
_
=
a
[
:-
1
]
// ERROR "invalid slice index -1"
_
=
a
[
10
]
// ERROR "invalid array index 10
"
_
=
a
[
-
1
]
// ERROR "invalid array index -1|index out of bounds
"
_
=
a
[
-
1
:
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
a
[
:-
1
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
a
[
10
]
// ERROR "invalid array index 10|index out of bounds
"
var
s
[]
int
_
=
s
[
-
1
]
// ERROR "invalid slice index -1
"
_
=
s
[
-
1
:
]
// ERROR "invalid slice index -1"
_
=
s
[
:-
1
]
// ERROR "invalid slice index -1"
_
=
s
[
-
1
]
// ERROR "invalid slice index -1|index out of bounds
"
_
=
s
[
-
1
:
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
s
[
:-
1
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
s
[
10
]
const
c
=
"foo"
_
=
c
[
-
1
]
// ERROR "invalid string index -1
"
_
=
c
[
-
1
:
]
// ERROR "invalid slice index -1"
_
=
c
[
:-
1
]
// ERROR "invalid slice index -1"
_
=
c
[
3
]
// ERROR "invalid string index 3
"
_
=
c
[
-
1
]
// ERROR "invalid string index -1|index out of bounds
"
_
=
c
[
-
1
:
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
c
[
:-
1
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
c
[
3
]
// ERROR "invalid string index 3|index out of bounds
"
var
t
string
_
=
t
[
-
1
]
// ERROR "invalid string index -1
"
_
=
t
[
-
1
:
]
// ERROR "invalid slice index -1"
_
=
t
[
:-
1
]
// ERROR "invalid slice index -1"
_
=
t
[
-
1
]
// ERROR "invalid string index -1|index out of bounds
"
_
=
t
[
-
1
:
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
t
[
:-
1
]
// ERROR "invalid slice index -1
|index out of bounds
"
_
=
t
[
3
]
}
test/fixedbugs/issue4452.go
View file @
7a0dc1c9
...
...
@@ -9,5 +9,5 @@
package
main
func
main
()
{
_
=
[
...
]
int
(
4
)
// ERROR "
use of \[\.\.\.\] array
outside of array literal"
_
=
[
...
]
int
(
4
)
// ERROR "
\[\.\.\.\].*
outside of array literal"
}
test/fixedbugs/issue4463.go
View file @
7a0dc1c9
...
...
@@ -45,17 +45,17 @@ func F() {
(
println
(
"bar"
))
(
recover
())
go
append
(
a
,
0
)
// ERROR "discards result"
go
cap
(
a
)
// ERROR "discards result"
go
complex
(
1
,
2
)
// ERROR "discards result"
go
imag
(
1i
)
// ERROR "discards result"
go
len
(
a
)
// ERROR "discards result"
go
make
([]
int
,
10
)
// ERROR "discards result"
go
new
(
int
)
// ERROR "discards result"
go
real
(
1i
)
// ERROR "discards result"
go
unsafe
.
Alignof
(
a
)
// ERROR "discards result"
go
unsafe
.
Offsetof
(
s
.
f
)
// ERROR "discards result"
go
unsafe
.
Sizeof
(
a
)
// ERROR "discards result"
go
append
(
a
,
0
)
// ERROR "
not used|
discards result"
go
cap
(
a
)
// ERROR "
not used|
discards result"
go
complex
(
1
,
2
)
// ERROR "
not used|
discards result"
go
imag
(
1i
)
// ERROR "
not used|
discards result"
go
len
(
a
)
// ERROR "
not used|
discards result"
go
make
([]
int
,
10
)
// ERROR "
not used|
discards result"
go
new
(
int
)
// ERROR "
not used|
discards result"
go
real
(
1i
)
// ERROR "
not used|
discards result"
go
unsafe
.
Alignof
(
a
)
// ERROR "
not used|
discards result"
go
unsafe
.
Offsetof
(
s
.
f
)
// ERROR "
not used|
discards result"
go
unsafe
.
Sizeof
(
a
)
// ERROR "
not used|
discards result"
go
close
(
c
)
go
copy
(
a
,
a
)
...
...
@@ -65,17 +65,17 @@ func F() {
go
println
(
"bar"
)
go
recover
()
defer
append
(
a
,
0
)
// ERROR "discards result"
defer
cap
(
a
)
// ERROR "discards result"
defer
complex
(
1
,
2
)
// ERROR "discards result"
defer
imag
(
1i
)
// ERROR "discards result"
defer
len
(
a
)
// ERROR "discards result"
defer
make
([]
int
,
10
)
// ERROR "discards result"
defer
new
(
int
)
// ERROR "discards result"
defer
real
(
1i
)
// ERROR "discards result"
defer
unsafe
.
Alignof
(
a
)
// ERROR "discards result"
defer
unsafe
.
Offsetof
(
s
.
f
)
// ERROR "discards result"
defer
unsafe
.
Sizeof
(
a
)
// ERROR "discards result"
defer
append
(
a
,
0
)
// ERROR "
not used|
discards result"
defer
cap
(
a
)
// ERROR "
not used|
discards result"
defer
complex
(
1
,
2
)
// ERROR "
not used|
discards result"
defer
imag
(
1i
)
// ERROR "
not used|
discards result"
defer
len
(
a
)
// ERROR "
not used|
discards result"
defer
make
([]
int
,
10
)
// ERROR "
not used|
discards result"
defer
new
(
int
)
// ERROR "
not used|
discards result"
defer
real
(
1i
)
// ERROR "
not used|
discards result"
defer
unsafe
.
Alignof
(
a
)
// ERROR "
not used|
discards result"
defer
unsafe
.
Offsetof
(
s
.
f
)
// ERROR "
not used|
discards result"
defer
unsafe
.
Sizeof
(
a
)
// ERROR "
not used|
discards result"
defer
close
(
c
)
defer
copy
(
a
,
a
)
...
...
test/fixedbugs/issue4813.go
View file @
7a0dc1c9
...
...
@@ -31,22 +31,22 @@ var (
a3
=
A
[
f2
]
// ERROR "truncated"
a4
=
A
[
c
]
a5
=
A
[
c2
]
// ERROR "truncated"
a6
=
A
[
vf
]
// ERROR "non-integer"
a7
=
A
[
vc
]
// ERROR "non-integer"
a6
=
A
[
vf
]
// ERROR "non-integer
|must be integer
"
a7
=
A
[
vc
]
// ERROR "non-integer
|must be integer
"
s1
=
S
[
i
]
s2
=
S
[
f
]
s3
=
S
[
f2
]
// ERROR "truncated"
s4
=
S
[
c
]
s5
=
S
[
c2
]
// ERROR "truncated"
s6
=
S
[
vf
]
// ERROR "non-integer"
s7
=
S
[
vc
]
// ERROR "non-integer"
s6
=
S
[
vf
]
// ERROR "non-integer
|must be integer
"
s7
=
S
[
vc
]
// ERROR "non-integer
|must be integer
"
t1
=
T
[
i
]
t2
=
T
[
f
]
t3
=
T
[
f2
]
// ERROR "truncated"
t4
=
T
[
c
]
t5
=
T
[
c2
]
// ERROR "truncated"
t6
=
T
[
vf
]
// ERROR "non-integer"
t7
=
T
[
vc
]
// ERROR "non-integer"
t6
=
T
[
vf
]
// ERROR "non-integer
|must be integer
"
t7
=
T
[
vc
]
// ERROR "non-integer
|must be integer
"
)
test/fixedbugs/issue5609.go
View file @
7a0dc1c9
...
...
@@ -10,4 +10,4 @@ package pkg
const
Large
uint64
=
18446744073709551615
var
foo
[
Large
]
uint64
// ERROR "array bound is too large"
var
foo
[
Large
]
uint64
// ERROR "array bound is too large
|array bound overflows
"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment