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/
Right Patch Set: diff -r 7b7b7ef3e147 https://go.googlecode.com/hg/
Use n/p to move between diff chunks;
N/P to move between comments.
Please Sign in to add in-line comments.
Jump to:
src/pkg/image/tiff/reader.go
src/pkg/image/tiff/reader_test.go
src/pkg/image/tiff/testdata/no_rps.tiff
LEFT RIGHT
(no file at all) 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 package tiff
6
7 import (
8 "os"
9 "testing"
10 )
11
12 // TestNoRPS tries to decode an image that has no RowsPerStrip tag.
13 // The tag is mandatory according to the spec but some software omits
14 // it in the case of a single strip.
15 func TestNoRPS(t *testing.T) {
16 f, err := os.Open("testdata/no_rps.tiff")
17 if err != nil {
18 t.Fatal(err)
19 }
20 defer f.Close()
21 _, err = Decode(f)
22 if err != nil {
23 t.Fatal(err)
24 }
25 }
LEFT RIGHT