]> 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/iterable/validate.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 / iterable / validate.js
1 'use strict';
2
3 var iteratorSymbol = require('es6-symbol').iterator;
4
5 module.exports = function (t, a) {
6         var x;
7         a.throws(function () { t(0); }, TypeError, "0");
8         a.throws(function () { t(false); }, TypeError, "false");
9         a(t(''), '', "''");
10         a.throws(function () { t({}); }, TypeError, "Plain Object");
11         a.throws(function () { t(function () {}); }, TypeError, "Function");
12         a(t(x = new String('raz')), x, "String object"); //jslint: ignore
13
14         a(t(x = { length: 1 }), x, "Array like");
15         a.throws(function () { t(); }, TypeError, "Undefined");
16         a.throws(function () { t(null); }, TypeError, "null");
17         x = {};
18         x[iteratorSymbol] = function () {};
19         a(t(x), x, "Iterable");
20 };