From d2c438c32027a1bcaa2a20e7626495fedcef804a Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Tue, 6 Oct 2009 14:55:39 -0700 Subject: another round of gofmt applications R=gri DELTA=900 (106 added, 31 deleted, 763 changed) OCL=35384 CL=35396 --- src/pkg/compress/zlib/reader_test.go | 48 +++++++++++++++--------------------- 1 file changed, 20 insertions(+), 28 deletions(-) (limited to 'src/pkg/compress/zlib/reader_test.go') 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, }, -- cgit v1.2.3