Francois Gouget : user32/tests: Use winetest contexts to simplify set_clipboard_data_process().
Alexandre Julliard
julliard at winehq.org
Tue Jun 8 16:34:26 CDT 2021
Module: wine
Branch: master
Commit: 222d2d94e0946cd6fa6b2c20b896fb6236cf41d5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=222d2d94e0946cd6fa6b2c20b896fb6236cf41d5
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue Jun 8 12:28:53 2021 +0200
user32/tests: Use winetest contexts to simplify set_clipboard_data_process().
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/user32/tests/clipboard.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c
index 4b95675770b..5071008a0ab 100644
--- a/dlls/user32/tests/clipboard.c
+++ b/dlls/user32/tests/clipboard.c
@@ -151,24 +151,26 @@ static void set_clipboard_data_process( int arg )
{
HANDLE ret;
+ winetest_push_context("process %u", arg);
SetLastError( 0xdeadbeef );
if (arg)
{
- ok( IsClipboardFormatAvailable( CF_WAVE ), "process %u: CF_WAVE not available\n", arg );
+ ok( IsClipboardFormatAvailable( CF_WAVE ), "CF_WAVE not available\n" );
ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 ));
- ok( ret != 0, "process %u: SetClipboardData failed err %u\n", arg, GetLastError() );
+ ok( ret != 0, "SetClipboardData failed err %u\n", GetLastError() );
}
else
{
SetClipboardData( CF_WAVE, 0 );
- ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "process %u: wrong error %u\n",
- arg, GetLastError());
- ok( !IsClipboardFormatAvailable( CF_WAVE ), "process %u: SetClipboardData succeeded\n", arg );
+ ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %u\n",
+ GetLastError());
+ ok( !IsClipboardFormatAvailable( CF_WAVE ), "SetClipboardData succeeded\n" );
ret = SetClipboardData( CF_WAVE, GlobalAlloc( GMEM_DDESHARE | GMEM_ZEROINIT, 100 ));
- ok( !ret, "process %u: SetClipboardData succeeded\n", arg );
- ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "process %u: wrong error %u\n",
- arg, GetLastError());
+ ok( !ret, "SetClipboardData succeeded\n" );
+ ok( GetLastError() == ERROR_CLIPBOARD_NOT_OPEN, "wrong error %u\n",
+ GetLastError());
}
+ winetest_pop_context();
}
static void grab_clipboard_process( int arg )
More information about the wine-cvs
mailing list