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:
parent
de0497df87
commit
796550cc72
|
@ -69,7 +69,6 @@ static void _delete_testfontfile(const WCHAR *filename, int line)
|
||||||
static void test_long_name(void)
|
static void test_long_name(void)
|
||||||
{
|
{
|
||||||
WCHAR path[MAX_PATH];
|
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;
|
GpStatus stat;
|
||||||
GpFontCollection *fonts;
|
GpFontCollection *fonts;
|
||||||
INT num_families;
|
INT num_families;
|
||||||
|
@ -80,7 +79,7 @@ static void test_long_name(void)
|
||||||
stat = GdipNewPrivateFontCollection(&fonts);
|
stat = GdipNewPrivateFontCollection(&fonts);
|
||||||
ok(stat == Ok, "GdipNewPrivateFontCollection failed: %d\n", stat);
|
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);
|
stat = GdipPrivateAddFontFile(fonts, path);
|
||||||
ok(stat == Ok, "GdipPrivateAddFontFile failed: %d\n", stat);
|
ok(stat == Ok, "GdipPrivateAddFontFile failed: %d\n", stat);
|
||||||
|
|
|
@ -417,7 +417,6 @@ static void test_LoadingImages(void)
|
||||||
GpStatus stat;
|
GpStatus stat;
|
||||||
GpBitmap *bm;
|
GpBitmap *bm;
|
||||||
GpImage *img;
|
GpImage *img;
|
||||||
static const WCHAR nonexistentW[] = {'n','o','n','e','x','i','s','t','e','n','t',0};
|
|
||||||
|
|
||||||
stat = GdipCreateBitmapFromFile(0, 0);
|
stat = GdipCreateBitmapFromFile(0, 0);
|
||||||
expect(InvalidParameter, stat);
|
expect(InvalidParameter, stat);
|
||||||
|
@ -428,7 +427,7 @@ static void test_LoadingImages(void)
|
||||||
ok(bm == (GpBitmap *)0xdeadbeef, "returned %p\n", bm);
|
ok(bm == (GpBitmap *)0xdeadbeef, "returned %p\n", bm);
|
||||||
|
|
||||||
bm = (GpBitmap *)0xdeadbeef;
|
bm = (GpBitmap *)0xdeadbeef;
|
||||||
stat = GdipCreateBitmapFromFile(nonexistentW, &bm);
|
stat = GdipCreateBitmapFromFile(L"nonexistent", &bm);
|
||||||
todo_wine expect(InvalidParameter, stat);
|
todo_wine expect(InvalidParameter, stat);
|
||||||
ok(!bm, "returned %p\n", bm);
|
ok(!bm, "returned %p\n", bm);
|
||||||
|
|
||||||
|
@ -441,7 +440,7 @@ static void test_LoadingImages(void)
|
||||||
ok(img == (GpImage *)0xdeadbeef, "returned %p\n", img);
|
ok(img == (GpImage *)0xdeadbeef, "returned %p\n", img);
|
||||||
|
|
||||||
img = (GpImage *)0xdeadbeef;
|
img = (GpImage *)0xdeadbeef;
|
||||||
stat = GdipLoadImageFromFile(nonexistentW, &img);
|
stat = GdipLoadImageFromFile(L"nonexistent", &img);
|
||||||
todo_wine expect(OutOfMemory, stat);
|
todo_wine expect(OutOfMemory, stat);
|
||||||
ok(!img, "returned %p\n", img);
|
ok(!img, "returned %p\n", img);
|
||||||
|
|
||||||
|
@ -454,7 +453,7 @@ static void test_LoadingImages(void)
|
||||||
ok(img == (GpImage *)0xdeadbeef, "returned %p\n", img);
|
ok(img == (GpImage *)0xdeadbeef, "returned %p\n", img);
|
||||||
|
|
||||||
img = (GpImage *)0xdeadbeef;
|
img = (GpImage *)0xdeadbeef;
|
||||||
stat = GdipLoadImageFromFileICM(nonexistentW, &img);
|
stat = GdipLoadImageFromFileICM(L"nonexistent", &img);
|
||||||
todo_wine expect(OutOfMemory, stat);
|
todo_wine expect(OutOfMemory, stat);
|
||||||
ok(!img, "returned %p\n", img);
|
ok(!img, "returned %p\n", img);
|
||||||
}
|
}
|
||||||
|
@ -469,7 +468,7 @@ static void test_SavingImages(void)
|
||||||
REAL w, h;
|
REAL w, h;
|
||||||
ImageCodecInfo *codecs;
|
ImageCodecInfo *codecs;
|
||||||
static const CHAR filenameA[] = "a.bmp";
|
static const CHAR filenameA[] = "a.bmp";
|
||||||
static const WCHAR filename[] = { 'a','.','b','m','p',0 };
|
static const WCHAR filename[] = L"a.bmp";
|
||||||
|
|
||||||
codecs = NULL;
|
codecs = NULL;
|
||||||
|
|
||||||
|
@ -536,8 +535,8 @@ static void test_SavingMultiPageTiff(void)
|
||||||
UINT frame_count;
|
UINT frame_count;
|
||||||
static const CHAR filename1A[] = "1.tif";
|
static const CHAR filename1A[] = "1.tif";
|
||||||
static const CHAR filename2A[] = "2.tif";
|
static const CHAR filename2A[] = "2.tif";
|
||||||
static const WCHAR filename1[] = { '1','.','t','i','f',0 };
|
static const WCHAR filename1[] = L"1.tif";
|
||||||
static const WCHAR filename2[] = { '2','.','t','i','f',0 };
|
static const WCHAR filename2[] = L"2.tif";
|
||||||
static const WCHAR tiff_mimetype[] = { 'i','m','a','g','e','/','t','i','f','f',0 };
|
static const WCHAR tiff_mimetype[] = { 'i','m','a','g','e','/','t','i','f','f',0 };
|
||||||
|
|
||||||
params.Count = 1;
|
params.Count = 1;
|
||||||
|
|
|
@ -2824,7 +2824,6 @@ static void test_fillpath(void)
|
||||||
{
|
{
|
||||||
static const WCHAR description[] = {'w','i','n','e','t','e','s','t',0};
|
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 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;
|
GpMetafile *metafile;
|
||||||
GpGraphics *graphics;
|
GpGraphics *graphics;
|
||||||
|
@ -2870,7 +2869,7 @@ static void test_fillpath(void)
|
||||||
check_emfplus(hemf, fill_path_records, "fill path");
|
check_emfplus(hemf, fill_path_records, "fill path");
|
||||||
|
|
||||||
/* write to disk */
|
/* write to disk */
|
||||||
DeleteEnhMetaFile(CopyEnhMetaFileW(hemf, winetestemfW));
|
DeleteEnhMetaFile(CopyEnhMetaFileW(hemf, L"winetest.emf"));
|
||||||
|
|
||||||
DeleteEnhMetaFile(hemf);
|
DeleteEnhMetaFile(hemf);
|
||||||
|
|
||||||
|
@ -2878,15 +2877,15 @@ static void test_fillpath(void)
|
||||||
expect(Ok, stat);
|
expect(Ok, stat);
|
||||||
|
|
||||||
/* should succeed when given path to an EMF */
|
/* should succeed when given path to an EMF */
|
||||||
stat = GdipCreateMetafileFromWmfFile(winetestemfW, NULL, &metafile);
|
stat = GdipCreateMetafileFromWmfFile(L"winetest.emf", NULL, &metafile);
|
||||||
expect(Ok, stat);
|
expect(Ok, stat);
|
||||||
|
|
||||||
stat = GdipDisposeImage((GpImage*)metafile);
|
stat = GdipDisposeImage((GpImage*)metafile);
|
||||||
expect(Ok, stat);
|
expect(Ok, stat);
|
||||||
|
|
||||||
DeleteFileW(winetestemfW);
|
DeleteFileW(L"winetest.emf");
|
||||||
|
|
||||||
stat = GdipCreateMetafileFromWmfFile(winetestemfW, NULL, &metafile);
|
stat = GdipCreateMetafileFromWmfFile(L"winetest.emf", NULL, &metafile);
|
||||||
expect(GenericError, stat);
|
expect(GenericError, stat);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue