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
c2f94b84
Commit
c2f94b84
authored
Jan 14, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript/tests: Use wide char strings in a few more places.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1670e6e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
17 deletions
+13
-17
run.c
dlls/jscript/tests/run.c
+13
-17
No files found.
dlls/jscript/tests/run.c
View file @
c2f94b84
...
...
@@ -167,10 +167,6 @@ DEFINE_EXPECT(BindHandler);
#define JS_E_OUT_OF_MEMORY 0x800a03ec
#define JS_E_INVALID_CHAR 0x800a03f6
static
const
WCHAR
testW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
0
};
static
const
WCHAR
test_valW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'V'
,
'a'
,
'l'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
static
BOOL
strict_dispid_check
,
testing_expr
;
static
const
char
*
test_name
=
"(null)"
;
static
IDispatch
*
script_disp
;
...
...
@@ -1673,9 +1669,9 @@ static HRESULT WINAPI ActiveScriptSite_GetItemInfo(IActiveScriptSite *iface, LPC
ok
(
dwReturnMask
==
SCRIPTINFO_IUNKNOWN
,
"unexpected dwReturnMask %x
\n
"
,
dwReturnMask
);
ok
(
!
ppti
,
"ppti != NULL
\n
"
);
if
(
!
lstrcmpW
(
pstrName
,
test_valW
))
if
(
!
lstrcmpW
(
pstrName
,
L"testVal"
))
CHECK_EXPECT
(
GetItemInfo_testVal
);
else
if
(
lstrcmpW
(
pstrName
,
testW
))
else
if
(
lstrcmpW
(
pstrName
,
L"test"
))
ok
(
0
,
"unexpected pstrName %s
\n
"
,
wine_dbgstr_w
(
pstrName
));
*
ppiunkItem
=
(
IUnknown
*
)
&
Global
;
...
...
@@ -1820,7 +1816,7 @@ static HRESULT parse_script(DWORD flags, const WCHAR *script_str)
hres
=
IActiveScript_SetScriptSite
(
engine
,
&
ActiveScriptSite
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
testW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"test"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
flags
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
...
...
@@ -1871,7 +1867,7 @@ static HRESULT invoke_procedure(const WCHAR *args, const WCHAR *source, DISPPARA
hres
=
IActiveScript_QueryInterface
(
engine
,
&
IID_IActiveScriptParseProcedure2
,
(
void
**
)
&
parse_proc
);
ok
(
hres
==
S_OK
,
"Could not get IActiveScriptParse: %08x
\n
"
,
hres
);
hres
=
IActiveScriptParseProcedure2_ParseProcedureText
(
parse_proc
,
source
,
args
,
emptyW
,
NULL
,
NULL
,
NULL
,
0
,
0
,
hres
=
IActiveScriptParseProcedure2_ParseProcedureText
(
parse_proc
,
source
,
args
,
L""
,
NULL
,
NULL
,
NULL
,
0
,
0
,
SCRIPTPROC_HOSTMANAGESSOURCE
|
SCRIPTPROC_IMPLICIT_THIS
|
SCRIPTPROC_IMPLICIT_PARENTS
,
&
disp
);
ok
(
hres
==
S_OK
,
"ParseProcedureText failed: %08x
\n
"
,
hres
);
...
...
@@ -1916,7 +1912,7 @@ static HRESULT parse_htmlscript(const WCHAR *script_str)
hres
=
IActiveScript_SetScriptSite
(
engine
,
&
ActiveScriptSite
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
testW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"test"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
...
...
@@ -2044,7 +2040,7 @@ static void parse_script_with_error(DWORD flags, const WCHAR *script_str, SCODE
hres
=
IActiveScript_SetScriptSite
(
engine
,
&
ActiveScriptSite_CheckError
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
testW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"test"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
flags
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
...
...
@@ -2205,7 +2201,7 @@ static void test_isvisible(BOOL global_members)
if
(
global_members
)
SET_EXPECT
(
GetItemInfo_testVal
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
test_valW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"testVal"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
(
global_members
?
SCRIPTITEM_GLOBALMEMBERS
:
0
));
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
...
...
@@ -2249,7 +2245,7 @@ static void test_start(void)
hres
=
IActiveScript_SetScriptSite
(
engine
,
&
ActiveScriptSite
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
testW
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"test"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
str
=
SysAllocString
(
L"ok(getScriptState() === 5,
\"
getScriptState =
\"
+ getScriptState());
\n
"
...
...
@@ -2290,7 +2286,7 @@ static void test_automagic(void)
hres
=
IActiveScript_SetScriptSite
(
engine
,
&
ActiveScriptSite
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
testW
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"test"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
str
=
SysAllocString
(
L"function bindEventHandler::eventName() {}
\n
"
...
...
@@ -2333,7 +2329,7 @@ static HRESULT parse_script_expr(const WCHAR *expr, VARIANT *res, IActiveScript
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
SET_EXPECT
(
GetItemInfo_testVal
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
test_valW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"testVal"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
GetItemInfo_testVal
);
...
...
@@ -2375,7 +2371,7 @@ static void test_retval(void)
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
SET_EXPECT
(
GetItemInfo_testVal
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
test_valW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"testVal"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
GetItemInfo_testVal
);
...
...
@@ -2558,7 +2554,7 @@ static void test_eval(void)
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
SET_EXPECT
(
GetItemInfo_testVal
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
test_valW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"testVal"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
|
SCRIPTITEM_GLOBALMEMBERS
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
CHECK_CALLED
(
GetItemInfo_testVal
);
...
...
@@ -3211,7 +3207,7 @@ static void run_benchmark(const char *script_name)
hres
=
IActiveScript_SetScriptSite
(
engine
,
&
ActiveScriptSite
);
ok
(
hres
==
S_OK
,
"SetScriptSite failed: %08x
\n
"
,
hres
);
hres
=
IActiveScript_AddNamedItem
(
engine
,
testW
,
hres
=
IActiveScript_AddNamedItem
(
engine
,
L"test"
,
SCRIPTITEM_ISVISIBLE
|
SCRIPTITEM_ISSOURCE
);
ok
(
hres
==
S_OK
,
"AddNamedItem failed: %08x
\n
"
,
hres
);
...
...
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