mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[WINETESTS]
Add some useful macros to wine/test.h svn path=/trunk/; revision=56417
This commit is contained in:
parent
d0683c7f6f
commit
652128646c
1 changed files with 26 additions and 0 deletions
|
@ -623,4 +623,30 @@ int main( int argc, char **argv )
|
|||
// hack for ntdll winetest (this is defined in excpt.h)
|
||||
#undef exception_info
|
||||
|
||||
// Some helpful definitions
|
||||
|
||||
#define ok_hex(expression, result) \
|
||||
{ \
|
||||
int _value = (expression); \
|
||||
ok(_value == (result), "Wrong value for '%s', expected: " #result " (0x%x), got: 0x%x\n", \
|
||||
#expression, (int)(result), _value); \
|
||||
}
|
||||
|
||||
#define ok_dec(expression, result) \
|
||||
{ \
|
||||
int _value = (expression); \
|
||||
ok(_value == (result), "Wrong value for '%s', expected: " #result " (%d), got: %d\n", \
|
||||
#expression, (int)(result), _value); \
|
||||
}
|
||||
|
||||
#define ok_err(error) \
|
||||
ok(GetLastError() == (error), "Wrong last error. Expected " #error ", got %d\n", (int)GetLastError())
|
||||
|
||||
#define ok_str(x, y) \
|
||||
ok(strcmp(x, y) == 0, "Wrong string. Expected '%s', got '%s'\n", y, x);
|
||||
|
||||
#define ok_long(expression, result) ok_hex(expression, result)
|
||||
#define ok_int(expression, result) ok_dec(expression, result)
|
||||
#define ok_ntstatus(status, expected) ok_hex(status, expected)
|
||||
|
||||
#endif /* __WINE_WINE_TEST_H */
|
||||
|
|
Loading…
Reference in a new issue