Piotr Caban : jscript: Added Math_LN10 implementation and tests.
Alexandre Julliard
julliard at winehq.org
Mon May 25 10:06:30 CDT 2009
Module: wine
Branch: master
Commit: 1ef80d5cd20c08a72bec1cc297951c862f176573
URL: http://source.winehq.org/git/wine.git/?a=commit;h=1ef80d5cd20c08a72bec1cc297951c862f176573
Author: Piotr Caban <piotr.caban at gmail.com>
Date: Sun May 24 21:06:50 2009 +0200
jscript: Added Math_LN10 implementation and tests.
---
dlls/jscript/math.c | 4 ++--
dlls/jscript/tests/api.js | 5 +++++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c
index 99bd9f5..8f3cb03 100644
--- a/dlls/jscript/math.c
+++ b/dlls/jscript/math.c
@@ -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,
VARIANT *retv, jsexcept_t *ei, IServiceProvider *sp)
{
- FIXME("\n");
- return E_NOTIMPL;
+ TRACE("\n");
+ return math_constant(M_LN10, flags, retv);
}
/* ECMA-262 3rd Edition 15.8.1.6 */
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js
index a202fbd..9976bb2 100644
--- a/dlls/jscript/tests/api.js
+++ b/dlls/jscript/tests/api.js
@@ -708,6 +708,11 @@ ok(Math.floor(Math.LN2*100) === 69, "Math.LN2 = " + Math.LN2);
Math.LN2 = "test";
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(Math.floor(Math.SQRT2*100) === 141, "Math.SQRT2 = " + Math.SQRT2);
Math.SQRT2 = "test";
More information about the wine-cvs
mailing list