Commit 1ef80d5c authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

jscript: Added Math_LN10 implementation and tests.

parent b050c206
...@@ -105,8 +105,8 @@ static HRESULT Math_LN2(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d ...@@ -105,8 +105,8 @@ static HRESULT Math_LN2(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *d
static HRESULT Math_LN10(DispatchEx *dispex, LCID lcid, WORD flags, DISPPARAMS *dp, static HRESULT Math_LN10(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_LN10, flags, retv);
} }
/* ECMA-262 3rd Edition 15.8.1.6 */ /* ECMA-262 3rd Edition 15.8.1.6 */
......
...@@ -708,6 +708,11 @@ ok(Math.floor(Math.LN2*100) === 69, "Math.LN2 = " + Math.LN2); ...@@ -708,6 +708,11 @@ ok(Math.floor(Math.LN2*100) === 69, "Math.LN2 = " + Math.LN2);
Math.LN2 = "test"; Math.LN2 = "test";
ok(Math.floor(Math.LN2*100) === 69, "modified Math.LN2 = " + Math.LN2); ok(Math.floor(Math.LN2*100) === 69, "modified Math.LN2 = " + Math.LN2);
ok(typeof(Math.LN10) === "number", "typeof(Math.LN10) = " + typeof(Math.LN10));
ok(Math.floor(Math.LN10*100) === 230, "Math.LN10 = " + Math.LN10);
Math.LN10 = "test";
ok(Math.floor(Math.LN10*100) === 230, "modified Math.LN10 = " + Math.LN10);
ok(typeof(Math.SQRT2) === "number", "typeof(Math.SQRT2) = " + typeof(Math.SQRT2)); ok(typeof(Math.SQRT2) === "number", "typeof(Math.SQRT2) = " + typeof(Math.SQRT2));
ok(Math.floor(Math.SQRT2*100) === 141, "Math.SQRT2 = " + Math.SQRT2); ok(Math.floor(Math.SQRT2*100) === 141, "Math.SQRT2 = " + Math.SQRT2);
Math.SQRT2 = "test"; Math.SQRT2 = "test";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment