jscript: Fixed Math's function lengths.

This commit is contained in:
Piotr Caban 2009-08-17 12:13:10 +02:00 committed by Alexandre Julliard
parent c0fc15b91c
commit ca72983664
2 changed files with 42 additions and 17 deletions

View File

@ -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 = {

View File

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