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.

22 lines
664 B

  1. "use strict";
  2. var setPrototypeOf = require("../../object/set-prototype-of")
  3. , getPrototypeOf = Object.getPrototypeOf;
  4. module.exports = function (t, a) {
  5. var x = {}, obj;
  6. a(getPrototypeOf(t(x)), x, "Normal object");
  7. a(getPrototypeOf(t(null)), (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null");
  8. a.h1("Properties");
  9. a.h2("Normal object");
  10. a(getPrototypeOf((obj = t(x, { foo: { value: "bar" } }))), x, "Prototype");
  11. a(obj.foo, "bar", "Property");
  12. a.h2("Null");
  13. a(
  14. getPrototypeOf((obj = t(null, { foo: { value: "bar2" } }))),
  15. (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype"
  16. );
  17. a(obj.foo, "bar2", "Property");
  18. };