Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
56b63e85
Commit
56b63e85
authored
Oct 21, 2003
by
Francois Gouget
Committed by
Alexandre Julliard
Oct 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests.dat to include the various #include fixes.
gcc says that sizeof(long double)==12. Fix the detection of pragma packs to detect #include <...>. Generate ok("...\n") calls.
parent
3707ed8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
14 deletions
+25
-14
tests.dat
tools/winapi/tests.dat
+9
-0
winapi_test
tools/winapi/winapi_test
+16
-14
No files found.
tools/winapi/tests.dat
View file @
56b63e85
...
...
@@ -584,6 +584,7 @@ windef.h
%include
ntstatus.h
windows.h
%type
...
...
@@ -870,8 +871,11 @@ shlobj.h
stdarg.h
windef.h
winbase.h
wtypes.h
shellapi.h
winuser.h
wingdi.h
shlobj.h
%type
...
...
@@ -941,8 +945,11 @@ shlwapi.h
%include
stdarg.h
windef.h
winbase.h
wtypes.h
winreg.h
shlwapi.h
%type
...
...
@@ -972,7 +979,9 @@ urlmon.h
%include
stdarg.h
windef.h
winbase.h
urlmon.h
%type
...
...
tools/winapi/winapi_test
View file @
56b63e85
...
...
@@ -222,7 +222,7 @@ sub _find_align_kind_size {
}
elsif
(
/^(?:long\s+double)$/
)
{
$align
=
4
;
$kind
=
"float"
;
$size
=
1
0
;
# ???
$size
=
1
2
;
}
elsif
(
/^H(?:DC|BITMAP|BRUSH|ICON|INSTANCE|MENU|METAFILE|WND)$/
)
{
$align
=
4
;
$kind
=
"unsigned"
;
...
...
@@ -245,10 +245,10 @@ sub _find_align_kind_size {
$output
->
write
(
"$type_name: can't parse type\n"
);
$size_parse_reported
{
$_
}
=
1
;
}
}
elsif
(
/^\w+\s*\((?:\s*CALLBACK|\s*NTAPI|\s*WINAPI)?\s*\*\s*\)\s*\(.*?\)$/
)
{
}
elsif
(
/^\w+\s*\((?:\s*CALLBACK|\s*NTAPI|\s*WINAPI)?\s*\*\s*\)\s*\(.*?\)$/
)
{
$align
=
4
;
$kind
=
"pointer"
;
$size
=
4
;
$size
=
4
;
}
my
$align2
;
...
...
@@ -368,11 +368,13 @@ foreach my $file (@files) {
my
$begin_column
=
shift
;
my
$preprocessor
=
shift
;
local
$_
=
$preprocessor
;
if
(
/^\#\s*include\s+\"pshpack(\d+)\.h\"
$/
)
{
#print "found_preprocessor: $begin_line: [$_]\n"
;
if
(
$preprocessor
=~
/^\#\s*include\s+[\"<]pshpack(\d+)\.h[\">]
$/
)
{
push
@packs
,
$1
;
}
elsif
(
/^\#\s*include\s+\"poppack\.h\"$/
)
{
#print "found pack $1 on line $begin_line\n";
}
elsif
(
$preprocessor
=~
/^\#\s*include\s+[\"<]poppack\.h[\">]$/
)
{
pop
@packs
;
#print "found poppack on line $begin_line\n";
}
return
1
;
...
...
@@ -515,7 +517,7 @@ sub output_header {
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 \") == %d (expected \" #align \")\
\n\
", \\\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"
;
...
...
@@ -523,7 +525,7 @@ sub output_header {
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 \") == %ld (expected \" #offset \")\
\n\
", \\\n"
;
print
OUT
" FIELD_OFFSET(type, field))\n"
;
print
OUT
"\n"
;
print
OUT
"#ifdef _TYPE_ALIGNMENT\n"
;
...
...
@@ -535,13 +537,13 @@ sub output_header {
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 \")\", TYPE_ALIGNMENT(type))\n"
;
print
OUT
" ok(TYPE_ALIGNMENT(type) == align, \"TYPE_ALIGNMENT(\" #type \") == %d (expected \" #align \")\
\n\
", 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 \")\", sizeof(type))\n"
;
print
OUT
" ok(sizeof(type) == size, \"sizeof(\" #type \") == %d (expected \" #size \")\
\n\
", sizeof(type))\n"
;
print
OUT
"\n"
;
print
OUT
"/***********************************************************************\n"
;
print
OUT
" * Test macros\n"
;
...
...
@@ -561,10 +563,10 @@ sub output_header {
print
OUT
" TEST_TYPE_SIZE(*(type)0, size)\n"
;
print
OUT
"\n"
;
print
OUT
"#define TEST_TYPE_SIGNED(type) \\\n"
;
print
OUT
" ok((type) -1 < 0, \"(\" #type \") -1 < 0\");\n"
;
print
OUT
" ok((type) -1 < 0, \"(\" #type \") -1 < 0\
\n\
");\n"
;
print
OUT
"\n"
;
print
OUT
"#define TEST_TYPE_UNSIGNED(type) \\\n"
;
print
OUT
" ok((type) -1 > 0, \"(\" #type \") -1 > 0\");\n"
;
print
OUT
" ok((type) -1 > 0, \"(\" #type \") -1 > 0\
\n\
");\n"
;
print
OUT
"\n"
;
}
...
...
@@ -623,7 +625,7 @@ sub output_test_pack_type {
my
@fields
=
$type
->
fields
;
my
$type_name2
=
$fields
[
0
]
->
type_name
;
if
(
$type_name2
=~
s/\s*\*$//
)
{
my
$type2
=
$$type_name2type
{
$type_name2
};
if
(
defined
(
$type2
))
{
...
...
@@ -671,7 +673,7 @@ sub output_test_pack_type {
print
OUT
" TEST_TYPE_UNSIGNED($type_name);\n"
;
}
}
sub
output_test_pack_fields
{
local
*
OUT
=
shift
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment