Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
3a613be7
Commit
3a613be7
authored
Jul 03, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some tests
SVN=125987
parent
d915b961
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
12 deletions
+56
-12
bug064.go
test/bugs/bug064.go
+23
-0
golden.out
test/golden.out
+17
-11
simassign.go
test/simassign.go
+16
-1
No files found.
test/bugs/bug064.go
0 → 100644
View file @
3a613be7
// $G $D/$F.go || echo BUG: compilation should succeed
// 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
swap
(
x
,
y
int
)
(
u
,
v
int
)
{
return
y
,
x
}
func
main
()
{
a
:=
1
;
b
:=
2
;
a
,
b
=
swap
(
swap
(
a
,
b
));
if
a
!=
2
||
b
!=
1
{
panic
"bad swap"
;
}
}
test/golden.out
View file @
3a613be7
...
@@ -318,19 +318,25 @@ BUG: known to fail incorrectly
...
@@ -318,19 +318,25 @@ BUG: known to fail incorrectly
BUG: known to succeed incorrectly
BUG: known to succeed incorrectly
=========== bugs/bug063.go
=========== bugs/bug063.go
bugs/bug063.go:
4
: illegal combination of literals XOR 7
bugs/bug063.go:
5
: illegal combination of literals XOR 7
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: expression must be a constant
bugs/bug063.go:
5
: expression must be a constant
bugs/bug063.go:
4
: fatal error: too many errors
bugs/bug063.go:
5
: fatal error: too many errors
BUG: should compile without problems
BUG: should compile without problems
=========== bugs/bug064.go
bugs/bug064.go:15: illegal types for operand: CALL
(<int32>INT32)
({<u><int32>INT32;<v><int32>INT32;})
BUG: compilation should succeed
=========== fixedbugs/bug000.go
=========== fixedbugs/bug000.go
=========== fixedbugs/bug001.go
=========== fixedbugs/bug001.go
...
...
test/simassign.go
View file @
3a613be7
...
@@ -33,7 +33,13 @@ testit() bool
...
@@ -33,7 +33,13 @@ testit() bool
i
==
9
;
i
==
9
;
}
}
func
main
()
func
swap
(
x
,
y
int
)
(
u
,
v
int
)
{
return
y
,
x
}
func
main
()
{
{
a
=
1
;
a
=
1
;
b
=
2
;
b
=
2
;
...
@@ -65,4 +71,13 @@ func main()
...
@@ -65,4 +71,13 @@ func main()
printit
();
printit
();
panic
;
panic
;
}
}
a
,
b
=
swap
(
1
,
2
);
if
a
!=
2
||
b
!=
1
{
panic
"bad swap"
;
}
//BUG a, b = swap(swap(a, b));
// if a != 2 || b != 1 {
// panic "bad swap";
// }
}
}
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