]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/test/object/ensure-natural-number.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / node-gyp / node_modules / path-array / node_modules / array-index / node_modules / es6-symbol / node_modules / es5-ext / test / object / ensure-natural-number.js
1 'use strict';
2
3 module.exports = function (t, a) {
4         a.throws(function () { t(undefined); }, TypeError, "Undefined");
5         a(t(null), 0, "Null");
6         a(t(2), 2, "Number");
7         a.throws(function () { t(-2); }, TypeError, "Negative");
8         a.throws(function () { t(2.34); }, TypeError, "Float");
9         a(t('23'), 23, "Numeric string");
10         a.throws(function () { t(NaN); }, TypeError, "NaN");
11         a.throws(function () { t(Infinity); }, TypeError, "Infinity");
12 };