Francois Gouget : ddraw/tests: Simplify the 'NT4 testbot' special case a bit.

Alexandre Julliard julliard at winehq.org
Thu Feb 27 14:49:24 CST 2014


Module: wine
Branch: master
Commit: af0bf54bd0b9e7f1f9d93054116ffb7c2cb2e8bf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=af0bf54bd0b9e7f1f9d93054116ffb7c2cb2e8bf

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Feb 27 02:13:01 2014 +0100

ddraw/tests: Simplify the 'NT4 testbot' special case a bit.

---

 dlls/ddraw/tests/ddraw1.c |   10 ++++------
 dlls/ddraw/tests/ddraw2.c |   10 ++++------
 2 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index 66a2662..3f8d2bd 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -2316,15 +2316,14 @@ static void test_coop_level_mode_set(void)
     screen_size.cy = 0;
 
     hr = IDirectDraw_SetDisplayMode(ddraw, 640, 480, 32);
-    ok(SUCCEEDED(hr) || broken(hr == DDERR_NOEXCLUSIVEMODE) /* NT4 testbot */,
-            "SetDisplayMode failed, hr %#x.\n", hr);
-    if (hr == DDERR_NOEXCLUSIVEMODE)
+    if (hr == DDERR_NOEXCLUSIVEMODE /* NT4 testbot */)
     {
         win_skip("Broken SetDisplayMode(), skipping remaining tests.\n");
         IDirectDrawSurface_Release(primary);
         IDirectDraw_Release(ddraw);
         goto done;
     }
+    ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr);
 
     ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages);
     expect_messages = NULL;
@@ -2593,15 +2592,14 @@ static void test_coop_level_mode_set_multi(void)
     /* With just a single ddraw object, the display mode is restored on
      * release. */
     hr = IDirectDraw_SetDisplayMode(ddraw1, 800, 600, 32);
-    ok(SUCCEEDED(hr) || broken(hr == DDERR_NOEXCLUSIVEMODE) /* NT4 testbot */,
-            "SetDisplayMode failed, hr %#x.\n", hr);
-    if (hr == DDERR_NOEXCLUSIVEMODE)
+    if (hr == DDERR_NOEXCLUSIVEMODE /* NT4 testbot */)
     {
         win_skip("Broken SetDisplayMode(), skipping test.\n");
         IDirectDraw_Release(ddraw1);
         DestroyWindow(window);
         return;
     }
+    ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr);
     w = GetSystemMetrics(SM_CXSCREEN);
     ok(w == 800, "Got unexpected screen width %u.\n", w);
     h = GetSystemMetrics(SM_CYSCREEN);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 2a69a2f..3aca6e2 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -2527,15 +2527,14 @@ static void test_coop_level_mode_set(void)
     screen_size.cy = 0;
 
     hr = IDirectDraw2_SetDisplayMode(ddraw, 640, 480, 32, 0, 0);
-    ok(SUCCEEDED(hr) || broken(hr == DDERR_NOEXCLUSIVEMODE) /* NT4 testbot */,
-        "SetDisplayMode failed, hr %#x.\n", hr);
-    if (hr == DDERR_NOEXCLUSIVEMODE)
+    if (hr == DDERR_NOEXCLUSIVEMODE /* NT4 testbot */)
     {
         win_skip("Broken SetDisplayMode(), skipping remaining tests.\n");
         IDirectDrawSurface_Release(primary);
         IDirectDraw2_Release(ddraw);
         goto done;
     }
+    ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr);
 
     ok(!*expect_messages, "Expected message %#x, but didn't receive it.\n", *expect_messages);
     expect_messages = NULL;
@@ -2893,15 +2892,14 @@ static void test_coop_level_mode_set_multi(void)
     /* With just a single ddraw object, the display mode is restored on
      * release. */
     hr = IDirectDraw2_SetDisplayMode(ddraw1, 800, 600, 32, 0, 0);
-    ok(SUCCEEDED(hr) || broken(hr == DDERR_NOEXCLUSIVEMODE) /* NT4 testbot */,
-            "SetDisplayMode failed, hr %#x.\n", hr);
-    if (hr == DDERR_NOEXCLUSIVEMODE)
+    if (hr == DDERR_NOEXCLUSIVEMODE /* NT4 testbot */)
     {
         win_skip("Broken SetDisplayMode(), skipping test.\n");
         IDirectDraw2_Release(ddraw1);
         DestroyWindow(window);
         return;
     }
+    ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr);
     w = GetSystemMetrics(SM_CXSCREEN);
     ok(w == 800, "Got unexpected screen width %u.\n", w);
     h = GetSystemMetrics(SM_CYSCREEN);




More information about the wine-cvs mailing list