Commit 36cce60f authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite/tests: Fix indentation warnings on GCC 6.

parent db5211d3
...@@ -1166,7 +1166,7 @@ static void test_GetScriptProperties(void) ...@@ -1166,7 +1166,7 @@ static void test_GetScriptProperties(void)
hr = IDWriteTextAnalyzer1_GetScriptProperties(analyzer1, sa, &props); hr = IDWriteTextAnalyzer1_GetScriptProperties(analyzer1, sa, &props);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteTextAnalyzer1_GetScriptProperties(analyzer1, sa, NULL); hr = IDWriteTextAnalyzer1_GetScriptProperties(analyzer1, sa, NULL);
sa.script = 0; sa.script = 0;
......
...@@ -841,7 +841,7 @@ static void test_CreateFontFromLOGFONT(void) ...@@ -841,7 +841,7 @@ static void test_CreateFontFromLOGFONT(void)
hr = IDWriteFactory_GetGdiInterop(factory, &interop); hr = IDWriteFactory_GetGdiInterop(factory, &interop);
EXPECT_HR(hr, S_OK); EXPECT_HR(hr, S_OK);
if (0) if (0)
/* null out parameter crashes this call */ /* null out parameter crashes this call */
hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, NULL, NULL); hr = IDWriteGdiInterop_CreateFontFromLOGFONT(interop, NULL, NULL);
...@@ -1012,7 +1012,7 @@ static void test_CreateBitmapRenderTarget(void) ...@@ -1012,7 +1012,7 @@ static void test_CreateBitmapRenderTarget(void)
hr = IDWriteGdiInterop_CreateBitmapRenderTarget(interop, NULL, 0, 0, &target); hr = IDWriteGdiInterop_CreateBitmapRenderTarget(interop, NULL, 0, 0, &target);
EXPECT_HR(hr, S_OK); EXPECT_HR(hr, S_OK);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteBitmapRenderTarget_GetSize(target, NULL); hr = IDWriteBitmapRenderTarget_GetSize(target, NULL);
size.cx = size.cy = -1; size.cx = size.cy = -1;
...@@ -1158,7 +1158,7 @@ if (0) /* crashes on native */ ...@@ -1158,7 +1158,7 @@ if (0) /* crashes on native */
ok(!ds.dsBm.bmBits, "got %p\n", ds.dsBm.bmBits); ok(!ds.dsBm.bmBits, "got %p\n", ds.dsBm.bmBits);
/* transform tests, current hdc transform is not immediately affected */ /* transform tests, current hdc transform is not immediately affected */
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteBitmapRenderTarget_GetCurrentTransform(target, NULL); hr = IDWriteBitmapRenderTarget_GetCurrentTransform(target, NULL);
memset(&m, 0xcc, sizeof(m)); memset(&m, 0xcc, sizeof(m));
...@@ -1405,7 +1405,7 @@ static void test_GetFamilyNames(void) ...@@ -1405,7 +1405,7 @@ static void test_GetFamilyNames(void)
hr = IDWriteFont_GetFontFamily(font, &family); hr = IDWriteFont_GetFontFamily(font, &family);
EXPECT_HR(hr, S_OK); EXPECT_HR(hr, S_OK);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteFontFamily_GetFamilyNames(family, NULL); hr = IDWriteFontFamily_GetFamilyNames(family, NULL);
hr = IDWriteFontFamily_GetFamilyNames(family, &names); hr = IDWriteFontFamily_GetFamilyNames(family, &names);
...@@ -1420,7 +1420,7 @@ if (0) /* crashes on native */ ...@@ -1420,7 +1420,7 @@ if (0) /* crashes on native */
IDWriteLocalizedStrings_Release(names2); IDWriteLocalizedStrings_Release(names2);
/* GetStringLength */ /* GetStringLength */
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteLocalizedStrings_GetStringLength(names, 0, NULL); hr = IDWriteLocalizedStrings_GetStringLength(names, 0, NULL);
len = 100; len = 100;
...@@ -1440,7 +1440,7 @@ if (0) /* crashes on native */ ...@@ -1440,7 +1440,7 @@ if (0) /* crashes on native */
hr = IDWriteLocalizedStrings_GetString(names, 10, NULL, 0); hr = IDWriteLocalizedStrings_GetString(names, 10, NULL, 0);
ok(hr == E_FAIL, "got 0x%08x\n", hr); ok(hr == E_FAIL, "got 0x%08x\n", hr);
if (0) if (0)
hr = IDWriteLocalizedStrings_GetString(names, 0, NULL, 100); hr = IDWriteLocalizedStrings_GetString(names, 0, NULL, 100);
buffer[0] = 1; buffer[0] = 1;
...@@ -1512,7 +1512,7 @@ static void test_CreateFontFace(void) ...@@ -1512,7 +1512,7 @@ static void test_CreateFontFace(void)
hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFontFace, (void**)&fontface); hr = IDWriteFont_QueryInterface(font, &IID_IDWriteFontFace, (void**)&fontface);
ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr); ok(hr == E_NOINTERFACE, "got 0x%08x\n", hr);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteFont_CreateFontFace(font, NULL); hr = IDWriteFont_CreateFontFace(font, NULL);
fontface = NULL; fontface = NULL;
...@@ -1845,7 +1845,7 @@ static void test_GetMetrics(void) ...@@ -1845,7 +1845,7 @@ static void test_GetMetrics(void)
DeleteDC(hdc); DeleteDC(hdc);
DeleteObject(hfont); DeleteObject(hfont);
if (0) /* crashes on native */ if (0) /* crashes on native */
IDWriteFont_GetMetrics(font, NULL); IDWriteFont_GetMetrics(font, NULL);
memset(&metrics, 0, sizeof(metrics)); memset(&metrics, 0, sizeof(metrics));
...@@ -2648,9 +2648,9 @@ if (0) { /* crashes on win10 */ ...@@ -2648,9 +2648,9 @@ if (0) { /* crashes on win10 */
hr = IDWriteFactory_CreateFontFace(factory2, face_type, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &face2); hr = IDWriteFactory_CreateFontFace(factory2, face_type, 1, &file, 0, DWRITE_FONT_SIMULATIONS_NONE, &face2);
todo_wine todo_wine
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);
if (face2) if (face2) {
IDWriteFontFace_Release(face2); IDWriteFontFace_Release(face2);
}
file2 = NULL; file2 = NULL;
hr = IDWriteFactory_CreateCustomFontFileReference(factory, &fontrsrc, sizeof(HRSRC), &rloader, &file2); hr = IDWriteFactory_CreateCustomFontFileReference(factory, &fontrsrc, sizeof(HRSRC), &rloader, &file2);
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);
...@@ -2681,7 +2681,7 @@ if (face2) ...@@ -2681,7 +2681,7 @@ if (face2)
ok(indices[0] == 0, "got index %i\n", indices[0]); ok(indices[0] == 0, "got index %i\n", indices[0]);
ok(indices[1] == 11, "got index %i\n", indices[1]); ok(indices[1] == 11, "got index %i\n", indices[1]);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 1, NULL); hr = IDWriteFontFace_GetGlyphIndices(face, NULL, 1, NULL);
hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 1, indices); hr = IDWriteFontFace_GetGlyphIndices(face, codePoints, 1, indices);
...@@ -4836,8 +4836,9 @@ static void test_GetGdiCompatibleMetrics_face(IDWriteFontFace *face) ...@@ -4836,8 +4836,9 @@ static void test_GetGdiCompatibleMetrics_face(IDWriteFontFace *face)
expected.subscriptSizeX = round(round(design_metrics1.subscriptSizeX * scale) / scale); expected.subscriptSizeX = round(round(design_metrics1.subscriptSizeX * scale) / scale);
expected.subscriptSizeY = round(round(design_metrics1.subscriptSizeY * scale) / scale); expected.subscriptSizeY = round(round(design_metrics1.subscriptSizeY * scale) / scale);
expected.superscriptPositionX = round(round(design_metrics1.superscriptPositionX * scale) / scale); expected.superscriptPositionX = round(round(design_metrics1.superscriptPositionX * scale) / scale);
if (0) /* this fails for 3 emsizes, Tahoma from [5, 2048] range */ if (0) /* this fails for 3 emsizes, Tahoma from [5, 2048] range */ {
expected.superscriptPositionY = round(round(design_metrics1.superscriptPositionY * scale) / scale); expected.superscriptPositionY = round(round(design_metrics1.superscriptPositionY * scale) / scale);
}
expected.superscriptSizeX = round(round(design_metrics1.superscriptSizeX * scale) / scale); expected.superscriptSizeX = round(round(design_metrics1.superscriptSizeX * scale) / scale);
expected.superscriptSizeY = round(round(design_metrics1.superscriptSizeY * scale) / scale); expected.superscriptSizeY = round(round(design_metrics1.superscriptSizeY * scale) / scale);
expected.hasTypographicMetrics = design_metrics1.hasTypographicMetrics; expected.hasTypographicMetrics = design_metrics1.hasTypographicMetrics;
...@@ -5210,7 +5211,7 @@ static void test_GetRecommendedRenderingMode(void) ...@@ -5210,7 +5211,7 @@ static void test_GetRecommendedRenderingMode(void)
if (hr != S_OK) if (hr != S_OK)
win_skip("IDWriteFontFace3::GetRecommendedRenderingMode() is not supported.\n"); win_skip("IDWriteFontFace3::GetRecommendedRenderingMode() is not supported.\n");
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, 3.0, 1.0, hr = IDWriteFontFace_GetRecommendedRenderingMode(fontface, 3.0, 1.0,
DWRITE_MEASURING_MODE_GDI_CLASSIC, NULL, NULL); DWRITE_MEASURING_MODE_GDI_CLASSIC, NULL, NULL);
......
...@@ -982,7 +982,7 @@ static void test_CreateTextFormat(void) ...@@ -982,7 +982,7 @@ static void test_CreateTextFormat(void)
DWRITE_FONT_STRETCH_NORMAL, 10.0, enusW, &format); DWRITE_FONT_STRETCH_NORMAL, 10.0, enusW, &format);
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteTextFormat_GetFontCollection(format, NULL); hr = IDWriteTextFormat_GetFontCollection(format, NULL);
collection = NULL; collection = NULL;
...@@ -2234,7 +2234,7 @@ static void test_SetLocaleName(void) ...@@ -2234,7 +2234,7 @@ static void test_SetLocaleName(void)
hr = IDWriteTextLayout_GetLocaleName(layout, 0, NULL, 0, NULL); hr = IDWriteTextLayout_GetLocaleName(layout, 0, NULL, 0, NULL);
ok(hr == E_INVALIDARG, "got 0x%08x\n", hr); ok(hr == E_INVALIDARG, "got 0x%08x\n", hr);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteTextLayout_GetLocaleName(layout, 0, NULL, 1, NULL); hr = IDWriteTextLayout_GetLocaleName(layout, 0, NULL, 1, NULL);
buffW[0] = 0; buffW[0] = 0;
...@@ -2446,7 +2446,7 @@ static void test_fallback(void) ...@@ -2446,7 +2446,7 @@ static void test_fallback(void)
return; return;
} }
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteTextLayout2_GetFontFallback(layout2, NULL); hr = IDWriteTextLayout2_GetFontFallback(layout2, NULL);
fallback = (void*)0xdeadbeef; fallback = (void*)0xdeadbeef;
...@@ -4370,9 +4370,9 @@ todo_wine { ...@@ -4370,9 +4370,9 @@ todo_wine {
ok(scale == 1.0f, "got %f\n", scale); ok(scale == 1.0f, "got %f\n", scale);
todo_wine todo_wine
ok(font != NULL, "got %p\n", font); ok(font != NULL, "got %p\n", font);
if (font) if (font) {
IDWriteFont_Release(font); IDWriteFont_Release(font);
}
/* same latin text, full length */ /* same latin text, full length */
g_source = strW; g_source = strW;
mappedlength = 0; mappedlength = 0;
...@@ -4387,9 +4387,9 @@ todo_wine { ...@@ -4387,9 +4387,9 @@ todo_wine {
ok(scale == 1.0f, "got %f\n", scale); ok(scale == 1.0f, "got %f\n", scale);
todo_wine todo_wine
ok(font != NULL, "got %p\n", font); ok(font != NULL, "got %p\n", font);
if (font) if (font) {
IDWriteFont_Release(font); IDWriteFont_Release(font);
}
/* string 'a\x3058b' */ /* string 'a\x3058b' */
g_source = str2W; g_source = str2W;
mappedlength = 0; mappedlength = 0;
...@@ -4404,9 +4404,9 @@ todo_wine { ...@@ -4404,9 +4404,9 @@ todo_wine {
ok(scale == 1.0f, "got %f\n", scale); ok(scale == 1.0f, "got %f\n", scale);
todo_wine todo_wine
ok(font != NULL, "got %p\n", font); ok(font != NULL, "got %p\n", font);
if (font) if (font) {
IDWriteFont_Release(font); IDWriteFont_Release(font);
}
g_source = str2W; g_source = str2W;
mappedlength = 0; mappedlength = 0;
scale = 0.0f; scale = 0.0f;
...@@ -4544,7 +4544,7 @@ static void test_FontFallbackBuilder(void) ...@@ -4544,7 +4544,7 @@ static void test_FontFallbackBuilder(void)
hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, 4.0f); hr = IDWriteFontFallbackBuilder_AddMapping(builder, &range, 1, &familyW, 1, NULL, NULL, NULL, 4.0f);
ok(hr == S_OK, "got 0x%08x\n", hr); ok(hr == S_OK, "got 0x%08x\n", hr);
if (0) /* crashes on native */ if (0) /* crashes on native */
hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, NULL); hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, NULL);
hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback); hr = IDWriteFontFallbackBuilder_CreateFontFallback(builder, &fallback);
......
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