blob: d582f9cd300971e2c77ac39f2bb725d204559e14 [file] [log] [blame]
function shouldBe(actual, expected) {
if (actual !== expected)
throw new Error('bad value: ' + actual);
}
var object = {};
var properties = [];
for (var i = 0; i < 128; ++i) {
var key = "Hey" + i;
properties.push(key);
object[key] = i;
}
object["MakeNonCompact"] = true;
properties.push("MakeNonCompact");
shouldBe(JSON.stringify(Object.keys(object)), JSON.stringify(properties));
for (var i = 0; i < 128; ++i) {
var key = "Hey" + i;
shouldBe(object[key], i);
}
shouldBe(object["MakeNonCompact"], true);