b72b2fb074fc468a1e1c9eae6c99ddcb6c813c85
[platform/framework/web/crosswalk-tizen.git] /
1 'use strict';
2
3 var toArray = require('../../../array/to-array');
4
5 module.exports = {
6         __generic: function (t, a) {
7                 a.deep(t.call(this, this, this), toArray(this));
8         },
9         "": function (t, a) {
10                 var x = {}, y = {}, p, r;
11                 a.deep(t.call([], [2, 3, 4]), [], "Empty #1");
12                 a.deep(t.call([2, 3, 4], []), [], "Empty #2");
13                 a.deep(t.call([2, 3, x], [y, 5, 7]), [], "Different");
14                 p = t.call([3, 5, 'raz', {}, 'dwa', x], [1, 3, 'raz', 'dwa', 'trzy', x, {}],
15                         [3, 'raz', x, 65]);
16                 r = [3, 'raz', x];
17                 p.sort();
18                 r.sort();
19                 a.deep(p, r, "Same parts");
20                 a.deep(t.call(r, r), r, "Same");
21                 a.deep(t.call([1, 2, x, 4, 5, y, 7], [7, y, 5, 4, x, 2, 1]),
22                         [1, 2, x, 4, 5, y, 7], "Long reverse same");
23         }
24 };