https://git.reactos.org/?p=reactos.git;a=commitdiff;h=79f2110191e2419d8e4dbc7449b874e56f1f1c10

commit 79f2110191e2419d8e4dbc7449b874e56f1f1c10
Author:     winesync <[email protected]>
AuthorDate: Mon Sep 21 23:03:25 2020 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Thu Feb 4 16:37:05 2021 +0100

    [WINESYNC] d3dx9/tests: Add some tests for ID3DXFont_DrawText().
    
    Signed-off-by: Sven Baars <[email protected]>
    Signed-off-by: Matteo Bruni <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id db7539f9f3ead16cb94ff03c2b8f9ca11b44a253 by Alistair 
Leslie-Hughes <[email protected]>
---
 modules/rostests/winetests/d3dx9_36/core.c | 57 ++++++++++++++++++++++++++++++
 sdk/tools/winesync/d3dx9.cfg               |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/modules/rostests/winetests/d3dx9_36/core.c 
b/modules/rostests/winetests/d3dx9_36/core.c
index 79b69ccc5f8..bc80b2e3975 100644
--- a/modules/rostests/winetests/d3dx9_36/core.c
+++ b/modules/rostests/winetests/d3dx9_36/core.c
@@ -646,6 +646,63 @@ static void test_ID3DXFont(IDirect3DDevice9 *device)
 
         ID3DXFont_Release(font);
     }
+
+
+    /* ID3DXFont_DrawTextA, ID3DXFont_DrawTextW */
+    hr = D3DXCreateFontA(device, 12, 0, FW_DONTCARE, 0, FALSE, 
DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
+            DEFAULT_QUALITY, DEFAULT_PITCH, "Tahoma", &font);
+    ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+
+    todo_wine {
+    SetRect(&rect, 10, 10, 200, 200);
+
+    height = ID3DXFont_DrawTextA(font, NULL, "test", -2, &rect, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextA(font, NULL, "test", -1, &rect, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextA(font, NULL, "test", 0, &rect, 0, 0xFF00FF);
+    ok(height == 0, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextA(font, NULL, "test", 1, &rect, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextA(font, NULL, "test", 2, &rect, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextA(font, NULL, "test", -1, NULL, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextA(font, NULL, "test", -1, NULL, DT_CALCRECT, 
0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextA(font, NULL, NULL, -1, NULL, 0, 0xFF00FF);
+    ok(height == 0, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextW(font, NULL, testW, -1, &rect, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextW(font, NULL, testW, 0, &rect, 0, 0xFF00FF);
+    ok(height == 0, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextW(font, NULL, testW, 1, &rect, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextW(font, NULL, testW, 2, &rect, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextW(font, NULL, testW, -1, NULL, 0, 0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextW(font, NULL, testW, -1, NULL, DT_CALCRECT, 
0xFF00FF);
+    ok(height == 12, "Got unexpected height %d.\n", height);
+
+    height = ID3DXFont_DrawTextW(font, NULL, NULL, -1, NULL, 0, 0xFF00FF);
+    ok(height == 0, "Got unexpected height %d.\n", height);
+    }
+
+    ID3DXFont_Release(font);
 }
 
 static void test_D3DXCreateRenderToSurface(IDirect3DDevice9 *device)
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 89c3dc33d88..6cfa7259abc 100644
--- a/sdk/tools/winesync/d3dx9.cfg
+++ b/sdk/tools/winesync/d3dx9.cfg
@@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, 
include/d3dx9anim.h: sdk/inc
   include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: 
sdk/include/dxsdk/d3dx9of.h,
   include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, 
include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
   include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: 
sdk/include/dxsdk/d3dx9xof.h}
-tags: {wine: da62db437aca4a434ab88297ac78cbcd83f6152e}
+tags: {wine: db7539f9f3ead16cb94ff03c2b8f9ca11b44a253}

Reply via email to