aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/test/math/log2
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2017-08-14 05:01:11 +0200
committerFlorian Dold <florian.dold@gmail.com>2017-08-14 05:02:09 +0200
commit363723fc84f7b8477592e0105aeb331ec9a017af (patch)
tree29f92724f34131bac64d6a318dd7e30612e631c7 /node_modules/es5-ext/test/math/log2
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/es5-ext/test/math/log2')
-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
4 files changed, 25 insertions, 0 deletions
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 000000000..43bdf4360
--- /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 000000000..10bb8f65d
--- /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 000000000..5003e7e93
--- /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 000000000..f587e3393
--- /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");
+};