summaryrefslogtreecommitdiff
path: root/src/pkg/compress/zlib/reader_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2009-10-06 14:55:39 -0700
committerRuss Cox <rsc@golang.org>2009-10-06 14:55:39 -0700
commitd2c438c32027a1bcaa2a20e7626495fedcef804a (patch)
treed4e306848aa66193a42b8531963e246bdb4ed364 /src/pkg/compress/zlib/reader_test.go
parenta7bf4bfaf01a627bbb1be972608820be08e80512 (diff)
downloadgolang-d2c438c32027a1bcaa2a20e7626495fedcef804a.tar.gz
another round of gofmt applications
R=gri DELTA=900 (106 added, 31 deleted, 763 changed) OCL=35384 CL=35396
Diffstat (limited to 'src/pkg/compress/zlib/reader_test.go')
-rw-r--r--src/pkg/compress/zlib/reader_test.go48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/pkg/compress/zlib/reader_test.go b/src/pkg/compress/zlib/reader_test.go
index 96a81114f..075ecf62b 100644
--- a/src/pkg/compress/zlib/reader_test.go
+++ b/src/pkg/compress/zlib/reader_test.go
@@ -12,62 +12,54 @@ import (
)
type zlibTest struct {
- desc string;
- raw string;
- compressed []byte;
- err os.Error;
+ desc string;
+ raw string;
+ compressed []byte;
+ err os.Error;
}
// Compare-to-golden test data was generated by the ZLIB example program at
// http://www.zlib.net/zpipe.c
-var zlibTests = []zlibTest {
- zlibTest {
+var zlibTests = []zlibTest{
+ zlibTest{
"empty",
"",
- []byte {
- 0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01,
- },
- nil
+ []byte{0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01},
+ nil,
},
- zlibTest {
+ zlibTest{
"goodbye",
"goodbye, world",
- []byte {
+ []byte{
0x78, 0x9c, 0x4b, 0xcf, 0xcf, 0x4f, 0x49, 0xaa,
0x4c, 0xd5, 0x51, 0x28, 0xcf, 0x2f, 0xca, 0x49,
0x01, 0x00, 0x28, 0xa5, 0x05, 0x5e,
},
- nil
+ nil,
},
- zlibTest {
+ zlibTest{
"bad header",
"",
- []byte {
- 0x78, 0x9f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01,
- },
- HeaderError
+ []byte{0x78, 0x9f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01},
+ HeaderError,
},
- zlibTest {
+ zlibTest{
"bad checksum",
"",
- []byte {
- 0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff,
- },
+ []byte{0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff},
ChecksumError,
},
- zlibTest {
+ zlibTest{
"not enough data",
"",
- []byte {
- 0x78, 0x9c, 0x03, 0x00, 0x00, 0x00,
- },
+ []byte{0x78, 0x9c, 0x03, 0x00, 0x00, 0x00},
io.ErrUnexpectedEOF,
},
- zlibTest {
+ zlibTest{
"excess data is silently ignored",
"",
- []byte {
+ []byte{
0x78, 0x9c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01,
0x78, 0x9c, 0xff,
},