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
e36f326f
Commit
e36f326f
authored
Jul 19, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Fixed coordinates matching to use a relative error.
parent
b5a5db91
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
mapping.c
dlls/gdi32/tests/mapping.c
+9
-9
No files found.
dlls/gdi32/tests/mapping.c
View file @
e36f326f
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "winuser.h"
#include "winuser.h"
#include "winerror.h"
#include "winerror.h"
#define rough_match(got, expected) (abs(
(got) - (expected
)) <= 5)
#define rough_match(got, expected) (abs(
MulDiv( (got) - (expected), 1000, (expected)
)) <= 5)
#define expect_LPtoDP(_hdc, _x, _y) \
#define expect_LPtoDP(_hdc, _x, _y) \
{ \
{ \
...
@@ -121,11 +121,11 @@ static void test_world_transform(void)
...
@@ -121,11 +121,11 @@ static void test_world_transform(void)
{
{
expect_viewport_ext
(
hdc
,
res_x
,
-
res_y
);
expect_viewport_ext
(
hdc
,
res_x
,
-
res_y
);
ok
(
GetWindowExtEx
(
hdc
,
&
size
),
"GetWindowExtEx failed
\n
"
);
ok
(
GetWindowExtEx
(
hdc
,
&
size
),
"GetWindowExtEx failed
\n
"
);
ok
(
size
.
cx
==
size_cx
*
10
||
ok
(
rough_match
(
size
.
cx
,
size_cx
*
10
)
||
size
.
cx
==
MulDiv
(
res_x
,
254
,
dpi_x
),
/* Vista uses a more precise method */
rough_match
(
size
.
cx
,
MulDiv
(
res_x
,
254
,
dpi_x
)
),
/* Vista uses a more precise method */
"expected cx %d or %d, got %d
\n
"
,
size_cx
*
10
,
MulDiv
(
res_x
,
254
,
dpi_x
),
size
.
cx
);
"expected cx %d or %d, got %d
\n
"
,
size_cx
*
10
,
MulDiv
(
res_x
,
254
,
dpi_x
),
size
.
cx
);
ok
(
size
.
cy
==
size_cy
*
10
||
ok
(
rough_match
(
size
.
cy
,
size_cy
*
10
)
||
size
.
cy
==
MulDiv
(
res_y
,
254
,
dpi_y
),
/* Vista uses a more precise method */
rough_match
(
size
.
cy
,
MulDiv
(
res_y
,
254
,
dpi_y
)
),
/* Vista uses a more precise method */
"expected cy %d or %d, got %d
\n
"
,
size_cy
*
10
,
MulDiv
(
res_y
,
254
,
dpi_y
),
size
.
cy
);
"expected cy %d or %d, got %d
\n
"
,
size_cy
*
10
,
MulDiv
(
res_y
,
254
,
dpi_y
),
size
.
cy
);
}
}
expect_world_trasform
(
hdc
,
1
.
0
,
1
.
0
);
expect_world_trasform
(
hdc
,
1
.
0
,
1
.
0
);
...
@@ -186,11 +186,11 @@ static void test_world_transform(void)
...
@@ -186,11 +186,11 @@ static void test_world_transform(void)
expect_viewport_ext
(
hdc
,
res_x
,
-
res_y
);
expect_viewport_ext
(
hdc
,
res_x
,
-
res_y
);
ok
(
GetWindowExtEx
(
hdc
,
&
size
),
"GetWindowExtEx failed
\n
"
);
ok
(
GetWindowExtEx
(
hdc
,
&
size
),
"GetWindowExtEx failed
\n
"
);
ok
(
size
.
cx
==
size_cx
*
10
||
ok
(
rough_match
(
size
.
cx
,
size_cx
*
10
)
||
size
.
cx
==
MulDiv
(
res_x
,
254
,
dpi_x
),
/* Vista uses a more precise method */
rough_match
(
size
.
cx
,
MulDiv
(
res_x
,
254
,
dpi_x
)
),
/* Vista uses a more precise method */
"expected cx %d or %d, got %d
\n
"
,
size_cx
*
10
,
MulDiv
(
res_x
,
254
,
dpi_x
),
size
.
cx
);
"expected cx %d or %d, got %d
\n
"
,
size_cx
*
10
,
MulDiv
(
res_x
,
254
,
dpi_x
),
size
.
cx
);
ok
(
size
.
cy
==
size_cy
*
10
||
ok
(
rough_match
(
size
.
cy
,
size_cy
*
10
)
||
size
.
cy
==
MulDiv
(
res_y
,
254
,
dpi_y
),
/* Vista uses a more precise method */
rough_match
(
size
.
cy
,
MulDiv
(
res_y
,
254
,
dpi_y
)
),
/* Vista uses a more precise method */
"expected cy %d or %d, got %d
\n
"
,
size_cy
*
10
,
MulDiv
(
res_y
,
254
,
dpi_y
),
size
.
cy
);
"expected cy %d or %d, got %d
\n
"
,
size_cy
*
10
,
MulDiv
(
res_y
,
254
,
dpi_y
),
size
.
cy
);
expect_world_trasform
(
hdc
,
20
.
0
,
20
.
0
);
expect_world_trasform
(
hdc
,
20
.
0
,
20
.
0
);
expect_LPtoDP
(
hdc
,
MulDiv
(
20000
,
res_x
,
size
.
cx
),
-
MulDiv
(
20000
,
res_y
,
size
.
cy
));
expect_LPtoDP
(
hdc
,
MulDiv
(
20000
,
res_x
,
size
.
cx
),
-
MulDiv
(
20000
,
res_y
,
size
.
cy
));
...
...
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