gdiplus/tests: Fix two test failures on Win98.
This commit is contained in:
parent
4f65338a05
commit
b7219295cc
|
@ -229,6 +229,7 @@ static void test_SavingImages(void)
|
||||||
const REAL WIDTH = 10.0, HEIGHT = 20.0;
|
const REAL WIDTH = 10.0, HEIGHT = 20.0;
|
||||||
REAL w, h;
|
REAL w, h;
|
||||||
ImageCodecInfo *codecs;
|
ImageCodecInfo *codecs;
|
||||||
|
static const CHAR filenameA[] = "a.bmp";
|
||||||
static const WCHAR filename[] = { 'a','.','b','m','p',0 };
|
static const WCHAR filename[] = { 'a','.','b','m','p',0 };
|
||||||
|
|
||||||
codecs = NULL;
|
codecs = NULL;
|
||||||
|
@ -280,7 +281,7 @@ static void test_SavingImages(void)
|
||||||
GdipFree(codecs);
|
GdipFree(codecs);
|
||||||
if (bm)
|
if (bm)
|
||||||
GdipDisposeImage((GpImage*)bm);
|
GdipDisposeImage((GpImage*)bm);
|
||||||
ok(DeleteFileW(filename), "Delete failed.\n");
|
ok(DeleteFileA(filenameA), "Delete failed.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void test_encoders(void)
|
static void test_encoders(void)
|
||||||
|
@ -292,7 +293,7 @@ static void test_encoders(void)
|
||||||
int i;
|
int i;
|
||||||
int bmp_found;
|
int bmp_found;
|
||||||
|
|
||||||
static const WCHAR bmp_format[] = {'B', 'M', 'P', 0};
|
static const CHAR bmp_format[] = "BMP";
|
||||||
|
|
||||||
stat = GdipGetImageEncodersSize(&n, &s);
|
stat = GdipGetImageEncodersSize(&n, &s);
|
||||||
expect(stat, Ok);
|
expect(stat, Ok);
|
||||||
|
@ -319,8 +320,13 @@ static void test_encoders(void)
|
||||||
bmp_found = FALSE;
|
bmp_found = FALSE;
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
{
|
{
|
||||||
if (CompareStringW(LOCALE_SYSTEM_DEFAULT, 0,
|
CHAR desc[32];
|
||||||
codecs[i].FormatDescription, -1,
|
|
||||||
|
WideCharToMultiByte(CP_ACP, 0, codecs[i].FormatDescription, -1,
|
||||||
|
desc, 32, 0, 0);
|
||||||
|
|
||||||
|
if (CompareStringA(LOCALE_SYSTEM_DEFAULT, 0,
|
||||||
|
desc, -1,
|
||||||
bmp_format, -1) == CSTR_EQUAL) {
|
bmp_format, -1) == CSTR_EQUAL) {
|
||||||
bmp_found = TRUE;
|
bmp_found = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue