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
d54963e5
Commit
d54963e5
authored
Sep 08, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Sep 08, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comctl32: Allow a little slop in the status bar metric tests.
parent
f5e298d2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
status.c
dlls/comctl32/tests/status.c
+12
-9
No files found.
dlls/comctl32/tests/status.c
View file @
d54963e5
...
@@ -27,10 +27,13 @@
...
@@ -27,10 +27,13 @@
#define SUBCLASS_NAME "MyStatusBar"
#define SUBCLASS_NAME "MyStatusBar"
#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got)
#define expect(expected,got) ok (expected == got,"Expected %d, got %d\n",expected,got)
#define expect_rect(_left,_top,_right,_bottom,got) do { RECT _rcExp = {_left, _top, _right, _bottom}; \
#define expect_rect(_left,_top,_right,_bottom,got) do { \
ok(memcmp(&_rcExp, &(got), sizeof(RECT)) == 0, "Expected rect {%d,%d, %d,%d}, got {%d,%d, %d,%d}\n", \
RECT exp = {abs(got.left - _left), abs(got.top - _top), \
_rcExp.left, _rcExp.top, _rcExp.right, _rcExp.bottom, \
abs(got.right - _right), abs(got.bottom - _bottom)}; \
(got).left, (got).top, (got).right, (got).bottom); } while (0)
ok(exp.left <= 2 && exp.top <= 2 && exp.right <= 2 && exp.bottom <= 2, \
"Expected rect {%d,%d, %d,%d}, got {%d,%d, %d,%d}\n", \
_left, _top, _right, _bottom, \
(got).left, (got).top, (got).right, (got).bottom); } while (0)
static
HINSTANCE
hinst
;
static
HINSTANCE
hinst
;
static
WNDPROC
g_status_wndproc
;
static
WNDPROC
g_status_wndproc
;
...
@@ -166,25 +169,25 @@ static void test_height(void)
...
@@ -166,25 +169,25 @@ static void test_height(void)
ok
(
g_wmsize_count
>
0
,
"WM_SETFONT should issue WM_SIZE
\n
"
);
ok
(
g_wmsize_count
>
0
,
"WM_SETFONT should issue WM_SIZE
\n
"
);
GetClientRect
(
hwndStatus
,
&
rc2
);
GetClientRect
(
hwndStatus
,
&
rc2
);
todo_wine
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
/* GetTextMetrics returns invalid tmInternalLeading for this font */
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
/* GetTextMetrics returns invalid tmInternalLeading for this font */
g_wmsize_count
=
0
;
g_wmsize_count
=
0
;
SendMessage
(
hwndStatus
,
WM_SETFONT
,
(
WPARAM
)
hFont
,
TRUE
);
SendMessage
(
hwndStatus
,
WM_SETFONT
,
(
WPARAM
)
hFont
,
TRUE
);
ok
(
g_wmsize_count
>
0
,
"WM_SETFONT should issue WM_SIZE
\n
"
);
ok
(
g_wmsize_count
>
0
,
"WM_SETFONT should issue WM_SIZE
\n
"
);
GetClientRect
(
hwndStatus
,
&
rc2
);
GetClientRect
(
hwndStatus
,
&
rc2
);
todo_wine
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
/* minheight < fontsize - no effects*/
/* minheight < fontsize - no effects*/
SendMessage
(
hwndStatus
,
SB_SETMINHEIGHT
,
12
,
0
);
SendMessage
(
hwndStatus
,
SB_SETMINHEIGHT
,
12
,
0
);
SendMessage
(
hwndStatus
,
WM_SIZE
,
0
,
0
);
SendMessage
(
hwndStatus
,
WM_SIZE
,
0
,
0
);
GetClientRect
(
hwndStatus
,
&
rc2
);
GetClientRect
(
hwndStatus
,
&
rc2
);
todo_wine
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
/* minheight > fontsize - has an effect after WM_SIZE */
/* minheight > fontsize - has an effect after WM_SIZE */
SendMessage
(
hwndStatus
,
SB_SETMINHEIGHT
,
60
,
0
);
SendMessage
(
hwndStatus
,
SB_SETMINHEIGHT
,
60
,
0
);
GetClientRect
(
hwndStatus
,
&
rc2
);
GetClientRect
(
hwndStatus
,
&
rc2
);
todo_wine
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
SendMessage
(
hwndStatus
,
WM_SIZE
,
0
,
0
);
SendMessage
(
hwndStatus
,
WM_SIZE
,
0
,
0
);
GetClientRect
(
hwndStatus
,
&
rc2
);
GetClientRect
(
hwndStatus
,
&
rc2
);
expect_rect
(
0
,
0
,
672
,
62
,
rc2
);
expect_rect
(
0
,
0
,
672
,
62
,
rc2
);
...
@@ -194,7 +197,7 @@ static void test_height(void)
...
@@ -194,7 +197,7 @@ static void test_height(void)
expect_rect
(
0
,
0
,
672
,
62
,
rc2
);
expect_rect
(
0
,
0
,
672
,
62
,
rc2
);
SendMessage
(
hwndStatus
,
WM_SIZE
,
0
,
0
);
SendMessage
(
hwndStatus
,
WM_SIZE
,
0
,
0
);
GetClientRect
(
hwndStatus
,
&
rc2
);
GetClientRect
(
hwndStatus
,
&
rc2
);
todo_wine
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
expect_rect
(
0
,
0
,
672
,
42
,
rc2
);
hFontSm
=
CreateFont
(
9
,
0
,
0
,
0
,
FW_DONTCARE
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
hFontSm
=
CreateFont
(
9
,
0
,
0
,
0
,
FW_DONTCARE
,
FALSE
,
FALSE
,
FALSE
,
ANSI_CHARSET
,
OUT_DEFAULT_PRECIS
,
CLIP_DEFAULT_PRECIS
,
DEFAULT_QUALITY
,
FF_DONTCARE
,
"Tahoma"
);
OUT_DEFAULT_PRECIS
,
CLIP_DEFAULT_PRECIS
,
DEFAULT_QUALITY
,
FF_DONTCARE
,
"Tahoma"
);
SendMessage
(
hwndStatus
,
WM_SETFONT
,
(
WPARAM
)
hFontSm
,
TRUE
);
SendMessage
(
hwndStatus
,
WM_SETFONT
,
(
WPARAM
)
hFontSm
,
TRUE
);
...
...
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