Piotr Caban : jscript: Fixed Math's function lengths.

Alexandre Julliard julliard at winehq.org
Mon Aug 17 11:24:11 CDT 2009


Module: wine
Branch: master
Commit: ca72983664e37345eeade575abf41f10d70824a2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ca72983664e37345eeade575abf41f10d70824a2

Author: Piotr Caban <piotr.caban at gmail.com>
Date:   Mon Aug 17 12:13:10 2009 +0200

jscript: Fixed Math's function lengths.

---

 dlls/jscript/math.c       |   34 +++++++++++++++++-----------------
 dlls/jscript/tests/api.js |   25 +++++++++++++++++++++++++
 2 files changed, 42 insertions(+), 17 deletions(-)

diff --git a/dlls/jscript/math.c b/dlls/jscript/math.c
index 8fea484..628707e 100644
--- a/dlls/jscript/math.c
+++ b/dlls/jscript/math.c
@@ -571,24 +571,24 @@ static const builtin_prop_t Math_props[] = {
     {PIW,       Math_PI,       0},
     {SQRT1_2W,  Math_SQRT1_2,  0},
     {SQRT2W,    Math_SQRT2,    0},
-    {absW,      Math_abs,      PROPF_METHOD},
-    {acosW,     Math_acos,     PROPF_METHOD},
-    {asinW,     Math_asin,     PROPF_METHOD},
-    {atanW,     Math_atan,     PROPF_METHOD},
-    {atan2W,    Math_atan2,    PROPF_METHOD},
-    {ceilW,     Math_ceil,     PROPF_METHOD},
-    {cosW,      Math_cos,      PROPF_METHOD},
-    {expW,      Math_exp,      PROPF_METHOD},
-    {floorW,    Math_floor,    PROPF_METHOD},
-    {logW,      Math_log,      PROPF_METHOD},
-    {maxW,      Math_max,      PROPF_METHOD},
-    {minW,      Math_min,      PROPF_METHOD},
-    {powW,      Math_pow,      PROPF_METHOD},
+    {absW,      Math_abs,      PROPF_METHOD|1},
+    {acosW,     Math_acos,     PROPF_METHOD|1},
+    {asinW,     Math_asin,     PROPF_METHOD|1},
+    {atanW,     Math_atan,     PROPF_METHOD|1},
+    {atan2W,    Math_atan2,    PROPF_METHOD|2},
+    {ceilW,     Math_ceil,     PROPF_METHOD|1},
+    {cosW,      Math_cos,      PROPF_METHOD|1},
+    {expW,      Math_exp,      PROPF_METHOD|1},
+    {floorW,    Math_floor,    PROPF_METHOD|1},
+    {logW,      Math_log,      PROPF_METHOD|1},
+    {maxW,      Math_max,      PROPF_METHOD|2},
+    {minW,      Math_min,      PROPF_METHOD|2},
+    {powW,      Math_pow,      PROPF_METHOD|2},
     {randomW,   Math_random,   PROPF_METHOD},
-    {roundW,    Math_round,    PROPF_METHOD},
-    {sinW,      Math_sin,      PROPF_METHOD},
-    {sqrtW,     Math_sqrt,     PROPF_METHOD},
-    {tanW,      Math_tan,      PROPF_METHOD}
+    {roundW,    Math_round,    PROPF_METHOD|1},
+    {sinW,      Math_sin,      PROPF_METHOD|1},
+    {sqrtW,     Math_sqrt,     PROPF_METHOD|1},
+    {tanW,      Math_tan,      PROPF_METHOD|1}
 };
 
 static const builtin_info_t Math_info = {
diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js
index 72539ed..d4c4cab 100644
--- a/dlls/jscript/tests/api.js
+++ b/dlls/jscript/tests/api.js
@@ -1518,4 +1518,29 @@ testFunctions(Array.prototype, [
         ["unshift", 1]
     ]);
 
+testFunctions(Error.prototype, [
+        ["toString", 0]
+    ]);
+
+testFunctions(Math, [
+        ["abs", 1],
+        ["acos", 1],
+        ["asin", 1],
+        ["atan", 1],
+        ["atan2", 2],
+        ["ceil", 1],
+        ["cos", 1],
+        ["exp", 1],
+        ["floor", 1],
+        ["log", 1],
+        ["max", 2],
+        ["min", 2],
+        ["pow", 2],
+        ["random", 0],
+        ["round", 1],
+        ["sin", 1],
+        ["sqrt", 1],
+        ["tan", 1]
+    ]);
+
 reportSuccess();




More information about the wine-cvs mailing list