Commit b9159722 authored by Russ Cox's avatar Russ Cox

add test for yesterday's interface rule change (interface/convert1.go).

move interface tests to subdirectory.

R=r
DELTA=1632  (827 added, 804 deleted, 1 changed)
OCL=29181
CL=29191
parent a016081f
......@@ -26,18 +26,6 @@ panic PC=xxx
=========== ./helloworld.go
hello, world
=========== ./interface2.go
cannot convert type *main.S to interface main.I: missing method Foo
throw: interface conversion
panic PC=xxx
=========== ./interface3.go
cannot convert type *main.S to interface main.I2: missing method Name
throw: interface conversion
panic PC=xxx
=========== ./peano.go
0! = 1
1! = 1
......@@ -85,6 +73,18 @@ abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz
=========== chan/nonblock.go
PASS
=========== interface/fail.go
cannot convert type *main.S to interface main.I: missing method Foo
throw: interface conversion
panic PC=xxx
=========== interface/returntype.go
cannot convert type *main.S to interface main.I2: missing method Name
throw: interface conversion
panic PC=xxx
=========== bugs/bug132.go
BUG: compilation succeeds incorrectly
......
// $G $D/$F.go && $L $F.$A && ./$A.out
// 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.
// Check that static interface conversion of
// interface value nil succeeds.
package main
type R interface { R(); }
type RW interface { R(); W(); }
var e interface {}
var r R;
var rw RW;
func main() {
r = r;
r = rw;
e = r;
e = rw;
rw = rw;
}
// Copyright 2009 The Go Authors. All rights reserved.
// $G $D/$F.go && $L $F.$A && ./$A.out
// 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.
// $G $F.go && $L $F.$A && ./$A.out
// Implicit methods for embedded types.
// Mixed pointer and non-pointer receivers.
......
// Copyright 2009 The Go Authors. All rights reserved.
// errchk $G $D/$F.go
// 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.
// errchk $G $F.go
// Error messages about missing implicit methods.
package main
......
// Copyright 2009 The Go Authors. All rights reserved.
// $G $D/$F.go || echo BUG: should compile
// 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.
// $G $D/$F.go || echo BUG: should compile
// Check mutually recursive interfaces
package main
......
......@@ -30,7 +30,7 @@ TMP2FILE=/tmp/gotest2-$USER
# on thresher, 3GB suffices to run the tests; with 2GB, peano fails.
ulimit -v 4000000
for dir in . ken chan bugs fixedbugs
for dir in . ken chan interface bugs fixedbugs
do
for i in $dir/*.go
do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment