X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Fnode_modules%2Fnode-gyp%2Fnode_modules%2Fpath-array%2Fnode_modules%2Farray-index%2Fnode_modules%2Fes6-symbol%2Fnode_modules%2Fes5-ext%2Ftest%2Fiterable%2Fvalidate.js;fp=org.simantics.maps.server%2Fnode%2Fnode-v4.8.0-win-x64%2Fnode_modules%2Fnpm%2Fnode_modules%2Fnode-gyp%2Fnode_modules%2Fpath-array%2Fnode_modules%2Farray-index%2Fnode_modules%2Fes6-symbol%2Fnode_modules%2Fes5-ext%2Ftest%2Fiterable%2Fvalidate.js;h=bcc2ad3d0aa1c974594d9f55e0e64d65e52f8478;hb=2529be6d456deeb07c128603ce4971f1dc29b695;hp=0000000000000000000000000000000000000000;hpb=2636fc31c16c23711cf2b06a4ae8537bba9c1d35;p=simantics%2Fdistrict.git diff --git a/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/iterable/validate.js b/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/iterable/validate.js new file mode 100644 index 00000000..bcc2ad3d --- /dev/null +++ b/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/iterable/validate.js @@ -0,0 +1,20 @@ +'use strict'; + +var iteratorSymbol = require('es6-symbol').iterator; + +module.exports = function (t, a) { + var x; + a.throws(function () { t(0); }, TypeError, "0"); + a.throws(function () { t(false); }, TypeError, "false"); + a(t(''), '', "''"); + a.throws(function () { t({}); }, TypeError, "Plain Object"); + a.throws(function () { t(function () {}); }, TypeError, "Function"); + a(t(x = new String('raz')), x, "String object"); //jslint: ignore + + a(t(x = { length: 1 }), x, "Array like"); + a.throws(function () { t(); }, TypeError, "Undefined"); + a.throws(function () { t(null); }, TypeError, "null"); + x = {}; + x[iteratorSymbol] = function () {}; + a(t(x), x, "Iterable"); +};