]> Cypherpunks repositories - gostls13.git/commitdiff
update tests: nil is no longer integer-compatible
authorRob Pike <r@golang.org>
Wed, 10 Dec 2008 21:55:47 +0000 (13:55 -0800)
committerRob Pike <r@golang.org>
Wed, 10 Dec 2008 21:55:47 +0000 (13:55 -0800)
R=rsc
DELTA=56  (17 added, 32 deleted, 7 changed)
OCL=20876
CL=20916

test/bugs/bug119.go
test/bugs/bug124.go [deleted file]
test/fixedbugs/bug126.go [moved from test/bugs/bug126.go with 87% similarity]
test/fixedbugs/bug127.go [moved from test/bugs/bug127.go with 100% similarity]
test/golden.out

index 0934a43070a8b080afd74a8555dc763a64120583..7969379472e380e70f7ad8657963d81569d2b294 100644 (file)
@@ -12,9 +12,9 @@ func foo(a *[]int) int {
 
 func main() {
        a := &[]int{12};
-       if x := a[0]   ; x != 12 { panicln(1, x) }
-       if x := (*a)[0]; x != 12 { panicln(2, x) }
-       if x := foo(a) ; x != 12 { panicln(3, x) }  // fails (x is incorrect)
+       if x := a[0]   ; x != 12 { panicln(1) }
+       if x := (*a)[0]; x != 12 { panicln(2) }
+       if x := foo(a) ; x != 12 { panicln(3) }  // fails (x is incorrect)
 }
 
 /*
diff --git a/test/bugs/bug124.go b/test/bugs/bug124.go
deleted file mode 100644 (file)
index 62ea517..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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 $D/$F.go
-package main
-func fn(i int) bool {
-  if i == nil {                // ERROR "type"
-    return true
-  }
-  return false 
-}
similarity index 87%
rename from test/bugs/bug126.go
rename to test/fixedbugs/bug126.go
index 8fde08aa318673428ab5bfe88154477c04bb8e60..a8d56e1221e4e42f86f878cd460fb4c1ec370416 100644 (file)
@@ -8,4 +8,4 @@ package main
 
 // same const identifier declared twice should not be accepted
 const none = 0  // GCCGO_ERROR "previous"
-const none = 1  // ERROR "redeclared|redef"
+const none = 1;  // ERROR "redeclared|redef"
similarity index 100%
rename from test/bugs/bug127.go
rename to test/fixedbugs/bug127.go
index 3e70b991ae9fdcdee2aeec1368e4bfeaac7fbdd6..0e8aca4735eeb5e2d4e86547fb7669994798d888 100644 (file)
@@ -147,7 +147,7 @@ bugs/bug117.go:9: illegal types for operand: RETURN
 BUG: should compile
 
 =========== bugs/bug119.go
-3 74256
+3
 
 panic PC=xxx
 BUG: should not fail
@@ -167,18 +167,9 @@ BUG: compilation succeeds incorrectly
 =========== bugs/bug123.go
 BUG: errchk: command succeeded unexpectedly:  6g bugs/bug123.go
 
-=========== bugs/bug124.go
-BUG: errchk: command succeeded unexpectedly:  6g bugs/bug124.go
-
 =========== bugs/bug125.go
 BUG: errchk: command succeeded unexpectedly:  6g bugs/bug125.go
 
-=========== bugs/bug126.go
-BUG: errchk: command succeeded unexpectedly:  6g bugs/bug126.go
-
-=========== bugs/bug127.go
-BUG: errchk: command succeeded unexpectedly:  6g bugs/bug127.go
-
 =========== fixedbugs/bug016.go
 fixedbugs/bug016.go:7: overflow converting constant to uint
 
@@ -204,9 +195,9 @@ fixedbugs/bug029.go:6: syntax error near func
 fixedbugs/bug029.go:6: syntax error near int
 
 =========== fixedbugs/bug035.go
-fixedbugs/bug035.go:6: var i redeclared in this block
+fixedbugs/bug035.go:6: variable i redeclared in this block
        previous declaration at fixedbugs/bug035.go:5
-fixedbugs/bug035.go:7: var f redeclared in this block
+fixedbugs/bug035.go:7: variable f redeclared in this block
        previous declaration at fixedbugs/bug035.go:5
 
 =========== fixedbugs/bug037.go
@@ -215,7 +206,7 @@ fixedbugs/bug037.go:6: illegal types for operand: AS
        undefined
 
 =========== fixedbugs/bug039.go
-fixedbugs/bug039.go:6: var x redeclared in this block
+fixedbugs/bug039.go:6: variable x redeclared in this block
        previous declaration at fixedbugs/bug039.go:5
 
 =========== fixedbugs/bug049.go
@@ -300,3 +291,5 @@ SIGSEGV: segmentation violation
 Faulting address: 0x0
 pc: xxx
 
+
+=========== fixedbugs/bug126.go