From 0ebebfd658e9b29ca6574cd87e6641e17b3edaa9 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Sat, 2 Apr 2016 12:00:09 +1100 Subject: [PATCH] webp: fix tests for webp/nycbcra deprecation. The previous commit (00fe24ef "webp/nycbcra: deprecate package") was incomplete. Change-Id: I6af5e1633b9c291e72b02877b308eae6e5624ef5 Reviewed-on: https://go-review.googlesource.com/21441 Reviewed-by: Nigel Tao --- cmd/webp-manual-test/main.go | 5 ++--- webp/decode_test.go | 6 ++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/cmd/webp-manual-test/main.go b/cmd/webp-manual-test/main.go index 296c763..acb2815 100644 --- a/cmd/webp-manual-test/main.go +++ b/cmd/webp-manual-test/main.go @@ -26,7 +26,6 @@ import ( "strings" "golang.org/x/image/webp" - "golang.org/x/image/webp/nycbcra" ) var ( @@ -161,12 +160,12 @@ func encodePAM(gotImage image.Image) ([]byte, error) { func encodePGM(gotImage image.Image) ([]byte, error) { var ( m *image.YCbCr - ma *nycbcra.Image + ma *image.NYCbCrA ) switch g := gotImage.(type) { case *image.YCbCr: m = g - case *nycbcra.Image: + case *image.NYCbCrA: m = &g.YCbCr ma = g default: diff --git a/webp/decode_test.go b/webp/decode_test.go index 4b69f90..ad65b10 100644 --- a/webp/decode_test.go +++ b/webp/decode_test.go @@ -13,8 +13,6 @@ import ( "os" "strings" "testing" - - "golang.org/x/image/webp/nycbcra" ) // hex is like fmt.Sprintf("% x", x) but also inserts dots every 16 bytes, to @@ -54,11 +52,11 @@ func testDecodeLossy(t *testing.T, tc string, withAlpha bool) { var ( m0 *image.YCbCr - a0 *nycbcra.Image + a0 *image.NYCbCrA ok bool ) if withAlpha { - a0, ok = img0.(*nycbcra.Image) + a0, ok = img0.(*image.NYCbCrA) if ok { m0 = &a0.YCbCr }