gdiplus/tests: Use wide-char string literals for file names.

Signed-off-by: Jeff Smith <whydoubt@gmail.com>
Signed-off-by: Esme Povirk <esme@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jeff Smith 2020-12-08 19:40:10 -06:00 committed by Alexandre Julliard
parent de0497df87
commit 796550cc72
3 changed files with 11 additions and 14 deletions

View File

@ -69,7 +69,6 @@ static void _delete_testfontfile(const WCHAR *filename, int line)
static void test_long_name(void)
{
WCHAR path[MAX_PATH];
static const WCHAR path_longname[] = {'w','i','n','e','_','l','o','n','g','n','a','m','e','.','t','t','f',0};
GpStatus stat;
GpFontCollection *fonts;
INT num_families;
@ -80,7 +79,7 @@ static void test_long_name(void)
stat = GdipNewPrivateFontCollection(&fonts);
ok(stat == Ok, "GdipNewPrivateFontCollection failed: %d\n", stat);
create_testfontfile(path_longname, 1, path);
create_testfontfile(L"wine_longname.ttf", 1, path);
stat = GdipPrivateAddFontFile(fonts, path);
ok(stat == Ok, "GdipPrivateAddFontFile failed: %d\n", stat);

View File

@ -417,7 +417,6 @@ static void test_LoadingImages(void)
GpStatus stat;
GpBitmap *bm;
GpImage *img;
static const WCHAR nonexistentW[] = {'n','o','n','e','x','i','s','t','e','n','t',0};
stat = GdipCreateBitmapFromFile(0, 0);
expect(InvalidParameter, stat);
@ -428,7 +427,7 @@ static void test_LoadingImages(void)
ok(bm == (GpBitmap *)0xdeadbeef, "returned %p\n", bm);
bm = (GpBitmap *)0xdeadbeef;
stat = GdipCreateBitmapFromFile(nonexistentW, &bm);
stat = GdipCreateBitmapFromFile(L"nonexistent", &bm);
todo_wine expect(InvalidParameter, stat);
ok(!bm, "returned %p\n", bm);
@ -441,7 +440,7 @@ static void test_LoadingImages(void)
ok(img == (GpImage *)0xdeadbeef, "returned %p\n", img);
img = (GpImage *)0xdeadbeef;
stat = GdipLoadImageFromFile(nonexistentW, &img);
stat = GdipLoadImageFromFile(L"nonexistent", &img);
todo_wine expect(OutOfMemory, stat);
ok(!img, "returned %p\n", img);
@ -454,7 +453,7 @@ static void test_LoadingImages(void)
ok(img == (GpImage *)0xdeadbeef, "returned %p\n", img);
img = (GpImage *)0xdeadbeef;
stat = GdipLoadImageFromFileICM(nonexistentW, &img);
stat = GdipLoadImageFromFileICM(L"nonexistent", &img);
todo_wine expect(OutOfMemory, stat);
ok(!img, "returned %p\n", img);
}
@ -469,7 +468,7 @@ static void test_SavingImages(void)
REAL w, h;
ImageCodecInfo *codecs;
static const CHAR filenameA[] = "a.bmp";
static const WCHAR filename[] = { 'a','.','b','m','p',0 };
static const WCHAR filename[] = L"a.bmp";
codecs = NULL;
@ -536,8 +535,8 @@ static void test_SavingMultiPageTiff(void)
UINT frame_count;
static const CHAR filename1A[] = "1.tif";
static const CHAR filename2A[] = "2.tif";
static const WCHAR filename1[] = { '1','.','t','i','f',0 };
static const WCHAR filename2[] = { '2','.','t','i','f',0 };
static const WCHAR filename1[] = L"1.tif";
static const WCHAR filename2[] = L"2.tif";
static const WCHAR tiff_mimetype[] = { 'i','m','a','g','e','/','t','i','f','f',0 };
params.Count = 1;

View File

@ -2824,7 +2824,6 @@ static void test_fillpath(void)
{
static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0};
static const GpRectF frame = {0.0, 0.0, 100.0, 100.0};
static const WCHAR winetestemfW[] = {'w','i','n','e','t','e','s','t','.','e','m','f',0};
GpMetafile *metafile;
GpGraphics *graphics;
@ -2870,7 +2869,7 @@ static void test_fillpath(void)
check_emfplus(hemf, fill_path_records, "fill path");
/* write to disk */
DeleteEnhMetaFile(CopyEnhMetaFileW(hemf, winetestemfW));
DeleteEnhMetaFile(CopyEnhMetaFileW(hemf, L"winetest.emf"));
DeleteEnhMetaFile(hemf);
@ -2878,15 +2877,15 @@ static void test_fillpath(void)
expect(Ok, stat);
/* should succeed when given path to an EMF */
stat = GdipCreateMetafileFromWmfFile(winetestemfW, NULL, &metafile);
stat = GdipCreateMetafileFromWmfFile(L"winetest.emf", NULL, &metafile);
expect(Ok, stat);
stat = GdipDisposeImage((GpImage*)metafile);
expect(Ok, stat);
DeleteFileW(winetestemfW);
DeleteFileW(L"winetest.emf");
stat = GdipCreateMetafileFromWmfFile(winetestemfW, NULL, &metafile);
stat = GdipCreateMetafileFromWmfFile(L"winetest.emf", NULL, &metafile);
expect(GenericError, stat);
}