aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/test/math
diff options
context:
space:
mode:
authorruki <waruqi@gmail.com>2018-11-08 00:38:48 +0800
committerruki <waruqi@gmail.com>2018-11-07 21:53:09 +0800
commit26105034da4fcce7ac883c899d781f016559310d (patch)
treec459a5dc4e3aa0972d9919033ece511ce76dd129 /node_modules/es5-ext/test/math
parent2c77f00f1a7ecb6c8192f9c16d3b2001b254a107 (diff)
downloadxmake-docs-26105034da4fcce7ac883c899d781f016559310d.tar.gz
xmake-docs-26105034da4fcce7ac883c899d781f016559310d.zip
switch to vuepress
Diffstat (limited to 'node_modules/es5-ext/test/math')
-rw-r--r--node_modules/es5-ext/test/math/_decimal-adjust.js6
-rw-r--r--node_modules/es5-ext/test/math/_pack-ieee754.js5
-rw-r--r--node_modules/es5-ext/test/math/_unpack-ieee754.js5
-rw-r--r--node_modules/es5-ext/test/math/acosh/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/acosh/index.js3
-rw-r--r--node_modules/es5-ext/test/math/acosh/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/acosh/shim.js11
-rw-r--r--node_modules/es5-ext/test/math/asinh/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/asinh/index.js3
-rw-r--r--node_modules/es5-ext/test/math/asinh/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/asinh/shim.js10
-rw-r--r--node_modules/es5-ext/test/math/atanh/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/atanh/index.js3
-rw-r--r--node_modules/es5-ext/test/math/atanh/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/atanh/shim.js11
-rw-r--r--node_modules/es5-ext/test/math/cbrt/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/cbrt/index.js3
-rw-r--r--node_modules/es5-ext/test/math/cbrt/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/cbrt/shim.js11
-rw-r--r--node_modules/es5-ext/test/math/ceil-10.js8
-rw-r--r--node_modules/es5-ext/test/math/clz32/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/clz32/index.js3
-rw-r--r--node_modules/es5-ext/test/math/clz32/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/clz32/shim.js12
-rw-r--r--node_modules/es5-ext/test/math/cosh/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/cosh/index.js3
-rw-r--r--node_modules/es5-ext/test/math/cosh/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/cosh/shim.js13
-rw-r--r--node_modules/es5-ext/test/math/expm1/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/expm1/index.js3
-rw-r--r--node_modules/es5-ext/test/math/expm1/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/expm1/shim.js9
-rw-r--r--node_modules/es5-ext/test/math/floor-10.js8
-rw-r--r--node_modules/es5-ext/test/math/fround/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/fround/index.js3
-rw-r--r--node_modules/es5-ext/test/math/fround/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/fround/shim.js9
-rw-r--r--node_modules/es5-ext/test/math/hypot/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/hypot/index.js3
-rw-r--r--node_modules/es5-ext/test/math/hypot/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/hypot/shim.js11
-rw-r--r--node_modules/es5-ext/test/math/imul/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/imul/index.js3
-rw-r--r--node_modules/es5-ext/test/math/imul/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/imul/shim.js9
-rw-r--r--node_modules/es5-ext/test/math/log10/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/log10/index.js3
-rw-r--r--node_modules/es5-ext/test/math/log10/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/log10/shim.js10
-rw-r--r--node_modules/es5-ext/test/math/log1p/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/log1p/index.js3
-rw-r--r--node_modules/es5-ext/test/math/log1p/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/log1p/shim.js10
-rw-r--r--node_modules/es5-ext/test/math/log2/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/log2/index.js3
-rw-r--r--node_modules/es5-ext/test/math/log2/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/log2/shim.js10
-rw-r--r--node_modules/es5-ext/test/math/round-10.js14
-rw-r--r--node_modules/es5-ext/test/math/sign/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/sign/index.js3
-rw-r--r--node_modules/es5-ext/test/math/sign/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/sign/shim.js11
-rw-r--r--node_modules/es5-ext/test/math/sinh/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/sinh/index.js3
-rw-r--r--node_modules/es5-ext/test/math/sinh/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/sinh/shim.js13
-rw-r--r--node_modules/es5-ext/test/math/tanh/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/tanh/index.js3
-rw-r--r--node_modules/es5-ext/test/math/tanh/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/tanh/shim.js11
-rw-r--r--node_modules/es5-ext/test/math/trunc/implement.js7
-rw-r--r--node_modules/es5-ext/test/math/trunc/index.js3
-rw-r--r--node_modules/es5-ext/test/math/trunc/is-implemented.js5
-rw-r--r--node_modules/es5-ext/test/math/trunc/shim.js16
74 files changed, 488 insertions, 0 deletions
diff --git a/node_modules/es5-ext/test/math/_decimal-adjust.js b/node_modules/es5-ext/test/math/_decimal-adjust.js
new file mode 100644
index 00000000..6da15ecf
--- /dev/null
+++ b/node_modules/es5-ext/test/math/_decimal-adjust.js
@@ -0,0 +1,6 @@
+"use strict";
+
+module.exports = function (t, a) {
+ // Just sanity check, as real tests are in 'round', 'ceil' and 'floor' variants
+ a(t("round")(55.55, -1), 55.6);
+};
diff --git a/node_modules/es5-ext/test/math/_pack-ieee754.js b/node_modules/es5-ext/test/math/_pack-ieee754.js
new file mode 100644
index 00000000..7e56f7f2
--- /dev/null
+++ b/node_modules/es5-ext/test/math/_pack-ieee754.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a.deep(t(1.337, 8, 23), [63, 171, 34, 209]);
+};
diff --git a/node_modules/es5-ext/test/math/_unpack-ieee754.js b/node_modules/es5-ext/test/math/_unpack-ieee754.js
new file mode 100644
index 00000000..52730f38
--- /dev/null
+++ b/node_modules/es5-ext/test/math/_unpack-ieee754.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a.deep(t([63, 171, 34, 209], 8, 23), 1.3370000123977661);
+};
diff --git a/node_modules/es5-ext/test/math/acosh/implement.js b/node_modules/es5-ext/test/math/acosh/implement.js
new file mode 100644
index 00000000..d7bcc28a
--- /dev/null
+++ b/node_modules/es5-ext/test/math/acosh/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/acosh/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/acosh/index.js b/node_modules/es5-ext/test/math/acosh/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/acosh/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/acosh/is-implemented.js b/node_modules/es5-ext/test/math/acosh/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/acosh/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/acosh/shim.js b/node_modules/es5-ext/test/math/acosh/shim.js
new file mode 100644
index 00000000..17ac1819
--- /dev/null
+++ b/node_modules/es5-ext/test/math/acosh/shim.js
@@ -0,0 +1,11 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-1), NaN, "Negative");
+ a(t(0), NaN, "Zero");
+ a(t(0.5), NaN, "Below 1");
+ a(t(1), 0, "1");
+ a(t(2), 1.3169578969248166, "Other");
+ a(t(Infinity), Infinity, "Infinity");
+};
diff --git a/node_modules/es5-ext/test/math/asinh/implement.js b/node_modules/es5-ext/test/math/asinh/implement.js
new file mode 100644
index 00000000..ab4b9691
--- /dev/null
+++ b/node_modules/es5-ext/test/math/asinh/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/asinh/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/asinh/index.js b/node_modules/es5-ext/test/math/asinh/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/asinh/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/asinh/is-implemented.js b/node_modules/es5-ext/test/math/asinh/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/asinh/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/asinh/shim.js b/node_modules/es5-ext/test/math/asinh/shim.js
new file mode 100644
index 00000000..a4328d2e
--- /dev/null
+++ b/node_modules/es5-ext/test/math/asinh/shim.js
@@ -0,0 +1,10 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(-2), -1.4436354751788103, "Negative");
+ a(t(2), 1.4436354751788103, "Positive");
+};
diff --git a/node_modules/es5-ext/test/math/atanh/implement.js b/node_modules/es5-ext/test/math/atanh/implement.js
new file mode 100644
index 00000000..bcd3bd87
--- /dev/null
+++ b/node_modules/es5-ext/test/math/atanh/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/atanh/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/atanh/index.js b/node_modules/es5-ext/test/math/atanh/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/atanh/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/atanh/is-implemented.js b/node_modules/es5-ext/test/math/atanh/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/atanh/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/atanh/shim.js b/node_modules/es5-ext/test/math/atanh/shim.js
new file mode 100644
index 00000000..f58709cc
--- /dev/null
+++ b/node_modules/es5-ext/test/math/atanh/shim.js
@@ -0,0 +1,11 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-2), NaN, "Less than -1");
+ a(t(2), NaN, "Greater than 1");
+ a(t(-1), -Infinity, "-1");
+ a(t(1), Infinity, "1");
+ a(t(0), 0, "Zero");
+ a(Math.round(t(0.5) * 1e15), 549306144334055, "Other");
+};
diff --git a/node_modules/es5-ext/test/math/cbrt/implement.js b/node_modules/es5-ext/test/math/cbrt/implement.js
new file mode 100644
index 00000000..132e9296
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cbrt/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/cbrt/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/cbrt/index.js b/node_modules/es5-ext/test/math/cbrt/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cbrt/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/cbrt/is-implemented.js b/node_modules/es5-ext/test/math/cbrt/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cbrt/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/cbrt/shim.js b/node_modules/es5-ext/test/math/cbrt/shim.js
new file mode 100644
index 00000000..fc1beee4
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cbrt/shim.js
@@ -0,0 +1,11 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(-1), -1, "-1");
+ a(t(1), 1, "1");
+ a(t(2), 1.2599210498948732, "Ohter");
+};
diff --git a/node_modules/es5-ext/test/math/ceil-10.js b/node_modules/es5-ext/test/math/ceil-10.js
new file mode 100644
index 00000000..1c4a3866
--- /dev/null
+++ b/node_modules/es5-ext/test/math/ceil-10.js
@@ -0,0 +1,8 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t(55.51, -1), 55.6);
+ a(t(51, 1), 60);
+ a(t(-55.59, -1), -55.5);
+ a(t(-59, 1), -50);
+};
diff --git a/node_modules/es5-ext/test/math/clz32/implement.js b/node_modules/es5-ext/test/math/clz32/implement.js
new file mode 100644
index 00000000..36f529f1
--- /dev/null
+++ b/node_modules/es5-ext/test/math/clz32/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/clz32/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/clz32/index.js b/node_modules/es5-ext/test/math/clz32/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/clz32/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/clz32/is-implemented.js b/node_modules/es5-ext/test/math/clz32/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/clz32/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/clz32/shim.js b/node_modules/es5-ext/test/math/clz32/shim.js
new file mode 100644
index 00000000..4d8dd2fa
--- /dev/null
+++ b/node_modules/es5-ext/test/math/clz32/shim.js
@@ -0,0 +1,12 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t(1), 31, "1");
+ a(t(1000), 22, "1000");
+ a(t(), 32, "No arguments");
+ a(t(Infinity), 32, "Infinity");
+ a(t(-Infinity), 32, "-Infinity");
+ a(t("foo"), 32, "String");
+ a(t(true), 31, "Boolean");
+ a(t(3.5), 30, "Float");
+};
diff --git a/node_modules/es5-ext/test/math/cosh/implement.js b/node_modules/es5-ext/test/math/cosh/implement.js
new file mode 100644
index 00000000..6ad42efb
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cosh/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/cosh/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/cosh/index.js b/node_modules/es5-ext/test/math/cosh/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cosh/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/cosh/is-implemented.js b/node_modules/es5-ext/test/math/cosh/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cosh/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/cosh/shim.js b/node_modules/es5-ext/test/math/cosh/shim.js
new file mode 100644
index 00000000..0b917c70
--- /dev/null
+++ b/node_modules/es5-ext/test/math/cosh/shim.js
@@ -0,0 +1,13 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 1, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), Infinity, "-Infinity");
+ a(t(1), 1.5430806348152437, "1");
+ a(t(Number.MAX_VALUE), Infinity);
+ a(t(-Number.MAX_VALUE), Infinity);
+ a(t(Number.MIN_VALUE), 1);
+ a(t(-Number.MIN_VALUE), 1);
+};
diff --git a/node_modules/es5-ext/test/math/expm1/implement.js b/node_modules/es5-ext/test/math/expm1/implement.js
new file mode 100644
index 00000000..7fb528a3
--- /dev/null
+++ b/node_modules/es5-ext/test/math/expm1/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/expm1/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/expm1/index.js b/node_modules/es5-ext/test/math/expm1/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/expm1/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/expm1/is-implemented.js b/node_modules/es5-ext/test/math/expm1/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/expm1/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/expm1/shim.js b/node_modules/es5-ext/test/math/expm1/shim.js
new file mode 100644
index 00000000..cebb063c
--- /dev/null
+++ b/node_modules/es5-ext/test/math/expm1/shim.js
@@ -0,0 +1,9 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -1, "-Infinity");
+ a(t(1).toFixed(15), "1.718281828459045", "1");
+};
diff --git a/node_modules/es5-ext/test/math/floor-10.js b/node_modules/es5-ext/test/math/floor-10.js
new file mode 100644
index 00000000..a086d80f
--- /dev/null
+++ b/node_modules/es5-ext/test/math/floor-10.js
@@ -0,0 +1,8 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t(55.59, -1), 55.5);
+ a(t(59, 1), 50);
+ a(t(-55.51, -1), -55.6);
+ a(t(-51, 1), -60);
+};
diff --git a/node_modules/es5-ext/test/math/fround/implement.js b/node_modules/es5-ext/test/math/fround/implement.js
new file mode 100644
index 00000000..c7b9ad4a
--- /dev/null
+++ b/node_modules/es5-ext/test/math/fround/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/fround/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/fround/index.js b/node_modules/es5-ext/test/math/fround/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/fround/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/fround/is-implemented.js b/node_modules/es5-ext/test/math/fround/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/fround/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/fround/shim.js b/node_modules/es5-ext/test/math/fround/shim.js
new file mode 100644
index 00000000..0525bfab
--- /dev/null
+++ b/node_modules/es5-ext/test/math/fround/shim.js
@@ -0,0 +1,9 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(1.337), 1.3370000123977661, "1");
+};
diff --git a/node_modules/es5-ext/test/math/hypot/implement.js b/node_modules/es5-ext/test/math/hypot/implement.js
new file mode 100644
index 00000000..29c87fe9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/hypot/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/hypot/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/hypot/index.js b/node_modules/es5-ext/test/math/hypot/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/hypot/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/hypot/is-implemented.js b/node_modules/es5-ext/test/math/hypot/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/hypot/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/hypot/shim.js b/node_modules/es5-ext/test/math/hypot/shim.js
new file mode 100644
index 00000000..89e4657c
--- /dev/null
+++ b/node_modules/es5-ext/test/math/hypot/shim.js
@@ -0,0 +1,11 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t(), 0, "No arguments");
+ a(t(0, -0, 0), 0, "Zeros");
+ a(t(4, NaN, Infinity), Infinity, "Infinity");
+ a(t(4, NaN, -Infinity), Infinity, "Infinity");
+ a(t(4, NaN, 34), NaN, "NaN");
+ a(t(3, 4), 5, "#1");
+ a(t(3, 4, 5), 7.0710678118654755, "#2");
+};
diff --git a/node_modules/es5-ext/test/math/imul/implement.js b/node_modules/es5-ext/test/math/imul/implement.js
new file mode 100644
index 00000000..b633a72b
--- /dev/null
+++ b/node_modules/es5-ext/test/math/imul/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/imul/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/imul/index.js b/node_modules/es5-ext/test/math/imul/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/imul/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/imul/is-implemented.js b/node_modules/es5-ext/test/math/imul/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/imul/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/imul/shim.js b/node_modules/es5-ext/test/math/imul/shim.js
new file mode 100644
index 00000000..a8d4e906
--- /dev/null
+++ b/node_modules/es5-ext/test/math/imul/shim.js
@@ -0,0 +1,9 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t(), 0, "No arguments");
+ a(t(0, 0), 0, "Zeros");
+ a(t(2, 4), 8, "#1");
+ a(t(-1, 8), -8, "#2");
+ a(t(0xfffffffe, 5), -10, "#3");
+};
diff --git a/node_modules/es5-ext/test/math/log10/implement.js b/node_modules/es5-ext/test/math/log10/implement.js
new file mode 100644
index 00000000..afc9dab1
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log10/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/log10/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/log10/index.js b/node_modules/es5-ext/test/math/log10/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log10/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/log10/is-implemented.js b/node_modules/es5-ext/test/math/log10/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log10/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/log10/shim.js b/node_modules/es5-ext/test/math/log10/shim.js
new file mode 100644
index 00000000..d0696287
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log10/shim.js
@@ -0,0 +1,10 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-0.5), NaN, "Less than 0");
+ a(t(0), -Infinity, "0");
+ a(t(1), 0, "1");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(2), 0.3010299956639812, "Other");
+};
diff --git a/node_modules/es5-ext/test/math/log1p/implement.js b/node_modules/es5-ext/test/math/log1p/implement.js
new file mode 100644
index 00000000..baa2ab15
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log1p/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/log1p/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/log1p/index.js b/node_modules/es5-ext/test/math/log1p/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log1p/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/log1p/is-implemented.js b/node_modules/es5-ext/test/math/log1p/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log1p/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/log1p/shim.js b/node_modules/es5-ext/test/math/log1p/shim.js
new file mode 100644
index 00000000..66b400cc
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log1p/shim.js
@@ -0,0 +1,10 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-1.5), NaN, "Less than -1");
+ a(t(-1), -Infinity, "-1");
+ a(t(0), 0, "0");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(1), 0.6931471805599453, "Other");
+};
diff --git a/node_modules/es5-ext/test/math/log2/implement.js b/node_modules/es5-ext/test/math/log2/implement.js
new file mode 100644
index 00000000..43bdf436
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log2/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/log2/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/log2/index.js b/node_modules/es5-ext/test/math/log2/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log2/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/log2/is-implemented.js b/node_modules/es5-ext/test/math/log2/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log2/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/log2/shim.js b/node_modules/es5-ext/test/math/log2/shim.js
new file mode 100644
index 00000000..f587e339
--- /dev/null
+++ b/node_modules/es5-ext/test/math/log2/shim.js
@@ -0,0 +1,10 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(-0.5), NaN, "Less than 0");
+ a(t(0), -Infinity, "0");
+ a(t(1), 0, "1");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(3).toFixed(15), "1.584962500721156", "Other");
+};
diff --git a/node_modules/es5-ext/test/math/round-10.js b/node_modules/es5-ext/test/math/round-10.js
new file mode 100644
index 00000000..c7ae38c4
--- /dev/null
+++ b/node_modules/es5-ext/test/math/round-10.js
@@ -0,0 +1,14 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t(55.55, -1), 55.6);
+ a(t(55.549, -1), 55.5);
+ a(t(55, 1), 60);
+ a(t(54.9, 1), 50);
+ a(t(-55.55, -1), -55.5);
+ a(t(-55.551, -1), -55.6);
+ a(t(-55, 1), -50);
+ a(t(-55.1, 1), -60);
+ a(t(1.005, -2), 1.01);
+ a(t(-1.005, -2), -1.0);
+};
diff --git a/node_modules/es5-ext/test/math/sign/implement.js b/node_modules/es5-ext/test/math/sign/implement.js
new file mode 100644
index 00000000..409beb1f
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sign/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/sign/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/sign/index.js b/node_modules/es5-ext/test/math/sign/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sign/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/sign/is-implemented.js b/node_modules/es5-ext/test/math/sign/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sign/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/sign/shim.js b/node_modules/es5-ext/test/math/sign/shim.js
new file mode 100644
index 00000000..071ea07e
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sign/shim.js
@@ -0,0 +1,11 @@
+"use strict";
+
+var is = require("../../../object/is");
+
+module.exports = function (t, a) {
+ a(is(t(0), +0), true, "+0");
+ a(is(t(-0), -0), true, "-0");
+ a(t({}), NaN, true, "NaN");
+ a(t(-234234234), -1, "Negative");
+ a(t(234234234), 1, "Positive");
+};
diff --git a/node_modules/es5-ext/test/math/sinh/implement.js b/node_modules/es5-ext/test/math/sinh/implement.js
new file mode 100644
index 00000000..ca4b5e7b
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sinh/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/sinh/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/sinh/index.js b/node_modules/es5-ext/test/math/sinh/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sinh/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/sinh/is-implemented.js b/node_modules/es5-ext/test/math/sinh/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sinh/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/sinh/shim.js b/node_modules/es5-ext/test/math/sinh/shim.js
new file mode 100644
index 00000000..f168a7f7
--- /dev/null
+++ b/node_modules/es5-ext/test/math/sinh/shim.js
@@ -0,0 +1,13 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(t(1), 1.1752011936438014, "1");
+ a(t(Number.MAX_VALUE), Infinity);
+ a(t(-Number.MAX_VALUE), -Infinity);
+ a(t(Number.MIN_VALUE), 5e-324);
+ a(t(-Number.MIN_VALUE), -5e-324);
+};
diff --git a/node_modules/es5-ext/test/math/tanh/implement.js b/node_modules/es5-ext/test/math/tanh/implement.js
new file mode 100644
index 00000000..8503711f
--- /dev/null
+++ b/node_modules/es5-ext/test/math/tanh/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/tanh/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/tanh/index.js b/node_modules/es5-ext/test/math/tanh/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/tanh/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/tanh/is-implemented.js b/node_modules/es5-ext/test/math/tanh/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/tanh/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/tanh/shim.js b/node_modules/es5-ext/test/math/tanh/shim.js
new file mode 100644
index 00000000..5da3c087
--- /dev/null
+++ b/node_modules/es5-ext/test/math/tanh/shim.js
@@ -0,0 +1,11 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), 1, "Infinity");
+ a(t(-Infinity), -1, "-Infinity");
+ a(t(1), 0.7615941559557649, "1");
+ a(t(Number.MAX_VALUE), 1);
+ a(t(-Number.MAX_VALUE), -1);
+};
diff --git a/node_modules/es5-ext/test/math/trunc/implement.js b/node_modules/es5-ext/test/math/trunc/implement.js
new file mode 100644
index 00000000..0d3374fc
--- /dev/null
+++ b/node_modules/es5-ext/test/math/trunc/implement.js
@@ -0,0 +1,7 @@
+"use strict";
+
+var isImplemented = require("../../../math/trunc/is-implemented");
+
+module.exports = function (a) {
+ a(isImplemented(), true);
+};
diff --git a/node_modules/es5-ext/test/math/trunc/index.js b/node_modules/es5-ext/test/math/trunc/index.js
new file mode 100644
index 00000000..10bb8f65
--- /dev/null
+++ b/node_modules/es5-ext/test/math/trunc/index.js
@@ -0,0 +1,3 @@
+"use strict";
+
+module.exports = require("./shim");
diff --git a/node_modules/es5-ext/test/math/trunc/is-implemented.js b/node_modules/es5-ext/test/math/trunc/is-implemented.js
new file mode 100644
index 00000000..5003e7e9
--- /dev/null
+++ b/node_modules/es5-ext/test/math/trunc/is-implemented.js
@@ -0,0 +1,5 @@
+"use strict";
+
+module.exports = function (t, a) {
+ a(typeof t(), "boolean");
+};
diff --git a/node_modules/es5-ext/test/math/trunc/shim.js b/node_modules/es5-ext/test/math/trunc/shim.js
new file mode 100644
index 00000000..b80e8683
--- /dev/null
+++ b/node_modules/es5-ext/test/math/trunc/shim.js
@@ -0,0 +1,16 @@
+"use strict";
+
+var is = require("../../../object/is");
+
+module.exports = function (t, a) {
+ a(t({}), NaN, "NaN");
+ a(t(0), 0, "Zero");
+ a(t(Infinity), Infinity, "Infinity");
+ a(t(-Infinity), -Infinity, "-Infinity");
+ a(is(t(0.234), 0), true, "0");
+ a(is(t(-0.234), -0), true, "-0");
+ a(t(13.7), 13, "Positive #1");
+ a(t(12.3), 12, "Positive #2");
+ a(t(-12.3), -12, "Negative #1");
+ a(t(-14.7), -14, "Negative #2");
+};