added whole system from ola4doc

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-14 17:06:06 +01:00
parent 9646c74be1
commit 0611418f7a
8725 changed files with 817688 additions and 2 deletions
+10
View File
@@ -0,0 +1,10 @@
'use strict';
module.exports = function (t, a) {
var o = new Date(), o2;
o2 = t.call(o);
a.not(o, o2, "Different objects");
a.ok(o2 instanceof Date, "Instance of Date");
a(o.getTime(), o2.getTime(), "Same time");
};
+17
View File
@@ -0,0 +1,17 @@
'use strict';
module.exports = function (t, a) {
a(t.call(new Date(2001, 0, 1)), 31, "January");
a(t.call(new Date(2001, 1, 1)), 28, "February");
a(t.call(new Date(2000, 1, 1)), 29, "February (leap)");
a(t.call(new Date(2001, 2, 1)), 31, "March");
a(t.call(new Date(2001, 3, 1)), 30, "April");
a(t.call(new Date(2001, 4, 1)), 31, "May");
a(t.call(new Date(2001, 5, 1)), 30, "June");
a(t.call(new Date(2001, 6, 1)), 31, "July");
a(t.call(new Date(2001, 7, 1)), 31, "August");
a(t.call(new Date(2001, 8, 1)), 30, "September");
a(t.call(new Date(2001, 9, 1)), 31, "October");
a(t.call(new Date(2001, 10, 1)), 30, "November");
a(t.call(new Date(2001, 11, 1)), 31, "December");
};
+6
View File
@@ -0,0 +1,6 @@
'use strict';
module.exports = function (t, a) {
a(t.call(new Date(2000, 0, 1, 13, 32, 34, 234)).valueOf(),
new Date(2000, 0, 1).valueOf());
};
+6
View File
@@ -0,0 +1,6 @@
'use strict';
module.exports = function (t, a) {
a(t.call(new Date(2000, 0, 15, 13, 32, 34, 234)).valueOf(),
new Date(2000, 0, 1).valueOf());
};
+6
View File
@@ -0,0 +1,6 @@
'use strict';
module.exports = function (t, a) {
a(t.call(new Date(2000, 5, 13, 13, 32, 34, 234)).valueOf(),
new Date(2000, 0, 1).valueOf());
};
+6
View File
@@ -0,0 +1,6 @@
'use strict';
module.exports = function (t, a) {
var dt = new Date(2011, 2, 3, 3, 5, 5, 32);
a(t.call(dt, ' %Y.%y.%m.%d.%H.%M.%S.%L '), ' 2011.11.03.03.03.05.05.032 ');
};
+10
View File
@@ -0,0 +1,10 @@
'use strict';
module.exports = function (t, a) {
a(t('arar'), false, "String");
a(t(12), false, "Number");
a(t(true), false, "Boolean");
a(t(new Date()), true, "Date");
a(t(new String('raz')), false, "String object");
a(t({}), false, "Plain object");
};
+12
View File
@@ -0,0 +1,12 @@
'use strict';
module.exports = function (t, a) {
var d = new Date();
a(t(d), d, "Date");
a.throws(function () {
t({});
}, "Object");
a.throws(function () {
t({ valueOf: function () { return 20; } });
}, "Number object");
};