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.

18 lines
653 B

  1. "use strict";
  2. module.exports = function (t, a) {
  3. a.throws(function () { t(undefined); }, TypeError, "Undefined");
  4. a.throws(function () { t(null); }, TypeError, "Null");
  5. a(t(0), 0, "Zero");
  6. a.throws(function () { t(NaN); }, TypeError, "NaN");
  7. a.throws(function () { t(Infinity); }, TypeError, "Infinity");
  8. a(t(12), 12, "Number");
  9. a(t(false), 0, "Boolean");
  10. a(t(new Date(1000000)), 1000000, "Date");
  11. a(t(new Number(2)), 2, "Number object");
  12. a.throws(function () { t("asdfaf"); }, TypeError, "String");
  13. a(t(""), 0, "Empty String");
  14. if (typeof Symbol === "function") {
  15. a.throws(function () { t(Symbol("test")); }, TypeError, "Symbol");
  16. }
  17. };