ReactOS 0.4.15-dev-8390-g075894b
apitest.h File Reference
#include <wine/test.h>
Include dependency graph for apitest.h:

Go to the source code of this file.

Macros

#define WIN32_NO_STATUS
 
#define InvalidPointer   ((PVOID)0x5555555555555555ULL)
 
#define StartSeh()
 
#define EndSeh(ExpectedStatus)
 
#define ok_hr(status, expected)   ok_hex(status, expected)
 
#define ok_hr_(file, line, status, expected)   ok_hex_(file, line, status, expected)
 
#define ok_eq_print(value, expected, spec)   ok((value) == (expected), #value " = " spec ", expected " spec "\n", value, expected)
 
#define ok_eq_print_(file, line, value, expected, spec)   ok_(file,line)((value) == (expected), #value " = " spec ", expected " spec "\n", value, expected)
 
#define ok_eq_pointer(value, expected)   ok_eq_print(value, expected, "%p")
 
#define ok_eq_int(value, expected)   ok_eq_print(value, expected, "%d")
 
#define ok_eq_uint(value, expected)   ok_eq_print(value, expected, "%u")
 
#define ok_eq_long(value, expected)   ok_eq_print(value, expected, "%ld")
 
#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")
 
#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 ok_eq_ulongptr(value, expected)   ok_eq_print(value, (ULONG_PTR)(expected), "%lu")
 
#define ok_eq_hex(value, expected)   ok_eq_print(value, expected, "0x%08lx")
 
#define ok_bool_true(value, desc)   ok((value) == TRUE, desc " FALSE, expected TRUE\n")
 
#define ok_bool_false(value, desc)   ok((value) == FALSE, desc " TRUE, expected FALSE\n")
 
#define ok_eq_bool(value, expected)
 
#define ok_eq_str(value, expected)   ok(!strcmp(value, expected), #value " = \"%s\", expected \"%s\"\n", value, expected)
 
#define ok_eq_wstr(value, expected)   ok(!wcscmp(value, expected), #value " = \"%ls\", expected \"%ls\"\n", value, expected)
 
#define ok_eq_tag(value, expected)   ok_eq_print(value, expected, "0x%08lx")
 
#define ok_eq_hex_(file, line, value, expected)   ok_eq_print_(file, line, value, expected, "0x%08lx")
 
#define ok_eq_hex64_(file, line, value, expected)   ok_eq_print_(file, line, value, expected, "%I64x")
 
#define ok_eq_hex64(value, expected)   ok_eq_print(value, expected, "%I64x")
 
#define ok_eq_xmm(value, expected)   ok((value).Low == (expected).Low, #value " = %I64x'%08I64x, expected %I64x'%08I64x\n", (value).Low, (value).High, (expected).Low, (expected).High)
 

Macro Definition Documentation

◆ EndSeh

#define EndSeh (   ExpectedStatus)
Value:
} \
{ \
ExceptionStatus = GetExceptionCode(); \
} \
ok(ExceptionStatus == (ExpectedStatus), \
"Exception 0x%08lx, expected 0x%08lx\n", \
ExceptionStatus, (ExpectedStatus)); \
}
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:85
#define GetExceptionCode()
Definition: seh.h:27

Definition at line 42 of file apitest.h.

◆ InvalidPointer

#define InvalidPointer   ((PVOID)0x5555555555555555ULL)

Definition at line 12 of file apitest.h.

◆ ok_bool_false

#define ok_bool_false (   value,
  desc 
)    ok((value) == FALSE, desc " TRUE, expected FALSE\n")

Definition at line 79 of file apitest.h.

◆ ok_bool_true

#define ok_bool_true (   value,
  desc 
)    ok((value) == TRUE, desc " FALSE, expected TRUE\n")

Definition at line 78 of file apitest.h.

◆ ok_eq_bool

#define ok_eq_bool (   value,
  expected 
)
Value:
ok((value) == (expected), #value " = %s, expected %s\n", \
(value) ? "TRUE" : "FALSE", \
(expected) ? "TRUE" : "FALSE")
#define ok(value,...)
Definition: atltest.h:57
BOOL expected
Definition: store.c:2063
Definition: pdh_main.c:94

Definition at line 80 of file apitest.h.

◆ ok_eq_char

#define ok_eq_char (   value,
  expected 
)    ok_eq_print(value, expected, "%c")

Definition at line 66 of file apitest.h.

◆ ok_eq_hex

#define ok_eq_hex (   value,
  expected 
)    ok_eq_print(value, expected, "0x%08lx")

Definition at line 77 of file apitest.h.

◆ ok_eq_hex64

#define ok_eq_hex64 (   value,
  expected 
)    ok_eq_print(value, expected, "%I64x")

