Francois Gouget : gameux/tests: Avoid an ever changing value in a gamestatistics failure message.

Alexandre Julliard julliard at winehq.org
Tue Mar 17 17:21:08 CDT 2020


Module: wine
Branch: master
Commit: 142c8df4041c5ea2329a6328f1b1acaf495ce9fe
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=142c8df4041c5ea2329a6328f1b1acaf495ce9fe

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Sun Mar 15 23:56:34 2020 +0100

gameux/tests: Avoid an ever changing value in a gamestatistics failure message.

The whole point of printing the IGameStatisticsMgr::GetGameStatistics()
return value was to check whether the pointer had been modified. So
provide this information without including an ever changing value in the
failure message.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/gameux/tests/gamestatistics.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dlls/gameux/tests/gamestatistics.c b/dlls/gameux/tests/gamestatistics.c
index d823af1aab..8d4da4a0f4 100644
--- a/dlls/gameux/tests/gamestatistics.c
+++ b/dlls/gameux/tests/gamestatistics.c
@@ -181,7 +181,8 @@ static void test_gamestatisticsmgr( void )
     gs = (void *)0xdeadbeef;
     hr = IGameStatisticsMgr_GetGameStatistics(gsm, sExeName, GAMESTATS_OPEN_OPENONLY, &dwOpenResult, &gs);
     ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "GetGameStatistics returned unexpected value: 0x%08x\n", hr);
-    ok(gs == NULL, "Expected output pointer to be NULL, got %p\n", gs);
+    ok(gs == NULL, "Expected output pointer to be NULL, got %s\n",
+       (gs == (void *)0xdeadbeef ? "deadbeef" : "neither NULL nor deadbeef"));
 
     /* now, allow them to be created */
     hr = IGameStatisticsMgr_GetGameStatistics(gsm, sExeName, GAMESTATS_OPEN_OPENORCREATE, &dwOpenResult, &gs);




More information about the wine-cvs mailing list