fix some tests
SVN=125987
This commit is contained in:
parent
d915b96100
commit
3a613be75e
23
test/bugs/bug064.go
Normal file
23
test/bugs/bug064.go
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
// $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";
|
||||||
|
}
|
||||||
|
}
|
@ -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
|
||||||
|
@ -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()
|
|||||||
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";
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user