Vincent Povirk : windowscodecs: Add test for PNG encoder.

Alexandre Julliard julliard at winehq.org
Fri Oct 9 09:24:17 CDT 2009


Module: wine
Branch: master
Commit: d80630e8c9e6f32ba3ce9bdbb5745c818d1c671c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d80630e8c9e6f32ba3ce9bdbb5745c818d1c671c

Author: Vincent Povirk <vincent at codeweavers.com>
Date:   Wed Sep 23 13:46:06 2009 -0500

windowscodecs: Add test for PNG encoder.

---

 dlls/windowscodecs/tests/converter.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c
index 680c350..3f82369 100644
--- a/dlls/windowscodecs/tests/converter.c
+++ b/dlls/windowscodecs/tests/converter.c
@@ -236,6 +236,12 @@ static void compare_bitmap_data(const struct bitmap_data *expect, IWICBitmapSour
     HeapFree(GetProcessHeap(), 0, converted_bits);
 }
 
+static const BYTE bits_24bppBGR[] = {
+    255,0,0, 0,255,0, 0,0,255, 0,0,0,
+    0,255,255, 255,0,255, 255,255,0, 255,255,255};
+static const struct bitmap_data testdata_24bppBGR = {
+    &GUID_WICPixelFormat24bppBGR, 24, bits_24bppBGR, 4, 2, 96.0, 96.0};
+
 static const BYTE bits_32bppBGR[] = {
     255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80,
     0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80};
@@ -425,5 +431,8 @@ START_TEST(converter)
     test_encoder(&testdata_32bppBGR, &CLSID_WICBmpEncoder,
                  &testdata_32bppBGR, &CLSID_WICBmpDecoder, "BMP encoder 32bppBGR");
 
+    test_encoder(&testdata_24bppBGR, &CLSID_WICPngEncoder,
+                 &testdata_24bppBGR, &CLSID_WICPngDecoder, "PNG encoder 24bppBGR");
+
     CoUninitialize();
 }




More information about the wine-cvs mailing list