Tests: Update LoadImage test
Michael Kaufmann
hallo at michael-kaufmann.ch
Wed Jun 7 07:03:22 CDT 2006
Changelog:
- Include a bitmap in the resources and don't depend on Windows'
OBM_CHECK bitmap anymore
-------------- next part --------------
Index: dlls/user/tests/Makefile.in
===================================================================
RCS file: /home/wine/wine/dlls/user/tests/Makefile.in,v
retrieving revision 1.17
diff -u -r1.17 Makefile.in
--- dlls/user/tests/Makefile.in 28 Sep 2005 10:17:13 -0000 1.17
+++ dlls/user/tests/Makefile.in 6 Jun 2006 19:33:17 -0000
@@ -27,6 +27,10 @@
RC_SRCS = resource.rc
+RC_BINSRC = resource.rc
+RC_BINARIES = \
+ test_mono.bmp
+
@MAKE_TEST_RULES@
### Dependencies:
Index: dlls/user/tests/resource.c
===================================================================
RCS file: /home/wine/wine/dlls/user/tests/resource.c,v
retrieving revision 1.9
diff -u -r1.9 resource.c
--- dlls/user/tests/resource.c 23 May 2006 12:48:49 -0000 1.9
+++ dlls/user/tests/resource.c 6 Jun 2006 19:33:18 -0000
@@ -283,17 +283,22 @@
ok(cIcons == 4, "Three icons requested, four expected, got cIcons=%d\n", cIcons);
}
-static void test_LoadImage(void) {
+static void test_LoadImage(void)
+{
HBITMAP bmp;
-
- bmp = LoadBitmapA(NULL, MAKEINTRESOURCE(OBM_CHECK));
- ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n");
+ HRSRC hres;
+
+ bmp = LoadBitmapA(GetModuleHandle(NULL), MAKEINTRESOURCE(100));
+ ok(bmp != NULL, "Could not load a bitmap resource\n");
if (bmp) DeleteObject(bmp);
-
- bmp = LoadBitmapA(NULL, "#32760"); /* Value of OBM_CHECK */
- ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n");
+
+ hres = FindResource(GetModuleHandle(NULL), "#100", RT_BITMAP);
+ ok(hres != NULL, "Could not find a bitmap resource with a numeric string\n");
+
+ bmp = LoadBitmapA(GetModuleHandle(NULL), "#100");
+ ok(bmp != NULL, "Could not load a bitmap resource with a numeric string\n");
if (bmp) DeleteObject(bmp);
-}
+}
START_TEST(resource)
{
Index: dlls/user/tests/resource.rc
===================================================================
RCS file: /home/wine/wine/dlls/user/tests/resource.rc,v
retrieving revision 1.9
diff -u -r1.9 resource.rc
--- dlls/user/tests/resource.rc 23 May 2006 12:48:49 -0000 1.9
+++ dlls/user/tests/resource.rc 6 Jun 2006 19:33:18 -0000
@@ -77,3 +77,13 @@
{
EDITTEXT 200,4,4,50,14
}
+
+/* BINRES test_mono.bmp */
+100 BITMAP test_mono.bmp
+/* {
+ '42 4D 42 00 00 00 00 00 00 00 3E 00 00 00 28 00'
+ '00 00 02 00 00 00 01 00 00 00 01 00 01 00 00 00'
+ '00 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00'
+ '00 00 00 00 00 00 00 00 00 00 FF FF FF 00 40 00'
+ '00 00'
+} */
More information about the wine-patches
mailing list