From 67520788c1ec2f97592e0e91673a33ff6eb01d27 Mon Sep 17 00:00:00 2001 From: Piotr Caban Date: Mon, 17 Aug 2009 12:12:49 +0200 Subject: [PATCH] jscript: Fixed Date's function lengths. --- dlls/jscript/date.c | 30 +++++++++++++------------- dlls/jscript/tests/api.js | 44 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 15 deletions(-) diff --git a/dlls/jscript/date.c b/dlls/jscript/date.c index a607c80a572..7c240cd1031 100644 --- a/dlls/jscript/date.c +++ b/dlls/jscript/date.c @@ -2054,21 +2054,21 @@ static const builtin_prop_t Date_props[] = { {getUTCMonthW, Date_getUTCMonth, PROPF_METHOD}, {getUTCSecondsW, Date_getUTCSeconds, PROPF_METHOD}, {getYearW, Date_getYear, PROPF_METHOD}, - {setDateW, Date_setDate, PROPF_METHOD}, - {setFullYearW, Date_setFullYear, PROPF_METHOD}, - {setHoursW, Date_setHours, PROPF_METHOD}, - {setMillisecondsW, Date_setMilliseconds, PROPF_METHOD}, - {setMinutesW, Date_setMinutes, PROPF_METHOD}, - {setMonthW, Date_setMonth, PROPF_METHOD}, - {setSecondsW, Date_setSeconds, PROPF_METHOD}, - {setTimeW, Date_setTime, PROPF_METHOD}, - {setUTCDateW, Date_setUTCDate, PROPF_METHOD}, - {setUTCFullYearW, Date_setUTCFullYear, PROPF_METHOD}, - {setUTCHoursW, Date_setUTCHours, PROPF_METHOD}, - {setUTCMillisecondsW, Date_setUTCMilliseconds, PROPF_METHOD}, - {setUTCMinutesW, Date_setUTCMinutes, PROPF_METHOD}, - {setUTCMonthW, Date_setUTCMonth, PROPF_METHOD}, - {setUTCSecondsW, Date_setUTCSeconds, PROPF_METHOD}, + {setDateW, Date_setDate, PROPF_METHOD|1}, + {setFullYearW, Date_setFullYear, PROPF_METHOD|3}, + {setHoursW, Date_setHours, PROPF_METHOD|4}, + {setMillisecondsW, Date_setMilliseconds, PROPF_METHOD|1}, + {setMinutesW, Date_setMinutes, PROPF_METHOD|3}, + {setMonthW, Date_setMonth, PROPF_METHOD|2}, + {setSecondsW, Date_setSeconds, PROPF_METHOD|2}, + {setTimeW, Date_setTime, PROPF_METHOD|1}, + {setUTCDateW, Date_setUTCDate, PROPF_METHOD|1}, + {setUTCFullYearW, Date_setUTCFullYear, PROPF_METHOD|3}, + {setUTCHoursW, Date_setUTCHours, PROPF_METHOD|4}, + {setUTCMillisecondsW, Date_setUTCMilliseconds, PROPF_METHOD|1}, + {setUTCMinutesW, Date_setUTCMinutes, PROPF_METHOD|3}, + {setUTCMonthW, Date_setUTCMonth, PROPF_METHOD|2}, + {setUTCSecondsW, Date_setUTCSeconds, PROPF_METHOD|2}, {toDateStringW, Date_toDateString, PROPF_METHOD}, {toLocaleDateStringW, Date_toLocaleDateString, PROPF_METHOD}, {toLocaleStringW, Date_toLocaleString, PROPF_METHOD}, diff --git a/dlls/jscript/tests/api.js b/dlls/jscript/tests/api.js index 1930a3ca222..36e519c0a8a 100644 --- a/dlls/jscript/tests/api.js +++ b/dlls/jscript/tests/api.js @@ -1459,4 +1459,48 @@ testFunctions(RegExp.prototype, [ ["test", 1] ]); +testFunctions(Date.prototype, [ + ["getDate", 0], + ["getDay", 0], + ["getFullYear", 0], + ["getHours", 0], + ["getMilliseconds", 0], + ["getMinutes", 0], + ["getMonth", 0], + ["getSeconds", 0], + ["getTime", 0], + ["getTimezoneOffset", 0], + ["getUTCDate", 0], + ["getUTCDay", 0], + ["getUTCFullYear", 0], + ["getUTCHours", 0], + ["getUTCMilliseconds", 0], + ["getUTCMinutes", 0], + ["getUTCMonth", 0], + ["getUTCSeconds", 0], + ["setDate", 1], + ["setFullYear", 3], + ["setHours", 4], + ["setMilliseconds", 1], + ["setMinutes", 3], + ["setMonth", 2], + ["setSeconds", 2], + ["setTime", 1], + ["setUTCDate", 1], + ["setUTCFullYear", 3], + ["setUTCHours", 4], + ["setUTCMilliseconds", 1], + ["setUTCMinutes", 3], + ["setUTCMonth", 2], + ["setUTCSeconds", 2], + ["toDateString", 0], + ["toLocaleDateString", 0], + ["toLocaleString", 0], + ["toLocaleTimeString", 0], + ["toString", 0], + ["toTimeString", 0], + ["toUTCString", 0], + ["valueOf", 0] + ]); + reportSuccess();