Avoid warnings in generated tests by casting sizeof(x) to an int.
This commit is contained in:
parent
4aa1607a64
commit
b8fc783be2
|
@ -63,7 +63,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -71,24 +71,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -71,24 +71,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -71,24 +71,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -76,24 +76,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -78,24 +78,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -76,24 +76,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -74,24 +74,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -71,24 +71,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
# define TEST_FIELD_ALIGNMENT(type, field, align) \
|
||||
ok(FIELD_ALIGNMENT(type, field) == align, \
|
||||
"FIELD_ALIGNMENT(" #type ", " #field ") == %d (expected " #align ")\n", \
|
||||
FIELD_ALIGNMENT(type, field))
|
||||
(int)FIELD_ALIGNMENT(type, field))
|
||||
#else
|
||||
# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)
|
||||
#endif
|
||||
|
@ -75,24 +75,24 @@
|
|||
#define TEST_FIELD_OFFSET(type, field, offset) \
|
||||
ok(FIELD_OFFSET(type, field) == offset, \
|
||||
"FIELD_OFFSET(" #type ", " #field ") == %ld (expected " #offset ")\n", \
|
||||
FIELD_OFFSET(type, field))
|
||||
(long int)FIELD_OFFSET(type, field))
|
||||
|
||||
#ifdef _TYPE_ALIGNMENT
|
||||
#define TEST__TYPE_ALIGNMENT(type, align) \
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", _TYPE_ALIGNMENT(type))
|
||||
ok(_TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)_TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#ifdef TYPE_ALIGNMENT
|
||||
#define TEST_TYPE_ALIGNMENT(type, align) \
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", TYPE_ALIGNMENT(type))
|
||||
ok(TYPE_ALIGNMENT(type) == align, "TYPE_ALIGNMENT(" #type ") == %d (expected " #align ")\n", (int)TYPE_ALIGNMENT(type))
|
||||
#else
|
||||
# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)
|
||||
#endif
|
||||
|
||||
#define TEST_TYPE_SIZE(type, size) \
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", sizeof(type))
|
||||
ok(sizeof(type) == size, "sizeof(" #type ") == %d (expected " #size ")\n", ((int) sizeof(type)))
|
||||
|
||||
/***********************************************************************
|
||||
* Test macros
|
||||
|
|
|
@ -540,7 +540,7 @@ sub output_header($$$) {
|
|||
print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) \\\n";
|
||||
print OUT " ok(FIELD_ALIGNMENT(type, field) == align, \\\n";
|
||||
print OUT " \"FIELD_ALIGNMENT(\" #type \", \" #field \") == %d (expected \" #align \")\\n\", \\\n";
|
||||
print OUT " FIELD_ALIGNMENT(type, field))\n";
|
||||
print OUT " (int)FIELD_ALIGNMENT(type, field))\n";
|
||||
print OUT "#else\n";
|
||||
print OUT "# define TEST_FIELD_ALIGNMENT(type, field, align) do { } while (0)\n";
|
||||
print OUT "#endif\n";
|
||||
|
@ -548,24 +548,24 @@ sub output_header($$$) {
|
|||
print OUT "#define TEST_FIELD_OFFSET(type, field, offset) \\\n";
|
||||
print OUT " ok(FIELD_OFFSET(type, field) == offset, \\\n";
|
||||
print OUT " \"FIELD_OFFSET(\" #type \", \" #field \") == %ld (expected \" #offset \")\\n\", \\\n";
|
||||
print OUT " FIELD_OFFSET(type, field))\n";
|
||||
print OUT " (long int)FIELD_OFFSET(type, field))\n";
|
||||
print OUT "\n";
|
||||
print OUT "#ifdef _TYPE_ALIGNMENT\n";
|
||||
print OUT "#define TEST__TYPE_ALIGNMENT(type, align) \\\n";
|
||||
print OUT " ok(_TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", _TYPE_ALIGNMENT(type))\n";
|
||||
print OUT " ok(_TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", (int)_TYPE_ALIGNMENT(type))\n";
|
||||
print OUT "#else\n";
|
||||
print OUT "# define TEST__TYPE_ALIGNMENT(type, align) do { } while (0)\n";
|
||||
print OUT "#endif\n";
|
||||
print OUT "\n";
|
||||
print OUT "#ifdef TYPE_ALIGNMENT\n";
|
||||
print OUT "#define TEST_TYPE_ALIGNMENT(type, align) \\\n";
|
||||
print OUT " ok(TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", TYPE_ALIGNMENT(type))\n";
|
||||
print OUT " ok(TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\\n\", (int)TYPE_ALIGNMENT(type))\n";
|
||||
print OUT "#else\n";
|
||||
print OUT "# define TEST_TYPE_ALIGNMENT(type, align) do { } while (0)\n";
|
||||
print OUT "#endif\n";
|
||||
print OUT "\n";
|
||||
print OUT "#define TEST_TYPE_SIZE(type, size) \\\n";
|
||||
print OUT " ok(sizeof(type) == size, \"sizeof(\" #type \") == %d (expected \" #size \")\\n\", sizeof(type))\n";
|
||||
print OUT " ok(sizeof(type) == size, \"sizeof(\" #type \") == %d (expected \" #size \")\\n\", ((int) sizeof(type)))\n";
|
||||
print OUT "\n";
|
||||
print OUT "/***********************************************************************\n";
|
||||
print OUT " * Test macros\n";
|
||||
|
|
Loading…
Reference in New Issue