From: Rob Pike Date: Mon, 9 Jun 2008 00:19:11 +0000 (-0700) Subject: Fix a few tests X-Git-Tag: weekly.2009-11-06~3723 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e285ed6090989e13d2696c4d57ba89bdc2721ec6;p=gostls13.git Fix a few tests SVN=121614 --- diff --git a/test/char_lit.go b/test/char_lit.go index 7943f164f1..d061f0be4f 100644 --- a/test/char_lit.go +++ b/test/char_lit.go @@ -6,30 +6,37 @@ package main -func main() { - []int( - ' ', - 'a', - 'ä', - '本', - '\a', - '\b', - '\f', - '\n', - '\r', - '\t', - '\v', - '\\', - '\'', - '\"', - '\000', - '\123', - '\x00', - '\xca', - '\xFE', - '\u0123', - '\ubabe', - '\U0123ABCD', +func main() int { + var i uint64 = + ' ' + + 'a' + + 'ä' + + '本' + + '\a' + + '\b' + + '\f' + + '\n' + + '\r' + + '\t' + + '\v' + + '\\' + + '\'' + + '\000' + + '\123' + + '\x00' + + '\xca' + + '\xFE' + + '\u0123' + + '\ubabe' + + '\U0123ABCD' + '\Ucafebabe' - ); + ; + if '\Ucafebabe' != 0xcafebabe { + print "cafebabe wrong\n"; + return 1; + } + if i != 0xcc238de1 { + print "number is ", i, " should be ", 0xcc238de1, "\n"; + return 1; + } } diff --git a/test/bugs/bug024.go b/test/fixedbugs/bug024.go similarity index 100% rename from test/bugs/bug024.go rename to test/fixedbugs/bug024.go diff --git a/test/golden.out b/test/golden.out index 9b3db19747..2c5cbc697e 100644 --- a/test/golden.out +++ b/test/golden.out @@ -1,9 +1,5 @@ =========== ./char_lit.go -char_lit.go:5: syntax error -char_lit.go:17: unknown escape sequence: \ -char_lit.go:19: unknown escape sequence: " -BUG: known to fail incorrectly =========== ./float_lit.go float_lit.go:5: syntax error @@ -39,8 +35,6 @@ hello, world BUG: known to succeed incorrectly =========== ./int_lit.go -int_lit.go:5: syntax error -BUG: known to fail incorrectly =========== ./iota.go @@ -52,8 +46,8 @@ BUG: known to fail incorrectly =========== ./string_lit.go string_lit.go:5: syntax error -string_lit.go:12: unknown escape sequence: \ -BUG: known to fail incorrectly +string_lit.go:12: unknown escape sequence: \ +BUG: known to fail incorrectly =========== ./switch.go @@ -205,10 +199,6 @@ BUG: known to fail incorrectly bugs/bug023.go:20: fatal error: naddr: const I{110(<_t117>{},<_o119>{},{});} BUG: known to fail incorrectly -=========== bugs/bug024.go -bugs/bug024.go:8: unknown escape sequence: \ -BUG: erroneous errors but compiles anyway - =========== bugs/bug025.go bugs/bug025.go:7: fatal error: dumpexportvar: oname nil: Foo @@ -301,4 +291,6 @@ fixedbugs/bug007.go:7: addtyp: renaming Point/{FLOAT32;