Jacek Caban : winhttp/tests: Make sure that all notifications were called before the end of a test.
Alexandre Julliard
julliard at winehq.org
Fri Jul 14 16:08:08 CDT 2017
Module: wine
Branch: master
Commit: 4620bcf8062545306adfba8f564c4c9a172ac2b8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=4620bcf8062545306adfba8f564c4c9a172ac2b8
Author: Jacek Caban <jacek at codeweavers.com>
Date: Fri Jul 14 15:43:52 2017 +0200
winhttp/tests: Make sure that all notifications were called before the end of a test.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/winhttp/tests/notification.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/winhttp/tests/notification.c b/dlls/winhttp/tests/notification.c
index dc36b88..e9de152 100644
--- a/dlls/winhttp/tests/notification.c
+++ b/dlls/winhttp/tests/notification.c
@@ -163,6 +163,12 @@ static void setup_test( struct info *info, enum api function, unsigned int line
info->test[info->index].function, function);
}
+static void end_test( struct info *info, unsigned int line )
+{
+ ok_(__FILE__,line)(info->index == info->count, "some notifications were missing: %x\n",
+ info->test[info->index].status);
+}
+
static void test_connection_cache( void )
{
HANDLE ses, con, req, event;
@@ -364,6 +370,7 @@ done:
WinHttpCloseHandle( ses );
WaitForSingleObject( info.wait, INFINITE );
CloseHandle( info.wait );
+ end_test( &info, __LINE__ );
if (unload)
{
@@ -456,6 +463,7 @@ done:
WinHttpCloseHandle( ses );
WaitForSingleObject( info.wait, INFINITE );
CloseHandle( info.wait );
+ end_test( &info, __LINE__ );
}
static const struct notification async_test[] =
@@ -593,6 +601,7 @@ static void test_async( void )
}
WinHttpCloseHandle( ses );
WaitForSingleObject( info.wait, INFINITE );
+ end_test( &info, __LINE__ );
if (unload)
{
More information about the wine-cvs
mailing list