Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
90fb0460
Commit
90fb0460
authored
22 years ago
by
Patrik Stridvall
Committed by
Alexandre Julliard
22 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Don't use a special header file for macros used in generated tests.
Have a copy in each generated file instead.
parent
2cf92565
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/winapi/winapi_test
+51
-1
51 additions, 1 deletion
tools/winapi/winapi_test
with
51 additions
and
1 deletion
tools/winapi/winapi_test
+
51
−
1
View file @
90fb0460
...
...
@@ -390,7 +390,6 @@ sub output_header {
print
OUT
"
#include <stdio.h>
\n
";
print
OUT
"
\n
";
print
OUT
"
#include
\"
wine/test.h
\"\n
";
print
OUT
"
#include
\"
wine/test_generated.h
\"\n
";
foreach
my
$test
(
@tests
)
{
my
@includes
=
$tests
->
get_section
(
$test_dir
,
$test
,
"
include
");
foreach
my
$include
(
@includes
)
{
...
...
@@ -398,6 +397,57 @@ sub output_header {
}
}
print
OUT
"
\n
";
print
OUT
"
/***********************************************************************
\n
";
print
OUT
"
* Windows API extension
\n
";
print
OUT
"
*/
\n
";
print
OUT
"
\n
";
print
OUT
"
#if (_MSC_VER >= 1300) && defined(__cplusplus)
\n
";
print
OUT
"
# define FIELD_ALIGNMENT(type, field) __alignof(((type*)0)->field)
\n
";
print
OUT
"
#elif defined(__GNUC__)
\n
";
print
OUT
"
# define FIELD_ALIGNMENT(type, field) __alignof__(((type*)0)->field)
\n
";
print
OUT
"
#else
\n
";
print
OUT
"
/* FIXME: Not sure if is possible to do without compiler extension */
\n
";
print
OUT
"
#endif
\n
";
print
OUT
"
\n
";
print
OUT
"
/***********************************************************************
\n
";
print
OUT
"
* Test helper macros
\n
";
print
OUT
"
*/
\n
";
print
OUT
"
\n
";
print
OUT
"
#ifdef FIELD_ALIGNMENT
\n
";
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
";
print
OUT
"
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
";
print
OUT
"
\n
";
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
";
print
OUT
"
FIELD_OFFSET(type, field))
\n
";
print
OUT
"
\n
";
print
OUT
"
#define TEST_TYPE_ALIGNMENT(type, align)
\\\n
";
print
OUT
"
ok(TYPE_ALIGNMENT(type) == align,
\"
TYPE_ALIGNMENT(
\"
#type
\"
) == %d (expected
\"
#align
\"
)
\"
, TYPE_ALIGNMENT(type))
\n
";
print
OUT
"
\n
";
print
OUT
"
#define TEST_TYPE_SIZE(type, size)
\\\n
";
print
OUT
"
ok(sizeof(type) == size,
\"
sizeof(
\"
#type
\"
) == %d (expected
\"
#size
\"
)
\"
, sizeof(type))
\n
";
print
OUT
"
\n
";
print
OUT
"
/***********************************************************************
\n
";
print
OUT
"
* Test macros
\n
";
print
OUT
"
*/
\n
";
print
OUT
"
\n
";
print
OUT
"
#define TEST_FIELD(type, field_type, field_name, field_offset, field_size, field_align)
\\\n
";
print
OUT
"
TEST_TYPE_SIZE(field_type, field_size);
\\\n
";
print
OUT
"
TEST_FIELD_ALIGNMENT(type, field_name, field_align);
\\\n
";
print
OUT
"
TEST_FIELD_OFFSET(type, field_name, field_offset);
\\\n
";
print
OUT
"
\n
";
print
OUT
"
#define TEST_TYPE(type, size, align)
\\\n
";
print
OUT
"
TEST_TYPE_ALIGNMENT(type, align);
\\\n
";
print
OUT
"
TEST_TYPE_SIZE(type, size)
\n
";
print
OUT
"
\n
";
}
########################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment