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
3beb0060
Commit
3beb0060
authored
Feb 16, 2016
by
Jactry Zeng
Committed by
Alexandre Julliard
Feb 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched32/tests: Simplify tests with todo_wine_if.
Signed-off-by:
Jactry Zeng
<
jzeng@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
25d999d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
26 deletions
+13
-26
editor.c
dlls/riched32/tests/editor.c
+13
-26
No files found.
dlls/riched32/tests/editor.c
View file @
3beb0060
...
...
@@ -527,12 +527,9 @@ static void test_EM_LINELENGTH(void)
SendMessageA
(
hwndRichEdit
,
WM_SETTEXT
,
0
,
(
LPARAM
)
text1
);
for
(
i
=
0
;
i
<
sizeof
(
offset_test1
)
/
sizeof
(
offset_test1
[
0
]);
i
++
)
{
result
=
SendMessageA
(
hwndRichEdit
,
EM_LINELENGTH
,
offset_test1
[
i
][
0
],
0
);
if
(
offset_test1
[
i
][
2
])
todo_wine
ok
(
result
==
offset_test1
[
i
][
1
],
"Length of line at offset %d is %ld, expected %d
\n
"
,
offset_test1
[
i
][
0
],
result
,
offset_test1
[
i
][
1
]);
else
ok
(
result
==
offset_test1
[
i
][
1
],
"Length of line at offset %d is %ld, expected %d
\n
"
,
offset_test1
[
i
][
0
],
result
,
offset_test1
[
i
][
1
]);
todo_wine_if
(
offset_test1
[
i
][
2
])
ok
(
result
==
offset_test1
[
i
][
1
],
"Length of line at offset %d is %ld, expected %d
\n
"
,
offset_test1
[
i
][
0
],
result
,
offset_test1
[
i
][
1
]);
}
}
...
...
@@ -1309,20 +1306,15 @@ static void check_EM_EXSETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id
cr
.
cpMax
=
setsel
->
max
;
result
=
SendMessageA
(
hwnd
,
EM_EXSETSEL
,
0
,
(
LPARAM
)
&
cr
);
if
(
setsel
->
result_todo
)
todo_wine
ok
(
result
==
setsel
->
expected_retval
,
"EM_EXSETSEL(%d): expected: %ld actual: %ld
\n
"
,
id
,
setsel
->
expected_retval
,
result
);
else
todo_wine_if
(
setsel
->
result_todo
)
ok
(
result
==
setsel
->
expected_retval
,
"EM_EXSETSEL(%d): expected: %ld actual: %ld
\n
"
,
id
,
setsel
->
expected_retval
,
result
);
SendMessageA
(
hwnd
,
EM_GETSEL
,
(
WPARAM
)
&
start
,
(
LPARAM
)
&
end
);
if
(
setsel
->
sel_todo
)
{
todo_wine
{
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_EXSETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
}
else
{
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_EXSETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
todo_wine_if
(
setsel
->
sel_todo
)
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_EXSETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
static
void
test_EM_EXSETSEL
(
void
)
...
...
@@ -1370,20 +1362,15 @@ static void check_EM_SETSEL(HWND hwnd, const struct exsetsel_s *setsel, int id)
result
=
SendMessageA
(
hwnd
,
EM_SETSEL
,
setsel
->
min
,
setsel
->
max
);
if
(
setsel
->
result_todo
)
todo_wine
ok
(
result
==
setsel
->
expected_retval
,
"EM_SETSEL(%d): expected: %ld actual: %ld
\n
"
,
id
,
setsel
->
expected_retval
,
result
);
else
todo_wine_if
(
setsel
->
result_todo
)
ok
(
result
==
setsel
->
expected_retval
,
"EM_SETSEL(%d): expected: %ld actual: %ld
\n
"
,
id
,
setsel
->
expected_retval
,
result
);
SendMessageA
(
hwnd
,
EM_GETSEL
,
(
WPARAM
)
&
start
,
(
LPARAM
)
&
end
);
if
(
setsel
->
sel_todo
)
{
todo_wine
{
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_SETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
}
else
{
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_SETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
todo_wine_if
(
setsel
->
sel_todo
)
ok
(
start
==
setsel
->
expected_getsel_start
&&
end
==
setsel
->
expected_getsel_end
,
"EM_SETSEL(%d): expected (%d,%d) actual:(%d,%d)
\n
"
,
id
,
setsel
->
expected_getsel_start
,
setsel
->
expected_getsel_end
,
start
,
end
);
}
static
void
test_EM_SETSEL
(
void
)
...
...
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