]> 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/set-prototype-of/index.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 / set-prototype-of / index.js
1 'use strict';
2
3 var create = require('../../../object/create')
4
5   , getPrototypeOf = Object.getPrototypeOf;
6
7 module.exports = function (t, a) {
8         var x = {}, y = {};
9
10         if (t === null) return;
11         a(t(x, y), x, "Return self object");
12         a(getPrototypeOf(x), y, "Object");
13         a.throws(function () { t(x); }, TypeError, "Undefined");
14         a.throws(function () { t('foo'); }, TypeError, "Primitive");
15         a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
16         x = create(null);
17         a.h1("Change null prototype");
18         a(t(x, y), x, "Result");
19         a(getPrototypeOf(x), y, "Prototype");
20         a.h1("Set null prototype");
21         a(t(y, null), y, "Result");
22         a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
23 };