jscript: Added Math.E implementation.

This commit is contained in:
Jacek Caban 2008-12-11 12:27:52 +01:00 committed by Alexandre Julliard
parent 0e8bcbd9de
commit da03e6779d
2 changed files with 8 additions and 2 deletions

View File

@ -69,11 +69,12 @@ static HRESULT math_constant(DOUBLE val, WORD flags, VARIANT *retv)
return E_NOTIMPL;
}
/* ECMA-262 3rd Edition 15.8.1.1 */
static HRESULT Math_E(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
FIXME("\n");
return E_NOTIMPL;
TRACE("\n");
return math_constant(M_E, flags, retv);
}
static HRESULT Math_LOG2E(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp,

View File

@ -614,4 +614,9 @@ ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
Math.PI = "test";
ok(Math.floor(Math.PI*100) === 314, "modified Math.PI = " + Math.PI);
ok(typeof(Math.E) === "number", "typeof(Math.E) = " + typeof(Math.E));
ok(Math.floor(Math.E*100) === 271, "Math.E = " + Math.E);
Math.E = "test";
ok(Math.floor(Math.E*100) === 271, "modified Math.E = " + Math.E);
reportSuccess();