Zebediah Figura : setupapi/tests: Avoid assert().
Alexandre Julliard
julliard at winehq.org
Wed May 1 16:37:06 CDT 2019
Module: wine
Branch: master
Commit: 2d13b6b74cfa4a21f2b575081331619fb6cebfed
URL: https://source.winehq.org/git/wine.git/?a=commit;h=2d13b6b74cfa4a21f2b575081331619fb6cebfed
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Wed May 1 09:52:03 2019 -0500
setupapi/tests: Avoid assert().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/setupapi/tests/install.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/dlls/setupapi/tests/install.c b/dlls/setupapi/tests/install.c
index 4232212..cee4b55 100644
--- a/dlls/setupapi/tests/install.c
+++ b/dlls/setupapi/tests/install.c
@@ -21,7 +21,6 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
-#include <assert.h>
#include "windef.h"
#include "winbase.h"
@@ -59,9 +58,9 @@ static void create_inf_file(LPCSTR filename, const char *data)
BOOL ret;
HANDLE handle = CreateFileA(filename, GENERIC_WRITE, 0, NULL,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
- assert(handle != INVALID_HANDLE_VALUE);
+ ok(handle != INVALID_HANDLE_VALUE, "Failed to create %s, error %u.\n", filename, GetLastError());
ret = WriteFile(handle, data, strlen(data), &res, NULL);
- assert(ret != 0);
+ ok(ret, "Failed to write file, error %u.\n", GetLastError());
CloseHandle(handle);
}
@@ -777,7 +776,7 @@ START_TEST(install)
/* Set CBT hook to disallow MessageBox creation in current thread */
hhook = SetWindowsHookExA(WH_CBT, cbt_hook_proc, 0, GetCurrentThreadId());
- assert(hhook != 0);
+ ok(!!hhook, "Failed to set hook, error %u.\n", GetLastError());
test_cmdline();
test_registry();
More information about the wine-cvs
mailing list