jscript: Added Math_SQRT1_2 implementations and tests.

This commit is contained in:
Piotr Caban 2009-05-24 21:07:22 +02:00 committed by Alexandre Julliard
parent 27f327aebc
commit e4bc0def3b
2 changed files with 7 additions and 2 deletions

View File

@ -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 */

View File

@ -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();