aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es5-ext/test/math/hypot
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/hypot
parent5634e77ad96bfe1818f6b6ee70b7379652e5487f (diff)
node_modules
Diffstat (limited to 'node_modules/es5-ext/test/math/hypot')
-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
4 files changed, 26 insertions, 0 deletions
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 000000000..29c87fe93
--- /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 000000000..10bb8f65d
--- /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 000000000..5003e7e93
--- /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 000000000..89e4657c1
--- /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");
+};