jscript: Added Array.toString implementation.
This commit is contained in:
parent
f62dd2a9fd
commit
8b13719cd2
|
@ -279,11 +279,18 @@ static HRESULT Array_splice(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAM
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
/* ECMA-262 3rd Edition 15.4.4.2 */
|
||||
static HRESULT Array_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
TRACE("\n");
|
||||
|
||||
if(!is_class(dispex, JSCLASS_ARRAY)) {
|
||||
WARN("not Array object\n");
|
||||
return E_FAIL;
|
||||
}
|
||||
|
||||
return array_join(dispex, lcid, ((ArrayInstance*)dispex)->length, default_separatorW, retv, ei, sp);
|
||||
}
|
||||
|
||||
static HRESULT Array_toLocaleString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
|
|
|
@ -79,4 +79,9 @@ ok(tmp === "1;2;;false;;;a", "arr.join(';') = " + tmp);
|
|||
tmp = arr.join("");
|
||||
ok(tmp === "12falsea", "arr.join('') = " + tmp);
|
||||
|
||||
tmp = arr.toString();
|
||||
ok(tmp === "1,2,,false,,,a", "arr.toString() = " + tmp);
|
||||
tmp = arr.toString("test");
|
||||
ok(tmp === "1,2,,false,,,a", "arr.toString() = " + tmp);
|
||||
|
||||
reportSuccess();
|
||||
|
|
Loading…
Reference in New Issue