* PROJECT: ReactOS kernel-mode tests
* LICENSE: GPLv2+ - See COPYING in the top level directory
* PURPOSE: Kernel-Mode Test Suite test framework declarations
- * PROGRAMMER: Thomas Faber <thfabba@gmx.de>
+ * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
*/
/* Inspired by Wine C unit tests, Copyright (C) 2002 Alexandre Julliard
#define ok_eq_ulong(value, expected) ok_eq_print(value, expected, "%lu")
#define ok_eq_longlong(value, expected) ok_eq_print(value, expected, "%I64d")
#define ok_eq_ulonglong(value, expected) ok_eq_print(value, expected, "%I64u")
+#define ok_eq_char(value, expected) ok_eq_print(value, expected, "%c")
+#define ok_eq_wchar(value, expected) ok_eq_print(value, expected, "%C")
#ifndef _WIN64
#define ok_eq_size(value, expected) ok_eq_print(value, (SIZE_T)(expected), "%lu")
#define ok_eq_longptr(value, expected) ok_eq_print(value, (LONG_PTR)(expected), "%ld")
#define MILLISECOND (1000 * MICROSECOND)
#define SECOND (1000 * MILLISECOND)
+/* See apitests/include/apitest.h */
#define KmtInvalidPointer ((PVOID)0x5555555555555555ULL)
#define KmtStartSeh() \
- ExceptionStatus = STATUS_SUCCESS; \
+{ \
+ NTSTATUS ExceptionStatus = STATUS_SUCCESS; \
_SEH2_TRY \
{
+
#define KmtEndSeh(ExpectedStatus) \
} \
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) \
{ \
ExceptionStatus = _SEH2_GetExceptionCode(); \
- } _SEH2_END; \
- ok_eq_hex(ExceptionStatus, ExpectedStatus)
+ } \
+ _SEH2_END; \
+ ok_eq_hex(ExceptionStatus, (ExpectedStatus)); \
+}
#if defined KMT_DEFINE_TEST_FUNCTIONS