Module: wine Branch: master Commit: dbdec221d151e66f8ee3790f5862a0bf64d36c7e URL: http://source.winehq.org/git/wine.git/?a=commit;h=dbdec221d151e66f8ee3790f58...
Author: Ludger Sprenker ludger@sprenker.net Date: Fri Jan 4 20:21:18 2013 +0100
windowscodecs: Test conversions of the 24bpp PixelFormats.
---
dlls/windowscodecs/tests/converter.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/dlls/windowscodecs/tests/converter.c b/dlls/windowscodecs/tests/converter.c index de44709..89d3b49 100644 --- a/dlls/windowscodecs/tests/converter.c +++ b/dlls/windowscodecs/tests/converter.c @@ -277,6 +277,12 @@ static const BYTE bits_24bppBGR[] = { static const struct bitmap_data testdata_24bppBGR = { &GUID_WICPixelFormat24bppBGR, 24, bits_24bppBGR, 4, 2, 96.0, 96.0};
+static const BYTE bits_24bppRGB[] = { + 0,0,255, 0,255,0, 255,0,0, 0,0,0, + 255,255,0, 255,0,255, 0,255,255, 255,255,255}; +static const struct bitmap_data testdata_24bppRGB = { + &GUID_WICPixelFormat24bppRGB, 24, bits_24bppRGB, 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}; @@ -499,6 +505,16 @@ START_TEST(converter) test_conversion(&testdata_32bppBGRA, &testdata_32bppBGR, "BGRA -> BGR", 0); test_conversion(&testdata_32bppBGR, &testdata_32bppBGRA, "BGR -> BGRA", 0); test_conversion(&testdata_32bppBGRA, &testdata_32bppBGRA, "BGRA -> BGRA", 0); + + test_conversion(&testdata_24bppBGR, &testdata_24bppBGR, "24bppBGR -> 24bppBGR", 0); + test_conversion(&testdata_24bppBGR, &testdata_24bppRGB, "24bppBGR -> 24bppRGB", 0); + + test_conversion(&testdata_24bppRGB, &testdata_24bppRGB, "24bppRGB -> 24bppRGB", 0); + test_conversion(&testdata_24bppRGB, &testdata_24bppBGR, "24bppRGB -> 24bppBGR", 0); + + test_conversion(&testdata_32bppBGR, &testdata_24bppRGB, "32bppBGR -> 24bppRGB", 0); + test_conversion(&testdata_24bppRGB, &testdata_32bppBGR, "24bppRGB -> 32bppBGR", 0); + test_invalid_conversion(); test_default_converter();