diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-02-10 06:02:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-02-10 06:02:38 +0000 |
commit | d54fc074734ea7467a0861c861b145c8ef740bf4 (patch) | |
tree | fe1dad02b57206be8eeb4f61819b2f677ea99ee4 /libgo/go/image | |
parent | 8e29a61c2dc3d591cba39c4f4e8933a76493b22f (diff) |
compiler, libgo: Permit testing package when test imports it circularly.
From-SVN: r195931
Diffstat (limited to 'libgo/go/image')
-rw-r--r-- | libgo/go/image/image_test.go | 13 | ||||
-rw-r--r-- | libgo/go/image/ycbcr_test.go | 3 |
2 files changed, 7 insertions, 9 deletions
diff --git a/libgo/go/image/image_test.go b/libgo/go/image/image_test.go index 2656757ae9e..799c1a7a11d 100644 --- a/libgo/go/image/image_test.go +++ b/libgo/go/image/image_test.go @@ -2,15 +2,14 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package image_test +package image import ( - . "image" "image/color" "testing" ) -type timage interface { +type image interface { Image Opaque() bool Set(int, int, color.Color) @@ -24,7 +23,7 @@ func cmp(t *testing.T, cm color.Model, c0, c1 color.Color) bool { } func TestImage(t *testing.T) { - testImage := []timage{ + testImage := []image{ NewRGBA(Rect(0, 0, 10, 10)), NewRGBA64(Rect(0, 0, 10, 10)), NewNRGBA(Rect(0, 0, 10, 10)), @@ -52,11 +51,11 @@ func TestImage(t *testing.T) { t.Errorf("%T: at (6, 3), want a non-zero color, got %v", m, m.At(6, 3)) continue } - if !m.SubImage(Rect(6, 3, 7, 4)).(timage).Opaque() { + if !m.SubImage(Rect(6, 3, 7, 4)).(image).Opaque() { t.Errorf("%T: at (6, 3) was not opaque", m) continue } - m = m.SubImage(Rect(3, 2, 9, 8)).(timage) + m = m.SubImage(Rect(3, 2, 9, 8)).(image) if !Rect(3, 2, 9, 8).Eq(m.Bounds()) { t.Errorf("%T: sub-image want bounds %v, got %v", m, Rect(3, 2, 9, 8), m.Bounds()) continue @@ -97,7 +96,7 @@ func Test16BitsPerColorChannel(t *testing.T) { continue } } - testImage := []timage{ + testImage := []image{ NewRGBA64(Rect(0, 0, 10, 10)), NewNRGBA64(Rect(0, 0, 10, 10)), NewAlpha16(Rect(0, 0, 10, 10)), diff --git a/libgo/go/image/ycbcr_test.go b/libgo/go/image/ycbcr_test.go index 7d1043dd395..a5f4482654f 100644 --- a/libgo/go/image/ycbcr_test.go +++ b/libgo/go/image/ycbcr_test.go @@ -2,10 +2,9 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package image_test +package image import ( - . "image" "image/color" "testing" ) |