user/tests: Update LoadImage test.

Include a bitmap in the resources and don't depend on Windows'
OBM_CHECK bitmap anymore.
This commit is contained in:
Michael Kaufmann 2006-06-07 14:03:22 +02:00 committed by Alexandre Julliard
parent b5bff92a0c
commit ea5d55bf4c
4 changed files with 28 additions and 8 deletions

View File

@ -14,6 +14,7 @@ msg.ok
resource.ok resource.ok
resource.res resource.res
sysparams.ok sysparams.ok
test_mono.bmp
testlist.c testlist.c
text.ok text.ok
win.ok win.ok

View File

@ -27,6 +27,10 @@ CTESTS = \
RC_SRCS = resource.rc RC_SRCS = resource.rc
RC_BINSRC = resource.rc
RC_BINARIES = \
test_mono.bmp
@MAKE_TEST_RULES@ @MAKE_TEST_RULES@
### Dependencies: ### Dependencies:

View File

@ -283,17 +283,22 @@ static void test_PrivateExtractIcons(void) {
ok(cIcons == 4, "Three icons requested, four expected, got cIcons=%d\n", cIcons); 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; HBITMAP bmp;
HRSRC hres;
bmp = LoadBitmapA(NULL, MAKEINTRESOURCE(OBM_CHECK));
ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n"); bmp = LoadBitmapA(GetModuleHandle(NULL), MAKEINTRESOURCE(100));
ok(bmp != NULL, "Could not load a bitmap resource\n");
if (bmp) DeleteObject(bmp); if (bmp) DeleteObject(bmp);
bmp = LoadBitmapA(NULL, "#32760"); /* Value of OBM_CHECK */ hres = FindResource(GetModuleHandle(NULL), "#100", RT_BITMAP);
ok(bmp != NULL, "Could not load the OBM_CHECK bitmap\n"); 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); if (bmp) DeleteObject(bmp);
} }
START_TEST(resource) START_TEST(resource)
{ {

View File

@ -77,3 +77,13 @@ FONT 8, "MS Shell Dlg"
{ {
EDITTEXT 200,4,4,50,14 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'
} */