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
13db9a16
Commit
13db9a16
authored
May 01, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
May 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Added VT_I2 tests.
parent
c9c8c616
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
0 deletions
+60
-0
jsutils.c
dlls/jscript/jsutils.c
+4
-0
run.c
dlls/jscript/tests/run.c
+56
-0
No files found.
dlls/jscript/jsutils.c
View file @
13db9a16
...
...
@@ -262,6 +262,8 @@ HRESULT to_primitive(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, VARIANT *ret
WARN
(
"failed
\n
"
);
return
throw_type_error
(
ctx
,
ei
,
JS_E_TO_PRIMITIVE
,
NULL
);
}
case
VT_I2
:
assert
(
0
);
default:
FIXME
(
"Unimplemented for vt %d
\n
"
,
V_VT
(
v
));
return
E_NOTIMPL
;
...
...
@@ -444,6 +446,8 @@ HRESULT to_number(script_ctx_t *ctx, VARIANT *v, jsexcept_t *ei, double *ret)
case
VT_BOOL
:
*
ret
=
V_BOOL
(
v
)
?
1
:
0
;
break
;
case
VT_I2
:
assert
(
0
);
default:
FIXME
(
"unimplemented for vt %d
\n
"
,
V_VT
(
v
));
return
E_NOTIMPL
;
...
...
dlls/jscript/tests/run.c
View file @
13db9a16
...
...
@@ -66,6 +66,7 @@ DEFINE_EXPECT(global_success_i);
DEFINE_EXPECT
(
global_notexists_d
);
DEFINE_EXPECT
(
global_propargput_d
);
DEFINE_EXPECT
(
global_propargput_i
);
DEFINE_EXPECT
(
global_testargtypes_i
);
DEFINE_EXPECT
(
puredisp_prop_d
);
DEFINE_EXPECT
(
puredisp_noprop_d
);
DEFINE_EXPECT
(
testobj_delete
);
...
...
@@ -99,6 +100,9 @@ DEFINE_EXPECT(DeleteMemberByDispID);
#define DISPID_GLOBAL_TESTPROPDELETE 0x1010
#define DISPID_GLOBAL_ISNULLBSTR 0x1011
#define DISPID_GLOBAL_PROPARGPUT 0x1012
#define DISPID_GLOBAL_SHORTPROP 0x1013
#define DISPID_GLOBAL_GETSHORT 0x1014
#define DISPID_GLOBAL_TESTARGTYPES 0x1015
#define DISPID_TESTOBJ_PROP 0x2000
#define DISPID_TESTOBJ_ONLYDISPID 0x2001
...
...
@@ -519,6 +523,21 @@ static HRESULT WINAPI Global_GetDispID(IDispatchEx *iface, BSTR bstrName, DWORD
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"shortProp"
))
{
*
pid
=
DISPID_GLOBAL_SHORTPROP
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"getShort"
))
{
*
pid
=
DISPID_GLOBAL_GETSHORT
;
return
S_OK
;
}
if
(
!
strcmp_wa
(
bstrName
,
"testArgTypes"
))
{
*
pid
=
DISPID_GLOBAL_TESTARGTYPES
;
return
S_OK
;
}
if
(
strict_dispid_check
&&
strcmp_wa
(
bstrName
,
"t"
))
ok
(
0
,
"unexpected call %s
\n
"
,
wine_dbgstr_w
(
bstrName
));
return
DISP_E_UNKNOWNNAME
;
...
...
@@ -903,6 +922,39 @@ static HRESULT WINAPI Global_InvokeEx(IDispatchEx *iface, DISPID id, LCID lcid,
IDispatchEx_Release
(
dispex
);
return
S_OK
;
}
case
DISPID_GLOBAL_SHORTPROP
:
case
DISPID_GLOBAL_GETSHORT
:
V_VT
(
pvarRes
)
=
VT_I2
;
V_I2
(
pvarRes
)
=
10
;
return
S_OK
;
case
DISPID_GLOBAL_TESTARGTYPES
:
{
VARIANT
args
[
1
];
DISPPARAMS
dp
=
{
args
,
NULL
,
1
,
0
};
HRESULT
hres
;
CHECK_EXPECT
(
global_testargtypes_i
);
ok
(
wFlags
==
DISPATCH_METHOD
,
"wFlags = %x
\n
"
,
wFlags
);
ok
(
pdp
!=
NULL
,
"pdp == NULL
\n
"
);
ok
(
pdp
->
rgvarg
!=
NULL
,
"rgvarg != NULL
\n
"
);
ok
(
pdp
->
cArgs
==
3
,
"cArgs = %d
\n
"
,
pdp
->
cArgs
);
ok
(
!
pvarRes
,
"pvarRes != NULL
\n
"
);
ok
(
V_VT
(
pdp
->
rgvarg
+
1
)
==
VT_I4
,
"V_VT(psp->rgvargs+1) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
ok
(
V_I4
(
pdp
->
rgvarg
+
1
)
==
10
,
"V_I4(psp->rgvargs+1) = %d
\n
"
,
V_I4
(
pdp
->
rgvarg
));
ok
(
V_VT
(
pdp
->
rgvarg
+
2
)
==
VT_I4
,
"V_VT(psp->rgvargs+2) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
+
1
));
ok
(
V_I4
(
pdp
->
rgvarg
+
2
)
==
10
,
"V_I4(psp->rgvargs+2) = %d
\n
"
,
V_I4
(
pdp
->
rgvarg
+
1
));
ok
(
V_VT
(
pdp
->
rgvarg
)
==
VT_DISPATCH
,
"V_VT(psp->rgvargs) = %d
\n
"
,
V_VT
(
pdp
->
rgvarg
));
V_VT
(
args
)
=
VT_I2
;
V_I2
(
args
)
=
2
;
hres
=
IDispatch_Invoke
(
V_DISPATCH
(
pdp
->
rgvarg
),
DISPID_VALUE
,
&
IID_NULL
,
0
,
DISPATCH_METHOD
,
&
dp
,
NULL
,
NULL
,
NULL
);
ok
(
hres
==
S_OK
,
"Invoke failed: %08x
\n
"
,
hres
);
return
S_OK
;
}
}
ok
(
0
,
"unexpected call %x
\n
"
,
id
);
...
...
@@ -1659,6 +1711,10 @@ static BOOL run_tests(void)
CHECK_CALLED
(
global_propargput_d
);
CHECK_CALLED
(
global_propargput_i
);
SET_EXPECT
(
global_testargtypes_i
);
parse_script_a
(
"testArgTypes(getShort(), shortProp, function(s) {ok(getVT(s) === 'VT_I4', 'not VT_I4');});"
);
CHECK_CALLED
(
global_testargtypes_i
);
run_from_res
(
"lang.js"
);
run_from_res
(
"api.js"
);
run_from_res
(
"regexp.js"
);
...
...
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