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
77103f82
Commit
77103f82
authored
Apr 15, 2005
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 15, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simple unit tests for GdiIs*DC functions.
parent
20e23d8d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
metafile.c
dlls/gdi/tests/metafile.c
+50
-0
No files found.
dlls/gdi/tests/metafile.c
View file @
77103f82
...
@@ -562,6 +562,54 @@ static void test_mf_conversions()
...
@@ -562,6 +562,54 @@ static void test_mf_conversions()
}
}
}
}
static
BOOL
(
WINAPI
*
pGdiIsMetaPrintDC
)(
HDC
);
static
BOOL
(
WINAPI
*
pGdiIsMetaFileDC
)(
HDC
);
static
BOOL
(
WINAPI
*
pGdiIsPlayMetafileDC
)(
HDC
);
static
void
test_gdiis
(
void
)
{
RECT
rect
=
{
0
,
0
,
100
,
100
};
HDC
hdc
,
hemfDC
,
hmfDC
;
HENHMETAFILE
hemf
;
HMODULE
hgdi32
;
/* resolve all the functions */
hgdi32
=
GetModuleHandle
(
"gdi32"
);
pGdiIsMetaPrintDC
=
(
void
*
)
GetProcAddress
(
hgdi32
,
"GdiIsMetaPrintDC"
);
pGdiIsMetaFileDC
=
(
void
*
)
GetProcAddress
(
hgdi32
,
"GdiIsMetaFileDC"
);
pGdiIsPlayMetafileDC
=
(
void
*
)
GetProcAddress
(
hgdi32
,
"GdiIsPlayMetafileDC"
);
/* they should all exist or none should exist */
if
(
!
pGdiIsMetaPrintDC
)
return
;
/* try with nothing */
ok
(
!
pGdiIsMetaPrintDC
(
NULL
),
"ismetaprint with NULL parameter
\n
"
);
ok
(
!
pGdiIsMetaFileDC
(
NULL
),
"ismetafile with NULL parameter
\n
"
);
ok
(
!
pGdiIsPlayMetafileDC
(
NULL
),
"isplaymetafile with NULL parameter
\n
"
);
/* try with a metafile */
hmfDC
=
CreateMetaFile
(
NULL
);
ok
(
!
pGdiIsMetaPrintDC
(
hmfDC
),
"ismetaprint on metafile
\n
"
);
ok
(
pGdiIsMetaFileDC
(
hmfDC
),
"ismetafile on metafile
\n
"
);
ok
(
!
pGdiIsPlayMetafileDC
(
hmfDC
),
"isplaymetafile on metafile
\n
"
);
DeleteObject
(
CloseMetaFile
(
hmfDC
));
/* try with an enhanced metafile */
hdc
=
GetDC
(
NULL
);
hemfDC
=
CreateEnhMetaFileW
(
hdc
,
NULL
,
&
rect
,
NULL
);
ok
(
hemfDC
!=
NULL
,
"failed to create emf
\n
"
);
ok
(
!
pGdiIsMetaPrintDC
(
hemfDC
),
"ismetaprint on emf
\n
"
);
ok
(
pGdiIsMetaFileDC
(
hemfDC
),
"ismetafile on emf
\n
"
);
ok
(
!
pGdiIsPlayMetafileDC
(
hemfDC
),
"isplaymetafile on emf
\n
"
);
hemf
=
CloseEnhMetaFile
(
hemfDC
);
ok
(
hemf
!=
NULL
,
"failed to close EMF
\n
"
);
DeleteObject
(
hemf
);
ReleaseDC
(
NULL
,
hdc
);
}
START_TEST
(
metafile
)
START_TEST
(
metafile
)
{
{
/* For enhanced metafiles (enhmfdrv) */
/* For enhanced metafiles (enhmfdrv) */
...
@@ -574,4 +622,6 @@ START_TEST(metafile)
...
@@ -574,4 +622,6 @@ START_TEST(metafile)
/* For metafile conversions */
/* For metafile conversions */
test_mf_conversions
();
test_mf_conversions
();
test_gdiis
();
}
}
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