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
1c8d4aaa
Commit
1c8d4aaa
authored
Oct 16, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Fix tests compilation with __WINESRC__ defined.
parent
fc0c0be1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
32 additions
and
35 deletions
+32
-35
Makefile.in
dlls/gdiplus/tests/Makefile.in
+0
-1
brush.c
dlls/gdiplus/tests/brush.c
+3
-2
customlinecap.c
dlls/gdiplus/tests/customlinecap.c
+1
-1
font.c
dlls/gdiplus/tests/font.c
+14
-14
graphics.c
dlls/gdiplus/tests/graphics.c
+3
-4
graphicspath.c
dlls/gdiplus/tests/graphicspath.c
+1
-1
image.c
dlls/gdiplus/tests/image.c
+2
-2
matrix.c
dlls/gdiplus/tests/matrix.c
+1
-2
metafile.c
dlls/gdiplus/tests/metafile.c
+1
-2
pathiterator.c
dlls/gdiplus/tests/pathiterator.c
+1
-1
pen.c
dlls/gdiplus/tests/pen.c
+1
-1
region.c
dlls/gdiplus/tests/region.c
+3
-3
stringformat.c
dlls/gdiplus/tests/stringformat.c
+1
-1
No files found.
dlls/gdiplus/tests/Makefile.in
View file @
1c8d4aaa
TESTDLL
=
gdiplus.dll
IMPORTS
=
gdiplus ole32 user32 gdi32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
brush.c
\
...
...
dlls/gdiplus/tests/brush.c
View file @
1c8d4aaa
...
...
@@ -18,10 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windows.h"
#include <math.h>
#include "objbase.h"
#include "gdiplus.h"
#include "wine/test.h"
#include <math.h>
#define expect(expected, got) ok(got == expected, "Expected %.8x, got %.8x\n", expected, got)
#define expectf(expected, got) ok(fabs(expected - got) < 0.0001, "Expected %.2f, got %.2f\n", expected, got)
...
...
dlls/gdiplus/tests/customlinecap.c
View file @
1c8d4aaa
...
...
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
dlls/gdiplus/tests/font.c
View file @
1c8d4aaa
...
...
@@ -21,7 +21,7 @@
#include <math.h>
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
@@ -731,7 +731,7 @@ static void test_font_substitution(void)
WCHAR
ms_shell_dlg
[
LF_FACESIZE
];
HDC
hdc
;
HFONT
hfont
;
LOGFONT
lf
;
LOGFONT
A
lf
;
GpStatus
status
;
GpGraphics
*
graphics
;
GpFont
*
font
;
...
...
@@ -746,9 +746,9 @@ static void test_font_substitution(void)
ok
(
hfont
!=
0
,
"GetStockObject(DEFAULT_GUI_FONT) failed
\n
"
);
memset
(
&
lf
,
0xfe
,
sizeof
(
lf
));
ret
=
GetObject
(
hfont
,
sizeof
(
lf
),
&
lf
);
ret
=
GetObject
A
(
hfont
,
sizeof
(
lf
),
&
lf
);
ok
(
ret
==
sizeof
(
lf
),
"GetObject failed
\n
"
);
ok
(
!
lstrcmp
(
lf
.
lfFaceName
,
"MS Shell Dlg"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
ok
(
!
lstrcmp
A
(
lf
.
lfFaceName
,
"MS Shell Dlg"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
MultiByteToWideChar
(
CP_ACP
,
0
,
lf
.
lfFaceName
,
-
1
,
ms_shell_dlg
,
LF_FACESIZE
);
status
=
GdipCreateFontFromLogfontA
(
hdc
,
&
lf
,
&
font
);
...
...
@@ -756,8 +756,8 @@ static void test_font_substitution(void)
memset
(
&
lf
,
0xfe
,
sizeof
(
lf
));
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
ok
(
!
lstrcmp
(
lf
.
lfFaceName
,
"Microsoft Sans Serif"
)
||
!
lstrcmp
(
lf
.
lfFaceName
,
"Tahoma"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
ok
(
!
lstrcmp
A
(
lf
.
lfFaceName
,
"Microsoft Sans Serif"
)
||
!
lstrcmp
A
(
lf
.
lfFaceName
,
"Tahoma"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
GdipDeleteFont
(
font
);
status
=
GdipCreateFontFamilyFromName
(
ms_shell_dlg
,
NULL
,
&
family
);
...
...
@@ -767,21 +767,21 @@ static void test_font_substitution(void)
memset
(
&
lf
,
0xfe
,
sizeof
(
lf
));
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
ok
(
!
lstrcmp
(
lf
.
lfFaceName
,
"Microsoft Sans Serif"
)
||
!
lstrcmp
(
lf
.
lfFaceName
,
"Tahoma"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
ok
(
!
lstrcmp
A
(
lf
.
lfFaceName
,
"Microsoft Sans Serif"
)
||
!
lstrcmp
A
(
lf
.
lfFaceName
,
"Tahoma"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
GdipDeleteFont
(
font
);
GdipDeleteFontFamily
(
family
);
status
=
GdipCreateFontFamilyFromName
(
nonexistent
,
NULL
,
&
family
);
ok
(
status
==
FontFamilyNotFound
,
"expected FontFamilyNotFound, got %d
\n
"
,
status
);
lstrcpy
(
lf
.
lfFaceName
,
"ThisFontShouldNotExist"
);
lstrcpy
A
(
lf
.
lfFaceName
,
"ThisFontShouldNotExist"
);
status
=
GdipCreateFontFromLogfontA
(
hdc
,
&
lf
,
&
font
);
expect
(
Ok
,
status
);
memset
(
&
lf
,
0xfe
,
sizeof
(
lf
));
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
ok
(
!
lstrcmp
(
lf
.
lfFaceName
,
"Arial"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
ok
(
!
lstrcmp
A
(
lf
.
lfFaceName
,
"Arial"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
GdipDeleteFont
(
font
);
/* empty FaceName */
...
...
@@ -791,13 +791,13 @@ static void test_font_substitution(void)
memset
(
&
lf
,
0xfe
,
sizeof
(
lf
));
status
=
GdipGetLogFontA
(
font
,
graphics
,
&
lf
);
expect
(
Ok
,
status
);
ok
(
!
lstrcmp
(
lf
.
lfFaceName
,
"Arial"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
ok
(
!
lstrcmp
A
(
lf
.
lfFaceName
,
"Arial"
),
"wrong face name %s
\n
"
,
lf
.
lfFaceName
);
GdipDeleteFont
(
font
);
/* zeroing out lfWeight and lfCharSet leads to font creation failure */
lf
.
lfWeight
=
0
;
lf
.
lfCharSet
=
0
;
lstrcpy
(
lf
.
lfFaceName
,
"ThisFontShouldNotExist"
);
lstrcpy
A
(
lf
.
lfFaceName
,
"ThisFontShouldNotExist"
);
status
=
GdipCreateFontFromLogfontA
(
hdc
,
&
lf
,
&
font
);
todo_wine
ok
(
status
==
NotTrueTypeFont
||
broken
(
status
==
FileNotFound
),
/* before XP */
...
...
@@ -819,7 +819,7 @@ static void test_font_transform(void)
static
const
WCHAR
string
[]
=
{
'A'
,
0
};
GpStatus
status
;
HDC
hdc
;
LOGFONT
lf
;
LOGFONT
A
lf
;
GpFont
*
font
;
GpGraphics
*
graphics
;
GpMatrix
*
matrix
;
...
...
@@ -841,7 +841,7 @@ static void test_font_transform(void)
expect
(
Ok
,
status
);
memset
(
&
lf
,
0
,
sizeof
(
lf
));
lstrcpy
(
lf
.
lfFaceName
,
"Tahoma"
);
lstrcpy
A
(
lf
.
lfFaceName
,
"Tahoma"
);
lf
.
lfHeight
=
-
100
;
lf
.
lfWidth
=
100
;
status
=
GdipCreateFontFromLogfontA
(
hdc
,
&
lf
,
&
font
);
...
...
dlls/gdiplus/tests/graphics.c
View file @
1c8d4aaa
...
...
@@ -22,9 +22,8 @@
#include <math.h>
#include <assert.h>
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wingdi.h"
#include "wine/test.h"
#define expect(expected, got) ok((got) == (expected), "Expected %d, got %d\n", (INT)(expected), (INT)(got))
...
...
@@ -5506,8 +5505,8 @@ START_TEST(graphics)
class
.
style
=
CS_HREDRAW
|
CS_VREDRAW
;
class
.
lpfnWndProc
=
DefWindowProcA
;
class
.
hInstance
=
GetModuleHandleA
(
0
);
class
.
hIcon
=
LoadIcon
(
0
,
IDI_APPLICATION
);
class
.
hCursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
class
.
hIcon
=
LoadIcon
A
(
0
,
(
LPCSTR
)
IDI_APPLICATION
);
class
.
hCursor
=
LoadCursor
A
(
0
,
(
LPCSTR
)
IDC_ARROW
);
class
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
RegisterClassA
(
&
class
);
hwnd
=
CreateWindowA
(
"gdiplus_test"
,
"graphics test"
,
WS_OVERLAPPEDWINDOW
|
WS_VISIBLE
,
...
...
dlls/gdiplus/tests/graphicspath.c
View file @
1c8d4aaa
...
...
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wine/test.h"
#include <math.h>
...
...
dlls/gdiplus/tests/image.c
View file @
1c8d4aaa
...
...
@@ -26,7 +26,7 @@
#include <stdio.h>
#include "initguid.h"
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
@@ -3809,7 +3809,7 @@ static void test_image_format(void)
else
{
expect
(
Ok
,
status
);
ret
=
GetObject
(
hbitmap
,
sizeof
(
bm
),
&
bm
);
ret
=
GetObject
W
(
hbitmap
,
sizeof
(
bm
),
&
bm
);
expect
(
sizeof
(
bm
),
ret
);
expect
(
0
,
bm
.
bmType
);
expect
(
1
,
bm
.
bmWidth
);
...
...
dlls/gdiplus/tests/matrix.c
View file @
1c8d4aaa
...
...
@@ -20,8 +20,7 @@
#include <math.h>
#include "windows.h"
#include <stdio.h>
#include "objbase.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
dlls/gdiplus/tests/metafile.c
View file @
1c8d4aaa
...
...
@@ -18,8 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windows.h"
#include <stdio.h>
#include "objbase.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
dlls/gdiplus/tests/pathiterator.c
View file @
1c8d4aaa
...
...
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
dlls/gdiplus/tests/pen.c
View file @
1c8d4aaa
...
...
@@ -20,7 +20,7 @@
#include <math.h>
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
dlls/gdiplus/tests/region.c
View file @
1c8d4aaa
...
...
@@ -18,11 +18,11 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windows.h"
#include <math.h>
#include "objbase.h"
#include "gdiplus.h"
#include "wingdi.h"
#include "wine/test.h"
#include <math.h>
#define RGNDATA_RECT 0x10000000
#define RGNDATA_PATH 0x10000001
...
...
dlls/gdiplus/tests/stringformat.c
View file @
1c8d4aaa
...
...
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "
windows
.h"
#include "
objbase
.h"
#include "gdiplus.h"
#include "wine/test.h"
...
...
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