Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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 } |
LEFT | RIGHT |