Zebediah Figura : gdi32/tests: Test writing to the default palette.

Alexandre Julliard julliard at winehq.org
Fri Jun 22 18:32:37 CDT 2018


Module: wine
Branch: master
Commit: 7527ab493ea123ba1594fb680304121968eab0d6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7527ab493ea123ba1594fb680304121968eab0d6

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Jun 21 08:57:07 2018 -0500

gdi32/tests: Test writing to the default palette.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gdi32/tests/palette.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dlls/gdi32/tests/palette.c b/dlls/gdi32/tests/palette.c
index 045f530..0043f55 100644
--- a/dlls/gdi32/tests/palette.c
+++ b/dlls/gdi32/tests/palette.c
@@ -142,6 +142,15 @@ static void test_palette_entries(void)
     ok(res == 1, "GetPaletteEntries should have returned 1 but returned %d\n", res);
 
     ok( palEntry.peFlags == getEntryResult.peFlags, "palEntry.peFlags (%#x) != getEntryResult.peFlags (%#x)\n", palEntry.peFlags, getEntryResult.peFlags );
+
+    /* Try setting the system palette */
+    hpal = GetStockObject(DEFAULT_PALETTE);
+    res = SetPaletteEntries(hpal, 0, 1, &palEntry);
+    ok(!res, "SetPaletteEntries() should have failed\n");
+
+    res = GetPaletteEntries(hpal, 0, 1, &getEntryResult);
+    ok(res == 1, "GetPaletteEntries should have returned 1 but returned %d\n", res);
+    ok(memcmp(&palEntry, &getEntryResult, sizeof(PALETTEENTRY)), "entries should not match\n");
 }
 
 static void test_halftone_palette(void)




More information about the wine-cvs mailing list