mirror of
https://github.com/idanoo/GoScrobble
synced 2025-07-01 21:52:19 +00:00
0.2.0 - Mid migration
This commit is contained in:
parent
139e6a915e
commit
7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions
5
web/node_modules/es5-ext/test/string/from-code-point/implement.js
generated
vendored
Normal file
5
web/node_modules/es5-ext/test/string/from-code-point/implement.js
generated
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
"use strict";
|
||||
|
||||
var isImplemented = require("../../../string/from-code-point/is-implemented");
|
||||
|
||||
module.exports = function (a) { a(isImplemented(), true); };
|
3
web/node_modules/es5-ext/test/string/from-code-point/index.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/from-code-point/index.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = require("./shim");
|
3
web/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
generated
vendored
Normal file
3
web/node_modules/es5-ext/test/string/from-code-point/is-implemented.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
"use strict";
|
||||
|
||||
module.exports = function (t, a) { a(typeof t(), "boolean"); };
|
47
web/node_modules/es5-ext/test/string/from-code-point/shim.js
generated
vendored
Normal file
47
web/node_modules/es5-ext/test/string/from-code-point/shim.js
generated
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
// Taken from: https://github.com/mathiasbynens/String.fromCodePoint/blob/master
|
||||
// /tests/tests.js
|
||||
|
||||
"use strict";
|
||||
|
||||
var pow = Math.pow;
|
||||
|
||||
module.exports = function (t, a) {
|
||||
var counter, result;
|
||||
|
||||
a(t.length, 1, "Length");
|
||||
a(String.propertyIsEnumerable("fromCodePoint"), false, "Not enumerable");
|
||||
|
||||
a(t(""), "\0", "Empty string");
|
||||
a(t(), "", "No arguments");
|
||||
a(t(-0), "\0", "-0");
|
||||
a(t(0), "\0", "0");
|
||||
a(t(0x1d306), "\uD834\uDF06", "Unicode");
|
||||
a(t(0x1d306, 0x61, 0x1d307), "\uD834\uDF06a\uD834\uDF07", "Complex unicode");
|
||||
a(t(0x61, 0x62, 0x1d307), "ab\uD834\uDF07", "Complex");
|
||||
a(t(false), "\0", "false");
|
||||
a(t(null), "\0", "null");
|
||||
|
||||
a.throws(function () { t("_"); }, RangeError, "_");
|
||||
a.throws(function () { t(Infinity); }, RangeError, "Infinity");
|
||||
a.throws(function () { t(-Infinity); }, RangeError, "-Infinity");
|
||||
a.throws(function () { t(-1); }, RangeError, "-1");
|
||||
a.throws(function () { t(0x10ffff + 1); }, RangeError, "Range error #1");
|
||||
a.throws(function () { t(3.14); }, RangeError, "Range error #2");
|
||||
a.throws(function () { t(3e-2); }, RangeError, "Range error #3");
|
||||
a.throws(function () { t(-Infinity); }, RangeError, "Range error #4");
|
||||
a.throws(function () { t(Number(Infinity)); }, RangeError, "Range error #5");
|
||||
a.throws(function () { t(NaN); }, RangeError, "Range error #6");
|
||||
a.throws(function () { t(undefined); }, RangeError, "Range error #7");
|
||||
a.throws(function () { t({}); }, RangeError, "Range error #8");
|
||||
a.throws(function () { t(/re/); }, RangeError, "Range error #9");
|
||||
|
||||
counter = (pow(2, 15) * 3) / 2;
|
||||
result = [];
|
||||
while (--counter >= 0) result.push(0); // One code unit per symbol
|
||||
t.apply(null, result); // Must not throw
|
||||
|
||||
counter = (pow(2, 15) * 3) / 2;
|
||||
result = [];
|
||||
while (--counter >= 0) result.push(0xffff + 1); // Two code units per symbol
|
||||
t.apply(null, result); // Must not throw
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue