2 This page verifies that the single property optimization doesn't cause similar
3 looking objects to be given the same structure identifiers. If the test passes,
4 you'll see a PASS message below.
7 <pre id=
"console"></pre>
11 if (window
.testRunner
)
12 testRunner
.dumpAsText();
17 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
22 function shouldBe(a
, aDescription
, b
)
25 log("PASS: " + aDescription
+ " should be " + b
+ " and is.");
27 log("FAIL: " + aDescription
+ " should be " + b
+ " but instead is " + a
+ ".");
36 var o1
= { a
: 1, x
: 1 };
37 var o2
= { b
: 1, x
: 1 };
42 shouldBe(getA(o2
), "getA(o2)", undefined);