dwrite/tests: Avoid a couple of unneeded lstrlenW() calls.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Francois Gouget 2019-03-16 23:52:20 +01:00 committed by Alexandre Julliard
parent 9e8e520467
commit f72622bf0d
1 changed files with 2 additions and 2 deletions

View File

@ -3931,7 +3931,7 @@ static void test_SetTextAlignment(void)
count = 0; count = 0;
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count); hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, ARRAY_SIZE(clusters), &count);
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);
if (lstrlenW(stringsW[i])) if (stringsW[i][0])
ok(count > 0, "got %u\n", count); ok(count > 0, "got %u\n", count);
else else
ok(count == 0, "got %u\n", count); ok(count == 0, "got %u\n", count);
@ -3981,7 +3981,7 @@ static void test_SetTextAlignment(void)
ok(metrics.lineCount == 1, "got %d\n", metrics.lineCount); ok(metrics.lineCount == 1, "got %d\n", metrics.lineCount);
IDWriteTextLayout_Release(layout); IDWriteTextLayout_Release(layout);
if (lstrlenW(stringsW[i]) > 0) { if (stringsW[i][0]) {
/* max width less than total run width, trailing alignment */ /* max width less than total run width, trailing alignment */
hr = IDWriteTextFormat_SetWordWrapping(format, DWRITE_WORD_WRAPPING_NO_WRAP); hr = IDWriteTextFormat_SetWordWrapping(format, DWRITE_WORD_WRAPPING_NO_WRAP);
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);