Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(12)

Delta Between Two Patch Sets: src/pkg/image/tiff/reader_test.go

Issue 4815061: code review 4815061: image/tiff: Do not panic when RowsPerStrip is missing. (Closed)
Left Patch Set: diff -r 7b7b7ef3e147 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Right Patch Set: diff -r 7b7b7ef3e147 https://go.googlecode.com/hg/ Created 13 years, 7 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/image/tiff/reader.go ('k') | src/pkg/image/tiff/testdata/no_rps.tiff » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 package tiff 5 package tiff
6 6
7 import ( 7 import (
8 "os" 8 "os"
9 "testing" 9 "testing"
10 ) 10 )
11 11
12 // This test tries to decode an image that has no RowsPerStrip tag. 12 // TestNoRPS tries to decode an image that has no RowsPerStrip tag.
nigeltao 2011/07/27 02:22:07 s/This test/TestNoRPS/.
bsiegert 2011/07/27 18:55:12 Done.
13 // The tag is mandatory according to the spec but some software omits 13 // The tag is mandatory according to the spec but some software omits
14 // it in the case of a single strip. 14 // it in the case of a single strip.
15 func TestNoRPS(t *testing.T) { 15 func TestNoRPS(t *testing.T) {
16 » f, err := os.Open("testdata/rps0.tiff") 16 » f, err := os.Open("testdata/no_rps.tiff")
nigeltao 2011/07/27 02:22:07 If the func is called TestNoRPS, then call the tes
bsiegert 2011/07/27 18:55:12 Done.
17 if err != nil { 17 if err != nil {
18 » » t.Errorf(err.String()) 18 » » t.Fatal(err)
nigeltao 2011/07/27 02:22:07 t.Error(err) return Same below.
bsiegert 2011/07/27 18:55:12 Done; I used t.Fatal(err) instead.
19 } 19 }
20 defer f.Close() 20 defer f.Close()
21 _, err = Decode(f) 21 _, err = Decode(f)
22 if err != nil { 22 if err != nil {
23 » » t.Errorf(err.String()) 23 » » t.Fatal(err)
24 } 24 }
25 } 25 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b