diff options
author | Robert Griesemer <gri@golang.org> | 2009-12-15 15:33:31 -0800 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2009-12-15 15:33:31 -0800 |
commit | d9527dd16f72598b54a64550607bf892efa12384 (patch) | |
tree | 2ad16a7db2d3c484b47426ad2568359ab633820c /src/pkg/compress/flate/flate_test.go | |
parent | aea97e0bd7da9cef1cc631ddbd3578a0877a4fcc (diff) | |
download | golang-d9527dd16f72598b54a64550607bf892efa12384.tar.gz |
1) Change default gofmt default settings for
parsing and printing to new syntax.
Use -oldparser to parse the old syntax,
use -oldprinter to print the old syntax.
2) Change default gofmt formatting settings
to use tabs for indentation only and to use
spaces for alignment. This will make the code
alignment insensitive to an editor's tabwidth.
Use -spaces=false to use tabs for alignment.
3) Manually changed src/exp/parser/parser_test.go
so that it doesn't try to parse the parser's
source files using the old syntax (they have
new syntax now).
4) gofmt -w src misc test/bench
1st set of files.
R=rsc
CC=agl, golang-dev, iant, ken2, r
http://codereview.appspot.com/180047
Diffstat (limited to 'src/pkg/compress/flate/flate_test.go')
-rw-r--r-- | src/pkg/compress/flate/flate_test.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/pkg/compress/flate/flate_test.go b/src/pkg/compress/flate/flate_test.go index e2a97b368..d7a9a3d24 100644 --- a/src/pkg/compress/flate/flate_test.go +++ b/src/pkg/compress/flate/flate_test.go @@ -9,9 +9,9 @@ package flate import ( - "bytes"; - "reflect"; - "testing"; + "bytes" + "reflect" + "testing" ) // The Huffman code lengths used by the fixed-format Huffman blocks. @@ -45,9 +45,9 @@ var fixedHuffmanBits = [...]int{ } type InitDecoderTest struct { - in []int; - out huffmanDecoder; - ok bool; + in []int + out huffmanDecoder + ok bool } var initDecoderTests = []*InitDecoderTest{ @@ -115,10 +115,10 @@ var initDecoderTests = []*InitDecoderTest{ func TestInitDecoder(t *testing.T) { for i, tt := range initDecoderTests { - var h huffmanDecoder; + var h huffmanDecoder if h.init(tt.in) != tt.ok { - t.Errorf("test %d: init = %v", i, !tt.ok); - continue; + t.Errorf("test %d: init = %v", i, !tt.ok) + continue } if !reflect.DeepEqual(&h, &tt.out) { t.Errorf("test %d:\nhave %v\nwant %v", i, h, tt.out) @@ -127,9 +127,9 @@ func TestInitDecoder(t *testing.T) { } func TestUncompressedSource(t *testing.T) { - decoder := NewInflater(bytes.NewBuffer([]byte{0x01, 0x01, 0x00, 0xfe, 0xff, 0x11})); - output := make([]byte, 1); - n, error := decoder.Read(output); + decoder := NewInflater(bytes.NewBuffer([]byte{0x01, 0x01, 0x00, 0xfe, 0xff, 0x11})) + output := make([]byte, 1) + n, error := decoder.Read(output) if n != 1 || error != nil { t.Fatalf("decoder.Read() = %d, %v, want 1, nil", n, error) } |