2013-09-22 17:52:42 +00:00
|
|
|
#ifndef _APITEST_H
|
|
|
|
#define _APITEST_H
|
|
|
|
|
|
|
|
// #define __ROS_LONG64__
|
|
|
|
|
|
|
|
/* The user must #define STANDALONE if it uses this header in testlist.c */
|
2013-09-22 19:07:35 +00:00
|
|
|
#define WIN32_NO_STATUS
|
2013-09-22 17:52:42 +00:00
|
|
|
#include <wine/test.h>
|
2013-09-22 19:07:35 +00:00
|
|
|
#undef WIN32_NO_STATUS
|
|
|
|
|
2013-09-22 17:52:42 +00:00
|
|
|
#include <pseh/pseh2.h>
|
|
|
|
|
|
|
|
/* See kmtests/include/kmt_test.h */
|
|
|
|
#define InvalidPointer ((PVOID)0x5555555555555555ULL)
|
2013-09-22 19:07:35 +00:00
|
|
|
// #define InvalidPointer ((PVOID)0x0123456789ABCDEFULL)
|
2013-09-22 17:52:42 +00:00
|
|
|
|
|
|
|
#define StartSeh() \
|
2013-09-22 19:07:35 +00:00
|
|
|
{ \
|
|
|
|
NTSTATUS ExceptionStatus = STATUS_SUCCESS; \
|
2013-09-22 17:52:42 +00:00
|
|
|
_SEH2_TRY \
|
|
|
|
{
|
2013-09-22 19:07:35 +00:00
|
|
|
|
2013-09-22 17:52:42 +00:00
|
|
|
#define EndSeh(ExpectedStatus) \
|
|
|
|
} \
|
|
|
|
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) \
|
|
|
|
{ \
|
|
|
|
ExceptionStatus = _SEH2_GetExceptionCode(); \
|
|
|
|
} \
|
|
|
|
_SEH2_END; \
|
2013-09-22 19:30:00 +00:00
|
|
|
ok(ExceptionStatus == (ExpectedStatus), \
|
2013-09-22 19:07:35 +00:00
|
|
|
"Exception 0x%08lx, expected 0x%08lx\n", \
|
2013-09-22 19:30:00 +00:00
|
|
|
ExceptionStatus, (ExpectedStatus)); \
|
2013-09-22 19:07:35 +00:00
|
|
|
}
|
2013-09-22 17:52:42 +00:00
|
|
|
|
2020-01-04 16:49:02 +00:00
|
|
|
#define ok_hr(status, expected) ok_hex(status, expected)
|
|
|
|
#define ok_hr_(file, line, status, expected) ok_hex_(file, line, status, expected)
|
|
|
|
|
2013-09-22 17:52:42 +00:00
|
|
|
#endif /* _APITEST_H */
|