]> Cypherpunks repositories - gostls13.git/commitdiff
update more tests to reflect tweaked grammar for if, switch
authorRob Pike <r@golang.org>
Mon, 16 Jun 2008 19:16:11 +0000 (12:16 -0700)
committerRob Pike <r@golang.org>
Mon, 16 Jun 2008 19:16:11 +0000 (12:16 -0700)
SVN=122916

test/bugs/bug006.go
test/fixedbugs/bug001.go [moved from test/bugs/bug001.go with 100% similarity]
test/fixedbugs/bug002.go [moved from test/bugs/bug002.go with 100% similarity]
test/fixedbugs/bug003.go [moved from test/bugs/bug003.go with 68% similarity]
test/fixedbugs/bug004.go [moved from test/bugs/bug004.go with 100% similarity]
test/golden.out

index e686c838538800464d542405035acae437741042..eb5f5218a83afa0fabc60571f4389641136c7bc6 100644 (file)
@@ -16,17 +16,3 @@ func main() int {
        if g != 4.5 { print " fail\n"; return 1; }
        return 0;
 }
-/*
-should 4.5 * iota be ok? perhaps, perhaps not. but (all!) error msgs are bad:
-bug6.go:4: illegal combination of literals 0 0
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: expression must be a constant
-bug6.go:4: fatal error: too many errors
-*/
similarity index 100%
rename from test/bugs/bug001.go
rename to test/fixedbugs/bug001.go
similarity index 100%
rename from test/bugs/bug002.go
rename to test/fixedbugs/bug002.go
similarity index 68%
rename from test/bugs/bug003.go
rename to test/fixedbugs/bug003.go
index 07f04d227dba5377ecf9fe822e2a95617d37a58c..e45975be41adb679f2c203600f7632094b035e4b 100644 (file)
@@ -7,9 +7,8 @@
 package main
 
 func main() {
-       switch ; {}  // compiles; should be an error (should be simplevardecl before ;)
+       switch ; { case true: return; default: return }
 }
 /*
-bug003.go:6: switch statement must have case labels
 bug003.go:6: fatal error: walkswitch: not case EMPTY
 */
similarity index 100%
rename from test/bugs/bug004.go
rename to test/fixedbugs/bug004.go
index 2a727a6749b5571e8584737504f81c7c22f5eb0c..8845e16eaf450804231d1d3c634756b63697fee8 100644 (file)
@@ -114,19 +114,6 @@ abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz-abcxyz
 
 =========== ken/strvar.go
 
-=========== bugs/bug001.go
-BUG: known to succeed incorrectly
-
-=========== bugs/bug002.go
-BUG: known to succeed incorrectly
-
-=========== bugs/bug003.go
-bugs/bug003.go:6: switch statement must have case labels
-BUG: fatal error
-
-=========== bugs/bug004.go
-BUG: known to succeed incorrectly
-
 =========== bugs/bug006.go
 zero
  fail
@@ -240,6 +227,14 @@ BUG: known to fail incorrectly
 
 =========== fixedbugs/bug000.go
 
+=========== fixedbugs/bug001.go
+
+=========== fixedbugs/bug002.go
+
+=========== fixedbugs/bug003.go
+
+=========== fixedbugs/bug004.go
+
 =========== fixedbugs/bug005.go
 
 =========== fixedbugs/bug007.go