Definition at line 89 of file apitest.h.

◆ ok_eq_hex64_

#define ok_eq_hex64_ (   file,
  line,
  value,
  expected 
)    ok_eq_print_(file, line, value, expected, "%I64x")

Definition at line 88 of file apitest.h.

◆ ok_eq_hex_

#define ok_eq_hex_ (   file,
  line,
  value,
  expected 
)    ok_eq_print_(file, line, value, expected, "0x%08lx")

Definition at line 87 of file apitest.h.

◆ ok_eq_int

#define ok_eq_int (   value,
  expected 
)    ok_eq_print(value, expected, "%d")

Definition at line 60 of file apitest.h.

◆ ok_eq_long

#define ok_eq_long (   value,
  expected 
)    ok_eq_print(value, expected, "%ld")

Definition at line 62 of file apitest.h.

◆ ok_eq_longlong

#define ok_eq_longlong (   value,
  expected 
)    ok_eq_print(value, expected, "%I64d")

Definition at line 64 of file apitest.h.

◆ ok_eq_longptr

#define ok_eq_longptr (   value,
  expected 
)    ok_eq_print(value, (LONG_PTR)(expected), "%ld")

Definition at line 70 of file apitest.h.

◆ ok_eq_pointer

#define ok_eq_pointer (   value,
  expected 
)    ok_eq_print(value, expected, "%p")

Definition at line 59 of file apitest.h.

◆ ok_eq_print

#define ok_eq_print (   value,
  expected,
  spec 
)    ok((value) == (expected), #value " = " spec ", expected " spec "\n", value, expected)

Definition at line 57 of file apitest.h.

◆ ok_eq_print_

#define ok_eq_print_ (   file,
  line,
  value,
  expected,
  spec 
)    ok_(file,line)((value) == (expected), #value " = " spec ", expected " spec "\n", value, expected)

Definition at line 58 of file apitest.h.

◆ ok_eq_size

#define ok_eq_size (   value,
  expected 
)    ok_eq_print(value, (SIZE_T)(expected), "%lu")

Definition at line 69 of file apitest.h.

◆ ok_eq_str

#define ok_eq_str (   value,
  expected 
)    ok(!strcmp(value, expected), #value " = \"%s\", expected \"%s\"\n", value, expected)

Definition at line 83 of file apitest.h.

◆ ok_eq_tag

#define ok_eq_tag (   value,
  expected 
)    ok_eq_print(value, expected, "0x%08lx")

Definition at line 85 of file apitest.h.

◆ ok_eq_uint

#define ok_eq_uint (   value,
  expected 
)    ok_eq_print(value, expected, "%u")

Definition at line 61 of file apitest.h.

◆ ok_eq_ulong

#define ok_eq_ulong (   value,
  expected 
)    ok_eq_print(value, expected, "%lu")

Definition at line 63 of file apitest.h.

◆ ok_eq_ulonglong

#define ok_eq_ulonglong (   value,
  expected 
)    ok_eq_print(value, expected, "%I64u")

Definition at line 65 of file apitest.h.

◆ ok_eq_ulongptr

#define ok_eq_ulongptr (   value,
  expected 
)    ok_eq_print(value, (ULONG_PTR)(expected), "%lu")

Definition at line 71 of file apitest.h.

◆ ok_eq_wchar

#define ok_eq_wchar (   value,
  expected 
)    ok_eq_print(value, expected, "%C")

Definition at line 67 of file apitest.h.

◆ ok_eq_wstr

#define ok_eq_wstr (   value,
  expected 
)    ok(!wcscmp(value, expected), #value " = \"%ls\", expected \"%ls\"\n", value, expected)

Definition at line 84 of file apitest.h.

◆ ok_eq_xmm

#define ok_eq_xmm (   value,
  expected 
)    ok((value).Low == (expected).Low, #value " = %I64x'%08I64x, expected %I64x'%08I64x\n", (value).Low, (value).High, (expected).Low, (expected).High)

Definition at line 90 of file apitest.h.

◆ ok_hr

#define ok_hr (   status,
  expected 
)    ok_hex(status, expected)

Definition at line 54 of file apitest.h.

◆ ok_hr_

#define ok_hr_ (   file,
  line,
  status,
  expected 
)    ok_hex_(file, line, status, expected)

Definition at line 55 of file apitest.h.

◆ StartSeh

#define StartSeh ( )
Value:
{ \
NTSTATUS ExceptionStatus = STATUS_SUCCESS; \
__try \
{
LONG NTSTATUS
Definition: precomp.h:26
#define STATUS_SUCCESS
Definition: shellext.h:65

Definition at line 36 of file apitest.h.

◆ WIN32_NO_STATUS

#define WIN32_NO_STATUS

Definition at line 7 of file apitest.h.