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
fd806a65
Commit
fd806a65
authored
May 21, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
May 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20/tests: Added tests for ITextFont getters on detached font.
parent
6fcb092f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
3 deletions
+76
-3
richole.c
dlls/riched20/richole.c
+3
-1
richole.c
dlls/riched20/tests/richole.c
+73
-2
No files found.
dlls/riched20/richole.c
View file @
fd806a65
...
...
@@ -3163,9 +3163,11 @@ static HRESULT WINAPI ITextSelection_fnGetText(ITextSelection *me, BSTR *pbstr)
int
nChars
,
endOfs
;
BOOL
bEOP
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pbstr
);
if
(
!
This
->
reOle
)
return
CO_E_RELEASED
;
TRACE
(
"%p
\n
"
,
pbstr
);
if
(
!
pbstr
)
return
E_INVALIDARG
;
...
...
dlls/riched20/tests/richole.c
View file @
fd806a65
...
...
@@ -520,7 +520,15 @@ static void test_ITextSelection_GetText(void)
ok
(
hres
==
S_OK
,
"ITextSelection_GetText
\n
"
);
ok
(
!
bstr
,
"got wrong text: %s
\n
"
,
wine_dbgstr_w
(
bstr
));
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
&
txtSel
);
release_interfaces
(
&
w
,
&
reOle
,
&
txtDoc
,
NULL
);
hres
=
ITextSelection_GetText
(
txtSel
,
&
bstr
);
ok
(
hres
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hres
);
hres
=
ITextSelection_GetText
(
txtSel
,
NULL
);
ok
(
hres
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hres
);
ITextSelection_Release
(
txtSel
);
}
static
void
test_ITextDocument_Range
(
void
)
...
...
@@ -1432,6 +1440,8 @@ static void test_ITextFont(void)
ITextRange
*
range
=
NULL
;
ITextFont
*
font
;
CHARFORMAT2A
cf
;
LONG
value
;
float
size
;
HRESULT
hr
;
HWND
hwnd
;
BOOL
ret
;
...
...
@@ -1494,9 +1504,70 @@ static void test_ITextFont(void)
ok
(
!
lstrcmpW
(
str
,
arialW
),
"got %s
\n
"
,
wine_dbgstr_w
(
str
));
SysFreeString
(
str
);
ITextFont_Release
(
font
);
ITextRange_Release
(
range
);
release_interfaces
(
&
hwnd
,
&
reOle
,
&
doc
,
NULL
);
hr
=
ITextFont_GetBold
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetBold
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetForeColor
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetForeColor
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetItalic
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetItalic
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetLanguageID
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetLanguageID
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetName
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetName
(
font
,
&
str
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetSize
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetSize
(
font
,
&
size
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetStrikeThrough
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetStrikeThrough
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetSubscript
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetSubscript
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetSuperscript
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetSuperscript
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetUnderline
(
font
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got 0x%08x
\n
"
,
hr
);
hr
=
ITextFont_GetUnderline
(
font
,
&
value
);
ok
(
hr
==
CO_E_RELEASED
,
"got 0x%08x
\n
"
,
hr
);
ITextFont_Release
(
font
);
}
START_TEST
(
richole
)
...
...
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