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
814 B

  1. /* eslint no-eval: "off" */
  2. "use strict";
  3. module.exports = function (t, a) {
  4. a.deep(t.call(function (a, b) { return this[a] + this[b]; }), {
  5. args: "a, b",
  6. body: " return this[a] + this[b]; "
  7. });
  8. a.deep(t.call(function () {}), { args: "", body: "" });
  9. // eslint-disable-next-line no-unused-vars
  10. a.deep(t.call(function (raz) {}), { args: "raz", body: "" });
  11. a.deep(t.call(function () { Object(); }), { args: "", body: " Object(); " });
  12. try {
  13. eval("(() => {})");
  14. } catch (e) {
  15. // Non ES2015 env
  16. return;
  17. }
  18. a.deep(t.call(eval("(() => {})")), { args: "", body: "" });
  19. a.deep(t.call(eval("((elo) => foo)")), { args: "elo", body: "foo" });
  20. a.deep(t.call(eval("(elo => foo)")), { args: "elo", body: "foo" });
  21. a.deep(t.call(eval("((elo, bar) => foo())")), { args: "elo, bar", body: "foo()" });
  22. };