[ros-diffs] [cwittich] 41543: sync jscript_winetest with wine 1.1.24

cwittich at svn.reactos.org cwittich at svn.reactos.org
Mon Jun 22 15:51:31 CEST 2009


Author: cwittich
Date: Mon Jun 22 17:51:31 2009
New Revision: 41543

URL: http://svn.reactos.org/svn/reactos?rev=41543&view=rev
Log:
sync jscript_winetest with wine 1.1.24

Modified:
    trunk/rostests/winetests/jscript/api.js

Modified: trunk/rostests/winetests/jscript/api.js
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/jscript/api.js?rev=41543&r1=41542&r2=41543&view=diff
==============================================================================
--- trunk/rostests/winetests/jscript/api.js [iso-8859-1] (original)
+++ trunk/rostests/winetests/jscript/api.js [iso-8859-1] Mon Jun 22 17:51:31 2009
@@ -945,6 +945,62 @@
 ok(date.setTime("123", NaN) === 123, "date.setTime(\"123\") !== 123");
 ok(isNaN(date.setTime(NaN)), "date.setTime(NaN) is not NaN");
 
+ok(date.setTime(0) === date.getTime(), "date.setTime(0) !== date.getTime()");
+ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear());
+ok(date.getUTCMonth() === 0, "date.getUTCMonth() = " + date.getUTCMonth());
+ok(date.getUTCDate() === 1, "date.getUTCDate() = " + date.getUTCDate());
+ok(date.getUTCDay() === 4, "date.getUTCDay() = " + date.getUTCDay());
+ok(date.getUTCHours() === 0, "date.getUTCHours() = " + date.getUTCHours());
+ok(date.getUTCMinutes() === 0, "date.getUTCMinutes() = " + date.getUTCMinutes());
+ok(date.getUTCSeconds() === 0, "date.getUTCSeconds() = " + date.getUTCSeconds());
+ok(date.getUTCMilliseconds() === 0, "date.getUTCMilliseconds() = " + date.getUTCMilliseconds());
+date.setTime(60*24*60*60*1000);
+ok(date.getUTCFullYear() === 1970, "date.getUTCFullYear() = " + date.getUTCFullYear());
+ok(date.getUTCMonth() === 2, "date.getUTCMonth() = " + date.getUTCMonth());
+ok(date.getUTCDate() === 2, "date.getUTCDate() = " + date.getUTCDate());
+ok(date.getUTCDay() === 1, "date.getUTCDay() = " + date.getUTCDay());
+ok(date.getUTCHours() === 0, "date.getUTCHours() = " + date.getUTCHours());
+ok(date.getUTCMinutes() === 0, "date.getUTCMinutes() = " + date.getUTCMinutes());
+ok(date.getUTCSeconds() === 0, "date.getUTCSeconds() = " + date.getUTCSeconds());
+ok(date.getUTCMilliseconds() === 0, "date.getUTCMilliseconds() = " + date.getUTCMilliseconds());
+date.setTime(59*24*60*60*1000 + 4*365*24*60*60*1000 + 60*60*1000 + 2*60*1000 + 2*1000 + 640);
+ok(date.getUTCFullYear() === 1974, "date.getUTCFullYear() = " + date.getUTCFullYear());
+ok(date.getUTCMonth() === 1, "date.getUTCMonth() = " + date.getUTCMonth());
+ok(date.getUTCMonth(123) === 1, "date.getUTCMonth() = " + date.getUTCMonth());
+ok(date.getUTCDate() === 28, "date.getUTCDate() = " + date.getUTCDate());
+ok(date.getUTCDay() === 4, "date.getUTCDay() = " + date.getUTCDay());
+ok(date.getUTCHours() === 1, "date.getUTCHours() = " + date.getUTCHours());
+ok(date.getUTCMinutes() === 2, "date.getUTCMinutes() = " + date.getUTCMinutes());
+ok(date.getUTCSeconds() === 2, "date.getUTCSeconds() = " + date.getUTCSeconds());
+ok(date.getUTCMilliseconds() === 640, "date.getUTCMilliseconds() = " + date.getUTCMilliseconds());
+date.setTime(Infinity);
+ok(isNaN(date.getUTCFullYear()), "date.getUTCFullYear() is not NaN");
+ok(isNaN(date.getUTCMonth()), "date.getUTCMonth() is not NaN");
+ok(isNaN(date.getUTCDate()), "date.getUTCDate() is not NaN");
+ok(isNaN(date.getUTCDay()), "date.getUTCDay() is not NaN");
+ok(isNaN(date.getUTCHours()), "date.getUTCHours() is not NaN");
+ok(isNaN(date.getUTCMinutes()), "date.getUTCMinutes() is not NaN");
+ok(isNaN(date.getUTCSeconds()), "date.getUTCSeconds() is not NaN");
+ok(isNaN(date.getUTCMilliseconds()), "date.getUTCMilliseconds() is not NaN");
+ok(isNaN(date.setMilliseconds(0)), "date.setMilliseconds() is not NaN");
+
+date.setTime(0);
+date.setMilliseconds(-10, 2);
+ok(date.getUTCMilliseconds() === 990, "date.getUTCMilliseconds() = " + date.getUTCMilliseconds());
+ok(date.setMilliseconds(10) === date.setUTCMilliseconds(10), "date.setUTCMilliseconds(10) !== date.setUTCMilliseconds(10)");
+date.setSeconds(-10);
+ok(date.getUTCSeconds() === 50, "date.getUTCSeconds() = " + date.getUTCSeconds());
+ok(date.setSeconds(10) === date.setUTCSeconds(10), "date.setUTCSeconds(10) !== date.setUTCSeconds(10)");
+date.setMinutes(-10);
+ok(date.getUTCMinutes() === 50, "date.getUTCMinutes() = " + date.getUTCMinutes());
+ok(date.setMinutes(10) === date.setUTCMinutes(10), "date.setUTCMinutes(10) !== date.setUTCMinutes(10)");
+date.setUTCHours(-10);
+ok(date.getUTCHours() === 14, "date.getUTCHours() = " + date.getUTCHours());
+date.setUTCHours(-123);
+ok(date.getTime() === -614989990, "date.getTime() = " + date.getTime());
+date.setHours(20);
+ok(date.getHours() === 20, "date.getHours() = " + date.getHours());
+
 ok(typeof(Math.PI) === "number", "typeof(Math.PI) = " + typeof(Math.PI));
 ok(Math.floor(Math.PI*100) === 314, "Math.PI = " + Math.PI);
 Math.PI = "test";



More information about the Ros-diffs mailing list