Commit f6a0c606 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

gdi32/tests: Use wide-char string literals.

parent cdaa72c7
......@@ -32,7 +32,7 @@
#include "wine/test.h"
static const WCHAR display1W[] = {'\\','\\','.','\\','D','I','S','P','L','A','Y','1',0};
static const WCHAR display1W[] = L"\\\\.\\DISPLAY1";
static NTSTATUS (WINAPI *pD3DKMTCheckOcclusion)(const D3DKMT_CHECKOCCLUSION *);
static NTSTATUS (WINAPI *pD3DKMTCheckVidPnExclusiveOwnership)(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *);
......
......@@ -1136,7 +1136,6 @@ static void ABCWidths_helper(const char* description, HDC hdc, WORD *glyphs, con
static void test_GetCharABCWidths(void)
{
static const WCHAR str[] = {'i',0};
BOOL ret;
HDC hdc;
LOGFONTA lf;
......@@ -1201,7 +1200,7 @@ static void test_GetCharABCWidths(void)
hdc = GetDC(0);
hfont = SelectObject(hdc, hfont);
nb = pGetGlyphIndicesW(hdc, str, 1, glyphs, 0);
nb = pGetGlyphIndicesW(hdc, L"i", 1, glyphs, 0);
ok(nb == 1, "GetGlyphIndicesW should have returned 1\n");
ret = GetCharABCWidthsI(NULL, 0, 1, glyphs, abc);
......@@ -1382,7 +1381,7 @@ static void test_GetCharABCWidths(void)
SetMapMode(hdc, MM_ANISOTROPIC);
SelectObject(hdc, hfont);
nb = pGetGlyphIndicesW(hdc, str, 1, glyphs, 0);
nb = pGetGlyphIndicesW(hdc, L"i", 1, glyphs, 0);
ok(nb == 1, "GetGlyphIndicesW should have returned 1\n");
ret = GetCharABCWidthsI(hdc, 0, 1, glyphs, abc);
......@@ -1433,8 +1432,7 @@ static void test_GetCharABCWidths(void)
static void test_text_extents(void)
{
static const WCHAR wt[] = {'O','n','e','\n','t','w','o',' ','3',0};
static const WCHAR emptyW[] = {0};
static const WCHAR wt[] = L"One\ntwo 3";
LPINT extents;
INT i, len, fit1, fit2, extents2[3];
LOGFONTA lf;
......@@ -1484,7 +1482,7 @@ static void test_text_extents(void)
ok(sz.cx == 0 && sz.cy == 0, "cx %d, cy %d\n", sz.cx, sz.cy);
memset(&sz, 0xcc, sizeof(sz));
ret = GetTextExtentPointW(hdc, emptyW, 0, &sz);
ret = GetTextExtentPointW(hdc, L"", 0, &sz);
ok(ret, "got %d\n", ret);
ok(sz.cx == 0 && sz.cy == 0, "cx %d, cy %d\n", sz.cx, sz.cy);
......@@ -1633,7 +1631,7 @@ static void test_GetGlyphIndices(void)
DWORD charcount;
LOGFONTA lf;
DWORD flags = 0;
WCHAR testtext[] = {'T','e','s','t',0xffff,0};
WCHAR testtext[] = L"Test\xffff";
WORD glyphs[(sizeof(testtext)/2)-1];
TEXTMETRICA textm;
HFONT hOldFont;
......@@ -4445,7 +4443,7 @@ static void test_RealizationInfo(void)
static void test_GetTextFace(void)
{
static const char faceA[] = "Tahoma";
static const WCHAR faceW[] = {'T','a','h','o','m','a', 0};
static const WCHAR faceW[] = L"Tahoma";
LOGFONTA fA = {0};
LOGFONTW fW = {0};
char bufA[LF_FACESIZE];
......@@ -6822,7 +6820,7 @@ static void test_fake_bold_font(void)
static void test_bitmap_font_glyph_index(void)
{
const WCHAR text[] = {'#','!','/','b','i','n','/','s','h',0};
const WCHAR text[] = L"#!/bin/sh";
const struct {
LPCSTR face;
BYTE charset;
......@@ -7117,10 +7115,10 @@ static void test_ttf_names(void)
static void test_lang_names(void)
{
static const WCHAR name_cond_ja_w[] = {0x30d5,0x30a9,0x30f3,0x30c8,0x540d,' ','C','o','n','d',' ','(','j','a',')',0};
static const WCHAR name_cond_ja_reg_w[] = {0x30d5,0x30a9,0x30f3,0x30c8,0x540d,' ','C','o','n','d',' ','(','j','a',')',' ','R','e','g',0};
static const WCHAR name_cond_ja_reg_ja_w[] = {0x30d5,0x30a9,0x30f3,0x30c8,0x540d,' ','C','o','n','d',' ','(','j','a',')',' ','R','e','g',' ','(','j','a',')',0};
static const WCHAR name_wws_ja_w[] = {0x30d5,0x30a9,0x30f3,0x30c8,0x540d,' ','W','W','S',' ','(','j','a',')',0};
static const WCHAR name_cond_ja_w[] = L"\x30d5\x30a9\x30f3\x30c8\x540d Cond (ja)";
static const WCHAR name_cond_ja_reg_w[] = L"\x30d5\x30a9\x30f3\x30c8\x540d Cond (ja) Reg";
static const WCHAR name_cond_ja_reg_ja_w[] = L"\x30d5\x30a9\x30f3\x30c8\x540d Cond (ja) Reg (ja)";
static const WCHAR name_wws_ja_w[] = L"\x30d5\x30a9\x30f3\x30c8\x540d WWS (ja)";
struct enum_fullname_data efnd;
struct enum_fullname_data_w efnd_w;
......
......@@ -27,8 +27,6 @@
#include "wine/test.h"
static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0};
static void test_GetICMProfileA( HDC dc )
{
BOOL ret;
......@@ -167,7 +165,7 @@ static void test_SetICMMode( HDC dc )
ok( ret, "SetICMMode failed (%d)\n", GetLastError() );
SetLastError( 0xdeadbeef );
dc = CreateDCW( displayW, NULL, NULL, NULL );
dc = CreateDCW( L"DISPLAY", NULL, NULL, NULL );
if ( !dc && ( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED ) )
{
win_skip( "CreateDCW is not implemented\n" );
......
......@@ -312,7 +312,6 @@ static int CALLBACK eto_scale_enum_proc(HDC hdc, HANDLETABLE *handle_table,
static void test_ExtTextOutScale(void)
{
const RECT rc = { 0, 0, 100, 100 };
const WCHAR str[] = {'a',0 };
struct eto_scale_test_record test;
HDC hdcDisplay, hdcMetafile;
HENHMETAFILE hMetafile;
......@@ -392,7 +391,7 @@ static void test_ExtTextOutScale(void)
ok(ret, "SetViewportExtEx failed\n");
}
ret = ExtTextOutW(hdcMetafile, 0, 0, 0, 0, str, 1, NULL);
ret = ExtTextOutW(hdcMetafile, 0, 0, 0, 0, L"a", 1, NULL);
ok(ret, "ExtTextOutW failed\n");
hMetafile = CloseEnhMetaFile(hdcMetafile);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment