ac0314949a300945053c3336382075a6f175989a
[platform/framework/web/crosswalk-tizen.git] /
1 'use strict';
2
3 var MapPoly = require('../polyfill');
4
5 module.exports = function (t, a) {
6         var map;
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 Map !== 'undefined') {
14                 map = new Map();
15                 a(t(map), map, "Native");
16         }
17         map = new MapPoly();
18         a(t(map), map, "Polyfill");
19 };