web 3d图形渲染器
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
629 B

  1. "use strict";
  2. var SymbolPolyfill = require("../polyfill");
  3. module.exports = function (t, a) {
  4. var symbol;
  5. a.throws(function () { t(undefined); }, TypeError, "Undefined");
  6. a.throws(function () { t(null); }, TypeError, "Null");
  7. a.throws(function () { t(true); }, TypeError, "Primitive");
  8. a.throws(function () { t("raz"); }, TypeError, "String");
  9. a.throws(function () { t({}); }, TypeError, "Object");
  10. a.throws(function () { t([]); }, TypeError, "Array");
  11. if (typeof Symbol !== "undefined") {
  12. symbol = Symbol("foo");
  13. a(t(symbol), symbol, "Native");
  14. }
  15. symbol = SymbolPolyfill();
  16. a(t(symbol), symbol, "Polyfill");
  17. };