It is called in three places so this allows identifying which one failed.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- All context strings are unique which is the most important part. But I'm open to changing them if other values would be more descriptive. --- dlls/gdi32/tests/font.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 6bd9c8e941f..19076eab3a5 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2381,7 +2381,7 @@ static void test_GetOutlineTextMetrics(void) ReleaseDC(0, hdc); }
-static void testJustification(HDC hdc, PCSTR str, RECT *clientArea) +static void testJustification(const char *context, HDC hdc, PCSTR str, RECT *clientArea) { INT y, breakCount, @@ -2452,8 +2452,8 @@ static void testJustification(HDC hdc, PCSTR str, RECT *clientArea) /* The width returned by GetTextExtentPoint32() is exactly the same returned by GetTextExtentExPointW() - see dlls/gdi32/font.c */ ok(error[e].GetTextExtentExPointWWidth == areaWidth, - "GetTextExtentPointW() for "%.*s" should have returned a width of %d, not %d.\n", - error[e].len, error[e].start, areaWidth, error[e].GetTextExtentExPointWWidth); + "%s: GetTextExtentPointW() for "%.*s" should have returned a width of %d, not %d.\n", + context, error[e].len, error[e].start, areaWidth, error[e].GetTextExtentExPointWWidth); } }
@@ -2496,7 +2496,7 @@ static void test_SetTextJustification(void) hfont = create_font("Times New Roman", &lf); SelectObject(hdc, hfont);
- testJustification(hdc, testText, &clientArea); + testJustification("default", hdc, testText, &clientArea);
if (!pGetTextExtentExPointI) goto done; GetGlyphIndicesA( hdc, "A ", 2, indices, 0 ); @@ -2533,7 +2533,7 @@ static void test_SetTextJustification(void) SetWindowExtEx( hdc, 2, 2, NULL ); GetClientRect( hwnd, &clientArea ); DPtoLP( hdc, (POINT *)&clientArea, 2 ); - testJustification(hdc, testText, &clientArea); + testJustification("2x2", hdc, testText, &clientArea);
GetTextExtentPoint32A(hdc, "A", 1, &expect); for (i = 0; i < 10; i++) @@ -2555,7 +2555,7 @@ static void test_SetTextJustification(void) SetViewportExtEx( hdc, 3, 3, NULL ); GetClientRect( hwnd, &clientArea ); DPtoLP( hdc, (POINT *)&clientArea, 2 ); - testJustification(hdc, testText, &clientArea); + testJustification("3x3", hdc, testText, &clientArea);
GetTextExtentPoint32A(hdc, "A", 1, &expect); for (i = 0; i < 10; i++)
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=92215
Your paranoid android.
=== w1064v1809 (32 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w1064 (32 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w1064_tsign (32 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w10pro64 (32 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w1064v1809 (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w1064 (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w1064_2qxl (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w1064_tsign (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w10pro64 (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w10pro64_ar (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w10pro64_he (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w10pro64_ja (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.
=== w10pro64_zh_CN (64 bit report) ===
gdi32: font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna" should have returned a width of 800, not 798. font.c:2449: Test failed: 2x2: GetTextExtentPointW() for "aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis" should have returned a width of 800, not 799.