Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a36b4a6a
Commit
a36b4a6a
authored
Mar 09, 2016
by
Huw Davies
Committed by
Alexandre Julliard
Mar 09, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Add tests for EMF PolyPolyline record creation.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6e05189b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
108 additions
and
0 deletions
+108
-0
metafile.c
dlls/gdi32/tests/metafile.c
+108
-0
No files found.
dlls/gdi32/tests/metafile.c
View file @
a36b4a6a
...
...
@@ -1371,6 +1371,59 @@ static const unsigned char EMF_BEZIER_BITS[] =
0x14
,
0x00
,
0x00
,
0x00
};
static
const
unsigned
char
EMF_POLYPOLYLINE_BITS
[]
=
{
0x01
,
0x00
,
0x00
,
0x00
,
0x6c
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
,
0x00
,
0x90
,
0x00
,
0x00
,
0xf4
,
0x01
,
0x00
,
0x00
,
0x61
,
0x01
,
0x00
,
0x00
,
0xc2
,
0x02
,
0x00
,
0x00
,
0x7a
,
0xd4
,
0x13
,
0x00
,
0xe8
,
0x44
,
0x00
,
0x00
,
0x20
,
0x45
,
0x4d
,
0x46
,
0x00
,
0x00
,
0x01
,
0x00
,
0x84
,
0x01
,
0x00
,
0x00
,
0x07
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xa1
,
0x05
,
0x00
,
0x00
,
0x47
,
0x03
,
0x00
,
0x00
,
0xfc
,
0x01
,
0x00
,
0x00
,
0x28
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xc0
,
0xc1
,
0x07
,
0x00
,
0x2c
,
0x84
,
0x04
,
0x00
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x20
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x2c
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x02
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x14
,
0x00
,
0x5a
,
0x00
,
0x00
,
0x00
,
0x30
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x02
,
0x00
,
0x00
,
0x00
,
0x02
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x14
,
0x00
,
0x64
,
0x00
,
0xc8
,
0x00
,
0x07
,
0x00
,
0x00
,
0x00
,
0x40
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0xff
,
0x02
,
0x00
,
0x00
,
0x00
,
0x03
,
0x00
,
0x00
,
0x00
,
0x02
,
0x00
,
0x00
,
0x00
,
0x01
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
,
0x64
,
0x00
,
0x00
,
0x00
,
0xc8
,
0x00
,
0x00
,
0x00
,
0x00
,
0x90
,
0x00
,
0x00
,
0x2c
,
0x01
,
0x00
,
0x00
,
0x07
,
0x00
,
0x00
,
0x00
,
0x48
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
,
0x00
,
0x90
,
0x00
,
0x00
,
0xf4
,
0x01
,
0x00
,
0x00
,
0x02
,
0x00
,
0x00
,
0x00
,
0x04
,
0x00
,
0x00
,
0x00
,
0x02
,
0x00
,
0x00
,
0x00
,
0x02
,
0x00
,
0x00
,
0x00
,
0x0a
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
,
0x64
,
0x00
,
0x00
,
0x00
,
0xc8
,
0x00
,
0x00
,
0x00
,
0x00
,
0x90
,
0x00
,
0x00
,
0x2c
,
0x01
,
0x00
,
0x00
,
0x90
,
0x01
,
0x00
,
0x00
,
0xf4
,
0x01
,
0x00
,
0x00
,
0x0e
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x10
,
0x00
,
0x00
,
0x00
,
0x14
,
0x00
,
0x00
,
0x00
};
/* For debugging or dumping the raw metafiles produced by
* new test functions.
*/
...
...
@@ -3492,6 +3545,60 @@ static void test_emf_GetPath(void)
DeleteEnhMetaFile
(
hemf
);
}
static
void
test_emf_PolyPolyline
(
void
)
{
HDC
hdcMetafile
;
HENHMETAFILE
hemf
;
POINT
pts
[
4
]
=
{{
10
,
20
},
{
100
,
200
},
{
0x9000
,
300
},
{
400
,
500
}};
DWORD
counts
[
2
];
BOOL
ret
;
SetLastError
(
0xdeadbeef
);
hdcMetafile
=
CreateEnhMetaFileA
(
GetDC
(
0
),
NULL
,
NULL
,
NULL
);
ok
(
hdcMetafile
!=
0
,
"CreateEnhMetaFileA error %d
\n
"
,
GetLastError
());
ret
=
PolyPolyline
(
hdcMetafile
,
NULL
,
NULL
,
0
);
ok
(
!
ret
,
"PolyPolyline
\n
"
);
SetLastError
(
0xdeadbeef
);
counts
[
0
]
=
0
;
counts
[
1
]
=
1
;
ret
=
PolyPolyline
(
hdcMetafile
,
pts
,
counts
,
2
);
ok
(
!
ret
,
"PolyPolyline
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"gle %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
counts
[
0
]
=
1
;
counts
[
1
]
=
1
;
ret
=
PolyPolyline
(
hdcMetafile
,
pts
,
counts
,
2
);
ok
(
!
ret
,
"PolyPolyline
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"gle %d
\n
"
,
GetLastError
()
);
SetLastError
(
0xdeadbeef
);
counts
[
0
]
=
2
;
counts
[
1
]
=
1
;
ret
=
PolyPolyline
(
hdcMetafile
,
pts
,
counts
,
2
);
ok
(
!
ret
,
"PolyPolyline
\n
"
);
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"gle %d
\n
"
,
GetLastError
()
);
counts
[
0
]
=
2
;
counts
[
1
]
=
2
;
ret
=
PolyPolyline
(
hdcMetafile
,
pts
,
counts
,
2
);
ok
(
ret
,
"PolyPolyline
\n
"
);
hemf
=
CloseEnhMetaFile
(
hdcMetafile
);
ok
(
hemf
!=
0
,
"CloseEnhMetaFile error %d
\n
"
,
GetLastError
());
if
(
compare_emf_bits
(
hemf
,
EMF_POLYPOLYLINE_BITS
,
sizeof
(
EMF_POLYPOLYLINE_BITS
),
"emf_PolyPolyline"
,
FALSE
)
!=
0
)
{
dump_emf_bits
(
hemf
,
"emf_PolyPolyline"
);
dump_emf_records
(
hemf
,
"emf_PolyPolyline"
);
}
DeleteEnhMetaFile
(
hemf
);
}
START_TEST
(
metafile
)
{
init_function_pointers
();
...
...
@@ -3506,6 +3613,7 @@ START_TEST(metafile)
test_emf_clipping
();
test_emf_polybezier
();
test_emf_GetPath
();
test_emf_PolyPolyline
();
/* For win-format metafiles (mfdrv) */
test_mf_SaveDC
();
...
...
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