[PATCH v2] ddraw/tests: Mark GetDC failures on VMware as broken

Alex Henrie alexhenrie24 at gmail.com
Fri Dec 29 01:11:30 CST 2017


Signed-off-by: Alex Henrie <alexhenrie24 at gmail.com>
---
v2: Removed workarounds for DirectDraw 4 and 7, since VMWare already
passes the tests for those versions.

 dlls/ddraw/tests/ddraw1.c | 12 ++++++------
 dlls/ddraw/tests/ddraw2.c | 12 ++++++------
 dlls/ddraw/tests/ddraw4.c |  2 +-
 dlls/ddraw/tests/ddraw7.c |  2 +-
 4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 2c4410af78..90cd0b73b4 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -8999,15 +8999,15 @@ static void test_getdc(void)
     test_data[] =
     {
         {"D3DFMT_A8R8G8B8",    {sizeof(test_data->format), DDPF_RGB | DDPF_ALPHAPIXELS, 0, {32},
-                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000}}, TRUE},
+                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_X8R8G8B8",    {sizeof(test_data->format), DDPF_RGB, 0, {32},
-                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0x00000000}}, TRUE},
+                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0x00000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_R5G6B5",      {sizeof(test_data->format), DDPF_RGB, 0, {16},
-                {0x0000f800}, {0x000007e0}, {0x0000001f}, {0x00000000}}, TRUE},
+                {0x0000f800}, {0x000007e0}, {0x0000001f}, {0x00000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_X1R5G5B5",    {sizeof(test_data->format), DDPF_RGB, 0, {16},
-                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00000000}}, TRUE},
+                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_A1R5G5B5",    {sizeof(test_data->format), DDPF_RGB | DDPF_ALPHAPIXELS, 0, {16},
-                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00008000}}, TRUE},
+                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00008000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_A4R4G4B4",    {sizeof(test_data->format), DDPF_RGB | DDPF_ALPHAPIXELS, 0, {16},
                 {0x00000f00}, {0x000000f0}, {0x0000000f}, {0x0000f000}}, TRUE, DDERR_CANTCREATEDC /* Vista+ */},
         {"D3DFMT_X4R4G4B4",    {sizeof(test_data->format), DDPF_RGB, 0, {16},
@@ -9071,7 +9071,7 @@ static void test_getdc(void)
         dc = (void *)0x1234;
         hr = IDirectDrawSurface_GetDC(surface, &dc);
         if (test_data[i].getdc_supported)
-            ok(SUCCEEDED(hr) || (test_data[i].alt_result && hr == test_data[i].alt_result),
+            ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result),
                     "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
         else
             ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 89d0d7e4be..6d3e090fff 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -10133,15 +10133,15 @@ static void test_getdc(void)
     test_data[] =
     {
         {"D3DFMT_A8R8G8B8",    {sizeof(test_data->format), DDPF_RGB | DDPF_ALPHAPIXELS, 0, {32},
-                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000}}, TRUE},
+                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_X8R8G8B8",    {sizeof(test_data->format), DDPF_RGB, 0, {32},
-                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0x00000000}}, TRUE},
+                {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0x00000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_R5G6B5",      {sizeof(test_data->format), DDPF_RGB, 0, {16},
-                {0x0000f800}, {0x000007e0}, {0x0000001f}, {0x00000000}}, TRUE},
+                {0x0000f800}, {0x000007e0}, {0x0000001f}, {0x00000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_X1R5G5B5",    {sizeof(test_data->format), DDPF_RGB, 0, {16},
-                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00000000}}, TRUE},
+                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00000000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_A1R5G5B5",    {sizeof(test_data->format), DDPF_RGB | DDPF_ALPHAPIXELS, 0, {16},
-                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00008000}}, TRUE},
+                {0x00007c00}, {0x000003e0}, {0x0000001f}, {0x00008000}}, TRUE, DDERR_CANTCREATEDC /* VMware */},
         {"D3DFMT_A4R4G4B4",    {sizeof(test_data->format), DDPF_RGB | DDPF_ALPHAPIXELS, 0, {16},
                 {0x00000f00}, {0x000000f0}, {0x0000000f}, {0x0000f000}}, TRUE, DDERR_CANTCREATEDC /* Vista+ */},
         {"D3DFMT_X4R4G4B4",    {sizeof(test_data->format), DDPF_RGB, 0, {16},
@@ -10205,7 +10205,7 @@ static void test_getdc(void)
         dc = (void *)0x1234;
         hr = IDirectDrawSurface_GetDC(surface, &dc);
         if (test_data[i].getdc_supported)
-            ok(SUCCEEDED(hr) || (test_data[i].alt_result && hr == test_data[i].alt_result),
+            ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result),
                     "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
         else
             ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index fa1178d036..b280628f56 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -11767,7 +11767,7 @@ static void test_getdc(void)
         dc = (void *)0x1234;
         hr = IDirectDrawSurface4_GetDC(surface, &dc);
         if (test_data[i].getdc_supported)
-            ok(SUCCEEDED(hr) || (test_data[i].alt_result && hr == test_data[i].alt_result),
+            ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result),
                     "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
         else
             ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index fdfac696cf..846a83de08 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -11718,7 +11718,7 @@ static void test_getdc(void)
         dc = (void *)0x1234;
         hr = IDirectDrawSurface7_GetDC(surface, &dc);
         if (test_data[i].getdc_supported)
-            ok(SUCCEEDED(hr) || (test_data[i].alt_result && hr == test_data[i].alt_result),
+            ok(SUCCEEDED(hr) || broken(hr == test_data[i].alt_result),
                     "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
         else
             ok(FAILED(hr), "Got unexpected hr %#x for format %s.\n", hr, test_data[i].name);
-- 
2.15.1




More information about the wine-devel mailing list