jscript: Added String.valueOf implementation.
This commit is contained in:
parent
304e9fe0d4
commit
1388a6f421
|
@ -114,11 +114,13 @@ static HRESULT String_toString(DispatchEx *dispex, LCID lcid, WORD flags, DISPPA
|
|||
return S_OK;
|
||||
}
|
||||
|
||||
/* ECMA-262 3rd Edition 15.5.4.2 */
|
||||
static HRESULT String_valueOf(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||
{
|
||||
FIXME("\n");
|
||||
return E_NOTIMPL;
|
||||
TRACE("\n");
|
||||
|
||||
return String_toString(dispex, lcid, flags, dp, retv, ei, sp);
|
||||
}
|
||||
|
||||
static HRESULT String_anchor(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||
|
|
|
@ -33,6 +33,13 @@ ok(tmp === "test", "''.toString() = " + tmp);
|
|||
tmp = "test".toString(3);
|
||||
ok(tmp === "test", "''.toString(3) = " + tmp);
|
||||
|
||||
tmp = "".valueOf();
|
||||
ok(tmp === "", "''.valueOf() = " + tmp);
|
||||
tmp = "test".valueOf();
|
||||
ok(tmp === "test", "''.valueOf() = " + tmp);
|
||||
tmp = "test".valueOf(3);
|
||||
ok(tmp === "test", "''.valueOf(3) = " + tmp);
|
||||
|
||||
tmp = "abc".charAt(0);
|
||||
ok(tmp === "a", "'abc',charAt(0) = " + tmp);
|
||||
tmp = "abc".charAt(1);
|
||||
|
|
Loading…
Reference in New Issue