Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | var v = [ -0x80000003, -0x80000002, -0x80000001, -0x80000000, -0x7fffffff, -0x7ffffffe, -0x7ffffffd, |
michael@0 | 2 | -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, |
michael@0 | 3 | 10, 11, 20, 21, 100, 101, 110, 111, 500, |
michael@0 | 4 | 0x7ffffffd, 0x7ffffffe, 0x7fffffff, 0x80000000, 0x80000001, 0x80000002, 0x80000003]; |
michael@0 | 5 | |
michael@0 | 6 | function strcmp(x, y) { |
michael@0 | 7 | return Number(String(x) > String(y)) |
michael@0 | 8 | } |
michael@0 | 9 | |
michael@0 | 10 | for (var i = 0; i < v.length; ++i) { |
michael@0 | 11 | for (var j = 0; j < v.length; ++j) { |
michael@0 | 12 | var builtin = String([v[i], v[j]].sort()); |
michael@0 | 13 | var manual = String([v[i], v[j]].sort(strcmp)); |
michael@0 | 14 | assertEq(builtin, manual); |
michael@0 | 15 | } |
michael@0 | 16 | } |