mirror of https://github.com/tc39/test262.git
remove dataPropertyAttributesAreCorrect from tests
This commit is contained in:
parent
b4ad0e657e
commit
0d83ff2c7c
|
@ -35,6 +35,12 @@ newObj = Object.create({}, {
|
|||
}
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(newObj, "foo1", 200, true, true, true);
|
||||
verifyEqualTo(newObj, "foo1", 200);
|
||||
|
||||
verifyWritable(newObj, "foo1");
|
||||
|
||||
verifyEnumerable(newObj, "foo1");
|
||||
|
||||
verifyConfigurable(newObj, "foo1");
|
||||
|
||||
accessorPropertyAttributesAreCorrect(newObj, "foo2", getFunc, setFunc, "setVerifyHelpProp", true, true);
|
||||
|
|
|
@ -19,5 +19,11 @@ obj.foo = 100; // default value of attributes: writable: true, configurable: tru
|
|||
Object.defineProperty(obj, "foo", {
|
||||
value: 200
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, true);
|
||||
verifyEqualTo(obj, "foo", 200);
|
||||
|
||||
verifyWritable(obj, "foo");
|
||||
|
||||
verifyEnumerable(obj, "foo");
|
||||
|
||||
verifyConfigurable(obj, "foo");
|
||||
|
||||
|
|
|
@ -17,5 +17,11 @@ var obj = {};
|
|||
obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true
|
||||
|
||||
Object.defineProperty(obj, "foo", { value: undefined });
|
||||
dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, true, true);
|
||||
verifyEqualTo(obj, "foo", undefined);
|
||||
|
||||
verifyWritable(obj, "foo");
|
||||
|
||||
verifyEnumerable(obj, "foo");
|
||||
|
||||
verifyConfigurable(obj, "foo");
|
||||
|
||||
|
|
|
@ -17,5 +17,11 @@ var obj = {};
|
|||
obj.foo = undefined; // default value of attributes: writable: true, configurable: true, enumerable: true
|
||||
|
||||
Object.defineProperty(obj, "foo", { value: 100 });
|
||||
dataPropertyAttributesAreCorrect(obj, "foo", 100, true, true, true);
|
||||
verifyEqualTo(obj, "foo", 100);
|
||||
|
||||
verifyWritable(obj, "foo");
|
||||
|
||||
verifyEnumerable(obj, "foo");
|
||||
|
||||
verifyConfigurable(obj, "foo");
|
||||
|
||||
|
|
|
@ -22,5 +22,11 @@ Object.defineProperty(obj, "foo", {
|
|||
Object.defineProperty(obj, "foo", {
|
||||
writable: true
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(obj, "foo", undefined, true, false, true);
|
||||
verifyEqualTo(obj, "foo", undefined);
|
||||
|
||||
verifyWritable(obj, "foo");
|
||||
|
||||
verifyNotEnumerable(obj, "foo");
|
||||
|
||||
verifyConfigurable(obj, "foo");
|
||||
|
||||
|
|
|
@ -23,5 +23,11 @@ Object.defineProperty(obj, "foo", {
|
|||
Object.defineProperty(obj, "foo", {
|
||||
enumerable: true
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(obj, "foo", undefined, false, true, true);
|
||||
verifyEqualTo(obj, "foo", undefined);
|
||||
|
||||
verifyNotWritable(obj, "foo");
|
||||
|
||||
verifyEnumerable(obj, "foo");
|
||||
|
||||
verifyConfigurable(obj, "foo");
|
||||
|
||||
|
|
|
@ -26,5 +26,11 @@ Object.defineProperty(obj, "foo", {
|
|||
configurable: false
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(obj, "foo", 200, true, true, false);
|
||||
verifyEqualTo(obj, "foo", 200);
|
||||
|
||||
verifyWritable(obj, "foo");
|
||||
|
||||
verifyEnumerable(obj, "foo");
|
||||
|
||||
verifyNotConfigurable(obj, "foo");
|
||||
|
||||
|
|
|
@ -27,5 +27,11 @@ Object.defineProperty(obj, "foo", {
|
|||
writable: false,
|
||||
enumerable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(obj, "foo", 200, false, false, true);
|
||||
verifyEqualTo(obj, "foo", 200);
|
||||
|
||||
verifyNotWritable(obj, "foo");
|
||||
|
||||
verifyNotEnumerable(obj, "foo");
|
||||
|
||||
verifyConfigurable(obj, "foo");
|
||||
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "length", {
|
||||
writable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "length", 0, false, false, false);
|
||||
verifyEqualTo(arrObj, "length", 0);
|
||||
|
||||
verifyNotWritable(arrObj, "length");
|
||||
|
||||
verifyNotEnumerable(arrObj, "length");
|
||||
|
||||
verifyNotConfigurable(arrObj, "length");
|
||||
|
||||
|
|
|
@ -26,7 +26,13 @@ try {
|
|||
configurable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", "ownDataProperty", false, false, false);
|
||||
verifyEqualTo(arrObj, "0", "ownDataProperty");
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -20,5 +20,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
enumerable: true
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, false);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -23,5 +23,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
configurable: false
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, false);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -22,5 +22,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
enumerable: true,
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, true, false);
|
||||
verifyEqualTo(arrObj, "0", 1001);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -22,5 +22,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
writable: true,
|
||||
configurable: true
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, false, true);
|
||||
verifyEqualTo(arrObj, "0", 1001);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -22,5 +22,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
writable: true,
|
||||
enumerable: true
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 1001, true, true, false);
|
||||
verifyEqualTo(arrObj, "0", 1001);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -22,5 +22,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
configurable: false
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", 1001);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -18,5 +18,11 @@ var arrObj = [];
|
|||
arrObj[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true
|
||||
|
||||
Object.defineProperty(arrObj, "0", {});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 101, true, true, true);
|
||||
verifyEqualTo(arrObj, "0", 101);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -25,5 +25,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
configurable: true
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true);
|
||||
verifyEqualTo(arrObj, "0", 100);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -26,7 +26,13 @@ Object.defineProperty(arrObj, 0, {
|
|||
try {
|
||||
Object.defineProperty(arrObj, "0", { value: "abc" });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", 101);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -18,5 +18,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { value: undefined });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { value: undefined });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -18,5 +18,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { value: null });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { value: null });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", null, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", null);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -21,7 +21,13 @@ Object.defineProperty(arrObj, "0", { value: -0 });
|
|||
try {
|
||||
Object.defineProperty(arrObj, "0", { value: +0 });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", -0, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", -0);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -21,7 +21,13 @@ Object.defineProperty(arrObj, "0", { value: +0 });
|
|||
try {
|
||||
Object.defineProperty(arrObj, "0", { value: -0 });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", +0, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", +0);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -19,4 +19,10 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { value: 101 });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { value: 101 });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", 101);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
|
|
@ -25,7 +25,13 @@ Object.defineProperty(arrObj, 0, {
|
|||
try {
|
||||
Object.defineProperty(arrObj, "0", { value: 123 });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 101, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", 101);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { value: "abcd" });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { value: "abcd" });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false);
|
||||
verifyEqualTo(arrObj, "0", "abcd");
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -25,7 +25,13 @@ Object.defineProperty(arrObj, 0, {
|
|||
try {
|
||||
Object.defineProperty(arrObj, "0", { value: "fghj" });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", "abcd", false, false, false);
|
||||
verifyEqualTo(arrObj, "0", "abcd");
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { value: true });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { value: true });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", true);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -25,7 +25,13 @@ Object.defineProperty(arrObj, 0, {
|
|||
try {
|
||||
Object.defineProperty(arrObj, "0", { value: false });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", true, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", true);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -21,5 +21,11 @@ var obj1 = { length: 10 };
|
|||
Object.defineProperty(arrObj, "0", { value: obj1 });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { value: obj1 });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", obj1);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -28,7 +28,13 @@ var obj2 = { length: 20 };
|
|||
try {
|
||||
Object.defineProperty(arrObj, "0", { value: obj2 });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", obj1, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", obj1);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { writable: false });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { writable: false });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -19,4 +19,10 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { writable: false, configurable: true });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { writable: true });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, false, true);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { enumerable: false });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { enumerable: false });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { enumerable: false, configurable: true });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { enumerable: true });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, true, true);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -19,4 +19,10 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { configurable: false });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { configurable: false });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [];
|
|||
Object.defineProperty(arrObj, "0", { configurable: true });
|
||||
|
||||
Object.defineProperty(arrObj, "0", { configurable: false });
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -31,7 +31,13 @@ try {
|
|||
});
|
||||
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false);
|
||||
verifyEqualTo(arrObj, "1", 3);
|
||||
|
||||
verifyWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -33,7 +33,13 @@ try {
|
|||
});
|
||||
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", 3, true, false, false);
|
||||
verifyEqualTo(arrObj, "1", 3);
|
||||
|
||||
verifyWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -28,7 +28,13 @@ try {
|
|||
});
|
||||
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", 3);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -23,5 +23,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
enumerable: false
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 1001, false, false, true);
|
||||
verifyEqualTo(arrObj, "0", 1001);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -30,5 +30,11 @@ Object.defineProperty(arrObj, "1", {
|
|||
value: 12
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, true);
|
||||
verifyEqualTo(arrObj, "1", 12);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyConfigurable(arrObj, "1");
|
||||
|
||||
|
|
|
@ -31,7 +31,13 @@ try {
|
|||
});
|
||||
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", undefined, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -31,7 +31,13 @@ try {
|
|||
value: "abc"
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", 3, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", 3);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -29,7 +29,13 @@ try {
|
|||
value: +0
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", -0, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", -0);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -29,7 +29,13 @@ try {
|
|||
value: -0
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", +0, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", +0);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -28,7 +28,13 @@ try {
|
|||
value: 15
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", 12, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", 12);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -28,7 +28,13 @@ try {
|
|||
value: "fgh"
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", "abc", false, false, false);
|
||||
verifyEqualTo(arrObj, "1", "abc");
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -28,7 +28,13 @@ try {
|
|||
value: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", false, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", false);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -27,7 +27,13 @@ Object.defineProperty(arrObj, "1", {
|
|||
try {
|
||||
Object.defineProperty(arrObj, "1", { value: {} });
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "1", obj, false, false, false);
|
||||
verifyEqualTo(arrObj, "1", obj);
|
||||
|
||||
verifyNotWritable(arrObj, "1");
|
||||
|
||||
verifyNotEnumerable(arrObj, "1");
|
||||
|
||||
verifyNotConfigurable(arrObj, "1");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -20,5 +20,11 @@ var arrObj = [100];
|
|||
Object.defineProperty(arrObj, "0", {
|
||||
value: 200
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 200, true, true, true);
|
||||
verifyEqualTo(arrObj, "0", 200);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -20,5 +20,11 @@ var arrObj = [100];
|
|||
Object.defineProperty(arrObj, "0", {
|
||||
value: undefined
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", undefined, true, true, true);
|
||||
verifyEqualTo(arrObj, "0", undefined);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [undefined];
|
|||
Object.defineProperty(arrObj, "0", {
|
||||
value: 100
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, true);
|
||||
verifyEqualTo(arrObj, "0", 100);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -19,5 +19,11 @@ var arrObj = [100];
|
|||
Object.defineProperty(arrObj, "0", {
|
||||
writable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, true, true);
|
||||
verifyEqualTo(arrObj, "0", 100);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -20,5 +20,11 @@ var arrObj = [100];
|
|||
Object.defineProperty(arrObj, "0", {
|
||||
enumerable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, false, true);
|
||||
verifyEqualTo(arrObj, "0", 100);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -20,5 +20,11 @@ var arrObj = [100];
|
|||
Object.defineProperty(arrObj, "0", {
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 100, true, true, false);
|
||||
verifyEqualTo(arrObj, "0", 100);
|
||||
|
||||
verifyWritable(arrObj, "0");
|
||||
|
||||
verifyEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -21,5 +21,11 @@ Object.defineProperty(arrObj, "0", {
|
|||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arrObj, "0", 100, false, false, false);
|
||||
verifyEqualTo(arrObj, "0", 100);
|
||||
|
||||
verifyNotWritable(arrObj, "0");
|
||||
|
||||
verifyNotEnumerable(arrObj, "0");
|
||||
|
||||
verifyNotConfigurable(arrObj, "0");
|
||||
|
||||
|
|
|
@ -24,5 +24,11 @@ Object.defineProperty(arrObj, "property", {
|
|||
configurable: true
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "property", 12, true, true, true);
|
||||
verifyEqualTo(arrObj, "property", 12);
|
||||
|
||||
verifyWritable(arrObj, "property");
|
||||
|
||||
verifyEnumerable(arrObj, "property");
|
||||
|
||||
verifyConfigurable(arrObj, "property");
|
||||
|
||||
|
|
|
@ -24,5 +24,11 @@ Object.defineProperty(arrObj, "property", {
|
|||
configurable: false
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
|
||||
verifyEqualTo(arrObj, "property", 12);
|
||||
|
||||
verifyNotWritable(arrObj, "property");
|
||||
|
||||
verifyNotEnumerable(arrObj, "property");
|
||||
|
||||
verifyNotConfigurable(arrObj, "property");
|
||||
|
||||
|
|
|
@ -25,7 +25,13 @@ try {
|
|||
value: 36
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
|
||||
verifyEqualTo(arrObj, "property", 12);
|
||||
|
||||
verifyNotWritable(arrObj, "property");
|
||||
|
||||
verifyNotEnumerable(arrObj, "property");
|
||||
|
||||
verifyNotConfigurable(arrObj, "property");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -25,7 +25,13 @@ try {
|
|||
writable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "property", undefined, false, false, false);
|
||||
verifyEqualTo(arrObj, "property", undefined);
|
||||
|
||||
verifyNotWritable(arrObj, "property");
|
||||
|
||||
verifyNotEnumerable(arrObj, "property");
|
||||
|
||||
verifyNotConfigurable(arrObj, "property");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -25,7 +25,13 @@ try {
|
|||
enumerable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
|
||||
verifyEqualTo(arrObj, "property", 12);
|
||||
|
||||
verifyNotWritable(arrObj, "property");
|
||||
|
||||
verifyNotEnumerable(arrObj, "property");
|
||||
|
||||
verifyNotConfigurable(arrObj, "property");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -25,7 +25,13 @@ try {
|
|||
configurable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arrObj, "property", 12, false, false, false);
|
||||
verifyEqualTo(arrObj, "property", 12);
|
||||
|
||||
verifyNotWritable(arrObj, "property");
|
||||
|
||||
verifyNotEnumerable(arrObj, "property");
|
||||
|
||||
verifyNotConfigurable(arrObj, "property");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -30,5 +30,11 @@ includes: [propertyHelper.js]
|
|||
$ERROR("Expected a === 0, actually " + a);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
|
|
@ -22,6 +22,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, true, true, true);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
||||
|
|
|
@ -28,5 +28,11 @@ flags: [noStrict]
|
|||
$ERROR('Expected a === 20, actually ' + a);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 20);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
|
|
@ -30,5 +30,11 @@ flags: [onlyStrict]
|
|||
$ERROR('Expected a === 0, actually ' + a);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 20);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
|
|
@ -21,6 +21,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 20);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
||||
|
|
|
@ -23,6 +23,12 @@ includes: [propertyHelper.js]
|
|||
Object.defineProperty(arguments, "0", {
|
||||
value: 20
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true);
|
||||
verifyEqualTo(arguments, "0", 20);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
||||
|
|
|
@ -34,7 +34,13 @@ flags: [noStrict]
|
|||
$ERROR("Expected TypeError, got " + e);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (a !== 10) {
|
||||
$ERROR('Expected "a === 10", actually ' + a);
|
||||
|
|
|
@ -29,5 +29,11 @@ flags: [noStrict]
|
|||
$ERROR('Expected "a === 10", actually ' + a);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true);
|
||||
verifyEqualTo(arguments, "0", 20);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
|
|
@ -29,5 +29,11 @@ flags: [onlyStrict]
|
|||
$ERROR('Expected "a === 0", actually ' + a);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 20, false, true, true);
|
||||
verifyEqualTo(arguments, "0", 20);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
|
|
@ -27,7 +27,13 @@ includes: [propertyHelper.js]
|
|||
value: 20
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -34,7 +34,13 @@ flags: [noStrict]
|
|||
$ERROR("Expected TypeError, got " + e);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (a !== 10) {
|
||||
$ERROR('Expected "a === 10", actually ' + a);
|
||||
|
|
|
@ -26,7 +26,13 @@ includes: [propertyHelper.js]
|
|||
writable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -34,7 +34,13 @@ flags: [noStrict]
|
|||
$ERROR("Expected TypeError, got " + e);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (a !== 10) {
|
||||
$ERROR('Expected "a === 10", actually ' + a);
|
||||
|
|
|
@ -26,7 +26,13 @@ includes: [propertyHelper.js]
|
|||
enumerable: false
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, true, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -33,7 +33,13 @@ flags: [noStrict]
|
|||
$ERROR("Expected TypeError, got " + e);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (a !== 10) {
|
||||
$ERROR('Expected "a === 10", actually ' + a);
|
||||
|
|
|
@ -26,7 +26,13 @@ includes: [propertyHelper.js]
|
|||
configurable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -26,6 +26,12 @@ includes: [propertyHelper.js]
|
|||
if (a !== 0) {
|
||||
$ERROR("Expected a === 0, actually " + a);
|
||||
}
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
||||
|
|
|
@ -23,6 +23,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 10, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 10);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
}(0, 1, 2));
|
||||
|
||||
|
|
|
@ -22,6 +22,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 20, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 20);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
}());
|
||||
|
||||
|
|
|
@ -27,7 +27,13 @@ includes: [propertyHelper.js]
|
|||
value: 10
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 0);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -27,7 +27,13 @@ includes: [propertyHelper.js]
|
|||
writable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 0);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -27,7 +27,13 @@ includes: [propertyHelper.js]
|
|||
enumerable: false
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 0, false, true, false);
|
||||
verifyEqualTo(arguments, "0", 0);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -27,7 +27,13 @@ includes: [propertyHelper.js]
|
|||
configurable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "0", 0, false, false, false);
|
||||
verifyEqualTo(arguments, "0", 0);
|
||||
|
||||
verifyNotWritable(arguments, "0");
|
||||
|
||||
verifyNotEnumerable(arguments, "0");
|
||||
|
||||
verifyNotConfigurable(arguments, "0");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -21,6 +21,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true);
|
||||
verifyEqualTo(arguments, "genericProperty", 1001);
|
||||
|
||||
verifyWritable(arguments, "genericProperty");
|
||||
|
||||
verifyEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyConfigurable(arguments, "genericProperty");
|
||||
}(1, 2, 3));
|
||||
|
||||
|
|
|
@ -21,6 +21,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: true,
|
||||
configurable: true
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, true, true, true);
|
||||
verifyEqualTo(arguments, "genericProperty", 1001);
|
||||
|
||||
verifyWritable(arguments, "genericProperty");
|
||||
|
||||
verifyEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyConfigurable(arguments, "genericProperty");
|
||||
}(1, 2, 3));
|
||||
|
||||
|
|
|
@ -26,6 +26,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", 1002);
|
||||
|
||||
verifyWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
}(1, 2, 3));
|
||||
|
||||
|
|
|
@ -26,6 +26,12 @@ includes: [propertyHelper.js]
|
|||
enumerable: false,
|
||||
configurable: false
|
||||
});
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1002, true, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", 1002);
|
||||
|
||||
verifyWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
}(1, 2, 3));
|
||||
|
||||
|
|
|
@ -30,7 +30,13 @@ includes: [propertyHelper.js]
|
|||
$ERROR('Expected "b === 2;", actually ' + b);
|
||||
}
|
||||
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", 1001);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -25,7 +25,13 @@ includes: [propertyHelper.js]
|
|||
value: 1002
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", 1001, false, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", 1001);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -25,7 +25,13 @@ includes: [propertyHelper.js]
|
|||
writable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", undefined);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -24,7 +24,13 @@ includes: [propertyHelper.js]
|
|||
writable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", undefined);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
|
|
|
@ -25,7 +25,13 @@ includes: [propertyHelper.js]
|
|||
enumerable: false
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false);
|
||||
verifyEqualTo(arguments, "genericProperty", undefined);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
|
|
|
@ -24,7 +24,13 @@ includes: [propertyHelper.js]
|
|||
enumerable: false
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, true, false);
|
||||
verifyEqualTo(arguments, "genericProperty", undefined);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -24,7 +24,13 @@ includes: [propertyHelper.js]
|
|||
configurable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", undefined);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
$ERROR("Expected TypeError, got " + e);
|
||||
|
|
|
@ -23,7 +23,13 @@ includes: [propertyHelper.js]
|
|||
configurable: true
|
||||
});
|
||||
} catch (e) {
|
||||
dataPropertyAttributesAreCorrect(arguments, "genericProperty", undefined, false, false, false);
|
||||
verifyEqualTo(arguments, "genericProperty", undefined);
|
||||
|
||||
verifyNotWritable(arguments, "genericProperty");
|
||||
|
||||
verifyNotEnumerable(arguments, "genericProperty");
|
||||
|
||||
verifyNotConfigurable(arguments, "genericProperty");
|
||||
|
||||
|
||||
if (!(e instanceof TypeError)) {
|
||||
|
|
|
@ -27,5 +27,11 @@ Object.defineProperty(obj, "property", {
|
|||
value: 1002
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(obj, "property", 1002, true, false, false);
|
||||
verifyEqualTo(obj, "property", 1002);
|
||||
|
||||
verifyWritable(obj, "property");
|
||||
|
||||
verifyNotEnumerable(obj, "property");
|
||||
|
||||
verifyNotConfigurable(obj, "property");
|
||||
|
||||
|
|
|
@ -27,5 +27,11 @@ Object.defineProperty(obj, "0", {
|
|||
value: 1002
|
||||
});
|
||||
|
||||
dataPropertyAttributesAreCorrect(obj, "0", 1002, true, false, false);
|
||||
verifyEqualTo(obj, "0", 1002);
|
||||
|
||||
verifyWritable(obj, "0");
|
||||
|
||||
verifyNotEnumerable(obj, "0");
|
||||
|
||||
verifyNotConfigurable(obj, "0");
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue