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
76ee788a
Commit
76ee788a
authored
Jun 19, 2008
by
Dan Hipschman
Committed by
Alexandre Julliard
Jun 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/tests: Add tests for OLE interface.
parent
fb140649
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
1 deletion
+77
-1
Makefile.in
dlls/riched20/tests/Makefile.in
+2
-1
richole.c
dlls/riched20/tests/richole.c
+75
-0
No files found.
dlls/riched20/tests/Makefile.in
View file @
76ee788a
...
...
@@ -6,7 +6,8 @@ TESTDLL = riched20.dll
IMPORTS
=
ole32 user32 gdi32 kernel32
CTESTS
=
\
editor.c
editor.c
\
richole.c
@MAKE_TEST_RULES@
...
...
dlls/riched20/tests/richole.c
0 → 100644
View file @
76ee788a
/*
* Tests for IRichEditOle and friends.
*
* Copyright 2008 Google (Dan Hipschman)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <stdarg.h>
#include <assert.h>
#include <windef.h>
#include <winbase.h>
#include <wingdi.h>
#include <winuser.h>
#include <ole2.h>
#include <richedit.h>
#include <richole.h>
#include <wine/test.h>
static
HMODULE
hmoduleRichEdit
;
static
HWND
new_window
(
LPCTSTR
lpClassName
,
DWORD
dwStyle
,
HWND
parent
)
{
HWND
hwnd
=
CreateWindow
(
lpClassName
,
NULL
,
dwStyle
|
WS_POPUP
|
WS_HSCROLL
|
WS_VSCROLL
|
WS_VISIBLE
,
0
,
0
,
200
,
60
,
parent
,
NULL
,
hmoduleRichEdit
,
NULL
);
ok
(
hwnd
!=
NULL
,
"class: %s, error: %d
\n
"
,
lpClassName
,
(
int
)
GetLastError
());
return
hwnd
;
}
static
HWND
new_richedit
(
HWND
parent
)
{
return
new_window
(
RICHEDIT_CLASS
,
ES_MULTILINE
,
parent
);
}
START_TEST
(
richole
)
{
IRichEditOle
*
reOle
=
NULL
;
LRESULT
res
;
HWND
w
;
/* Must explicitly LoadLibrary(). The test has no references to functions in
* RICHED20.DLL, so the linker doesn't actually link to it. */
hmoduleRichEdit
=
LoadLibrary
(
"RICHED20.DLL"
);
ok
(
hmoduleRichEdit
!=
NULL
,
"error: %d
\n
"
,
(
int
)
GetLastError
());
w
=
new_richedit
(
NULL
);
if
(
!
w
)
{
skip
(
"Couldn't create window
\n
"
);
return
;
}
res
=
SendMessage
(
w
,
EM_GETOLEINTERFACE
,
0
,
(
LPARAM
)
&
reOle
);
ok
(
res
,
"SendMessage
\n
"
);
ok
(
reOle
!=
NULL
,
"EM_GETOLEINTERFACE
\n
"
);
IUnknown_Release
(
reOle
);
DestroyWindow
(
w
);
}
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