jscript: Added Object_valueOf implementation.
This commit is contained in:
parent
7fcded1fc3
commit
3a1698ff06
|
@ -49,8 +49,16 @@ static HRESULT Object_toLocaleString(DispatchEx *dispex, LCID lcid, WORD flags,
|
|||
static HRESULT Object_valueOf(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
TRACE("\n");
|
||||
|
||||
if(retv) {
|
||||
IDispatchEx_AddRef(_IDispatchEx_(dispex));
|
||||
|
||||
V_VT(retv) = VT_DISPATCH;
|
||||
V_DISPATCH(retv) = (IDispatch*)_IDispatchEx_(dispex);
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT Object_hasOwnProperty(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
|
|
|
@ -439,6 +439,9 @@ ok(arr.sort() === arr, "arr.sort() !== arr");
|
|||
for(var i=0; i < arr.length; i++)
|
||||
ok(arr[i] === tmp[i], "arr[" + i + "] = " + arr[i] + " expected " + tmp[i]);
|
||||
|
||||
ok(arr.valueOf === Object.prototype.valueOf, "arr.valueOf !== Object.prototype.valueOf");
|
||||
ok(arr === arr.valueOf(), "arr !== arr.valueOf");
|
||||
|
||||
var num = new Number(6);
|
||||
arr = [0,1,2];
|
||||
tmp = arr.concat(3, [4,5], num);
|
||||
|
|
Loading…
Reference in New Issue