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.

23 lines
663 B

  1. "use strict";
  2. module.exports = function (t, a) {
  3. var arr = [];
  4. a(t(arr), arr, "Array");
  5. a(t(""), "", "String");
  6. var args = (function () { return arguments; })();
  7. a(t(args), args, "Arguments");
  8. var arrayLike = { length: 0 };
  9. a(t(arrayLike), arrayLike, "Array like");
  10. a.throws(
  11. function () {
  12. t(function () {});
  13. },
  14. TypeError,
  15. "Function"
  16. );
  17. a.throws(function () { t({}); }, TypeError, "Plain object");
  18. a.throws(function () { t(/raz/); }, TypeError, "Regexp");
  19. a.throws(function () { t(); }, TypeError, "No argument");
  20. a.throws(function () { t(null); }, TypeError, "Null");
  21. a.throws(function () { t(undefined); }, TypeError, "Undefined");
  22. };