aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2010-08-31 14:12:23 -0700
committerIan Lance Taylor <iant@golang.org>2010-08-31 14:12:23 -0700
commit09977734cd63aa31563cd11a3786e8951758b041 (patch)
tree809b9a1ea8433d2654b76154dbac4590c91d4542
parent472cd3af12609ded3484cfdf7f58083c42153a9c (diff)
downloadgo-09977734cd63aa31563cd11a3786e8951758b041.tar.gz
go-09977734cd63aa31563cd11a3786e8951758b041.zip
test: gccgo and gc print the error on different lines.
This introduces GC_ERROR to mark an error only issued by the gc compiler. GCCGO_ERROR already exists to mark errors only issued by the gccgo compiler. Obviously these should be used sparingly. bug195.go:9: error: interface contains embedded non-interface bug195.go:12: error: interface contains embedded non-interface bug195.go:15: error: interface contains embedded non-interface bug195.go:18: error: invalid recursive interface bug195.go:22: error: invalid recursive interface R=rsc CC=golang-dev https://golang.org/cl/2040043
-rwxr-xr-xtest/errchk4
-rw-r--r--test/fixedbugs/bug195.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/errchk b/test/errchk
index 115aa7be09..ab7192da2a 100755
--- a/test/errchk
+++ b/test/errchk
@@ -60,8 +60,8 @@ sub bug() {
$line = 0;
foreach $src (@src) {
$line++;
- next unless $src =~ m|// ERROR (.*)|;
- $regexp = $1;
+ next unless $src =~ m|// (GC_)?ERROR (.*)|;
+ $regexp = $2;
if($regexp !~ /^"([^"]*)"/) {
print STDERR "$file:$line: malformed regexp\n";
next;
diff --git a/test/fixedbugs/bug195.go b/test/fixedbugs/bug195.go
index 27bbbd354a..65ab02a039 100644
--- a/test/fixedbugs/bug195.go
+++ b/test/fixedbugs/bug195.go
@@ -19,9 +19,9 @@ type I4 interface {
}
type I5 interface {
- I6
+ I6 // GCCGO_ERROR "interface"
}
type I6 interface {
- I5 // ERROR "interface"
+ I5 // GC_ERROR "interface"
}