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.

26 lines
690 B

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