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
79361d3b
Commit
79361d3b
authored
Oct 15, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 15, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added a test of DeleteMembedByDispID returning an error.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fca68243
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
run.c
dlls/jscript/tests/run.c
+31
-2
No files found.
dlls/jscript/tests/run.c
View file @
79361d3b
...
...
@@ -84,6 +84,7 @@ DEFINE_EXPECT(global_propputref_d);
DEFINE_EXPECT
(
global_propputref_i
);
DEFINE_EXPECT
(
global_propdelete_d
);
DEFINE_EXPECT
(
global_nopropdelete_d
);
DEFINE_EXPECT
(
global_propdeleteerror_d
);
DEFINE_EXPECT
(
global_success_d
);
DEFINE_EXPECT
(
global_success_i
);
DEFINE_EXPECT
(
global_notexists_d
);
...
...
@@ -110,6 +111,7 @@ DEFINE_EXPECT(ActiveScriptSite_OnScriptError);
DEFINE_EXPECT
(
invoke_func
);
DEFINE_EXPECT
(
DeleteMemberByDispID
);
DEFINE_EXPECT
(
DeleteMemberByDispID_false
);
DEFINE_EXPECT
(
DeleteMemberByDispID_error
);
DEFINE_EXPECT
(
BindHandler
);
#define DISPID_GLOBAL_TESTPROPGET 0x1000
...
...
@@ -143,8 +145,9 @@ DEFINE_EXPECT(BindHandler);
#define DISPID_GLOBAL_GETSCRIPTSTATE 0x101c
#define DISPID_GLOBAL_BINDEVENTHANDLER 0x101d
#define DISPID_GLOBAL_TESTPROPDELETE 0x2000
#define DISPID_GLOBAL_TESTNOPROPDELETE 0x2001
#define DISPID_GLOBAL_TESTPROPDELETE 0x2000
#define DISPID_GLOBAL_TESTNOPROPDELETE 0x2001
#define DISPID_GLOBAL_TESTPROPDELETEERROR 0x2002
#define DISPID_TESTOBJ_PROP 0x2000
#define DISPID_TESTOBJ_ONLYDISPID 0x2001
...
...
@@ -709,6 +712,12 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
*
pid
=
DISPID_GLOBAL_TESTNOPROPDELETE
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"testPropDeleteError"
))
{
CHECK_EXPECT
(
global_propdeleteerror_d
);
test_grfdex
(
grfdex
,
fdexNameCaseSensitive
);
*
pid
=
DISPID_GLOBAL_TESTPROPDELETEERROR
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"getVT"
))
{
test_grfdex
(
grfdex
,
fdexNameCaseSensitive
);
*
pid
=
DISPID_GLOBAL_GETVT
;
...
...
@@ -1361,6 +1370,9 @@ static HRESULT WINAPI Global_DeleteMemberByDispID(IDispatchEx *iface, DISPID id)
case
DISPID_GLOBAL_TESTNOPROPDELETE
:
CHECK_EXPECT
(
DeleteMemberByDispID_false
);
return
S_FALSE
;
case
DISPID_GLOBAL_TESTPROPDELETEERROR
:
CHECK_EXPECT
(
DeleteMemberByDispID_error
);
return
E_FAIL
;
default:
ok
(
0
,
"id = %d
\n
"
,
id
);
}
...
...
@@ -1848,6 +1860,17 @@ static void parse_script_a(const char *src)
parse_script_af
(
SCRIPTITEM_GLOBALMEMBERS
,
src
);
}
static
void
parse_script_ae
(
const
char
*
src
,
HRESULT
exhres
)
{
BSTR
tmp
;
HRESULT
hres
;
tmp
=
a2bstr
(
src
);
hres
=
parse_script
(
SCRIPTITEM_GLOBALMEMBERS
,
tmp
);
SysFreeString
(
tmp
);
ok
(
hres
==
exhres
,
"parse_script failed: %08x, expected %08x
\n
"
,
hres
,
exhres
);
}
static
void
parse_script_with_error_a
(
const
char
*
src
,
SCODE
errorcode
,
ULONG
line
,
LONG
pos
,
LPCSTR
source
,
LPCSTR
desc
,
LPCSTR
linetext
)
{
BSTR
tmp
,
script_source
,
description
,
line_text
;
...
...
@@ -2448,6 +2471,12 @@ static BOOL run_tests(void)
CHECK_CALLED
(
global_nopropdelete_d
);
CHECK_CALLED
(
DeleteMemberByDispID_false
);
SET_EXPECT
(
global_propdeleteerror_d
);
SET_EXPECT
(
DeleteMemberByDispID_error
);
parse_script_ae
(
"delete testPropDeleteError;"
,
E_FAIL
);
CHECK_CALLED
(
global_propdeleteerror_d
);
CHECK_CALLED
(
DeleteMemberByDispID_error
);
SET_EXPECT
(
puredisp_prop_d
);
parse_script_a
(
"ok((delete pureDisp.prop) === false, 'delete pureDisp.prop did not return true');"
);
CHECK_CALLED
(
puredisp_prop_d
);
...
...
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