]> 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/test/validate-symbol.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 / test / validate-symbol.js
1 'use strict';
2
3 var SymbolPoly = require('../polyfill');
4
5 module.exports = function (t, a) {
6         var symbol;
7         a.throws(function () { t(undefined); }, TypeError, "Undefined");
8         a.throws(function () { t(null); }, TypeError, "Null");
9         a.throws(function () { t(true); }, TypeError, "Primitive");
10         a.throws(function () { t('raz'); }, TypeError, "String");
11         a.throws(function () { t({}); }, TypeError, "Object");
12         a.throws(function () { t([]); }, TypeError, "Array");
13         if (typeof Symbol !== 'undefined') {
14                 symbol = Symbol();
15                 a(t(symbol), symbol, "Native");
16         }
17         symbol = SymbolPoly();
18         a(t(symbol), symbol, "Polyfill");
19 };