jscript: Added Math_SQRT1_2 implementations and tests.
This commit is contained in:
parent
27f327aebc
commit
e4bc0def3b
|
@ -127,8 +127,8 @@ static HRESULT Math_SQRT2(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS
|
||||||
static HRESULT Math_SQRT1_2(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
static HRESULT Math_SQRT1_2(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
|
||||||
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
|
||||||
{
|
{
|
||||||
FIXME("\n");
|
TRACE("\n");
|
||||||
return E_NOTIMPL;
|
return math_constant(M_SQRT1_2, flags, retv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ECMA-262 3rd Edition 15.8.2.12 */
|
/* ECMA-262 3rd Edition 15.8.2.12 */
|
||||||
|
|
|
@ -680,4 +680,9 @@ ok(Math.floor(Math.SQRT2*100) === 141, "Math.SQRT2 = " + Math.SQRT2);
|
||||||
Math.SQRT2 = "test";
|
Math.SQRT2 = "test";
|
||||||
ok(Math.floor(Math.SQRT2*100) === 141, "modified Math.SQRT2 = " + Math.SQRT2);
|
ok(Math.floor(Math.SQRT2*100) === 141, "modified Math.SQRT2 = " + Math.SQRT2);
|
||||||
|
|
||||||
|
ok(typeof(Math.SQRT1_2) === "number", "typeof(Math.SQRT1_2) = " + typeof(Math.SQRT1_2));
|
||||||
|
ok(Math.floor(Math.SQRT1_2*100) === 70, "Math.SQRT1_2 = " + Math.SQRT1_2);
|
||||||
|
Math.SQRT1_2 = "test";
|
||||||
|
ok(Math.floor(Math.SQRT1_2*100) === 70, "modified Math.SQRT1_2 = " + Math.SQRT1_2);
|
||||||
|
|
||||||
reportSuccess();
|
reportSuccess();
|
||||||
|
|
Loading…
Reference in New Issue