diff options
Diffstat (limited to 'src')
53 files changed, 406 insertions, 279 deletions
diff --git a/src/annex-b-fns/eval-global-existing-global-init.case b/src/annex-b-fns/eval-global-existing-global-init.case index a9cc91cf6..02d9aa778 100644 --- a/src/annex-b-fns/eval-global-existing-global-init.case +++ b/src/annex-b-fns/eval-global-existing-global-init.case @@ -34,6 +34,8 @@ Object.defineProperty(fnGlobalObject(), 'f', { var global = fnGlobalObject(); assert.sameValue(f, undefined, "binding is initialized to `undefined`"); -verifyEnumerable(global, "f"); -verifyWritable(global, "f"); -verifyNotConfigurable(global, "f"); +verifyProperty(global, "f", { + enumerable: true, + writable: true, + configurable: false +}); diff --git a/src/annex-b-fns/eval-global-init.case b/src/annex-b-fns/eval-global-init.case index 24fa059c9..fcfbdd669 100644 --- a/src/annex-b-fns/eval-global-init.case +++ b/src/annex-b-fns/eval-global-init.case @@ -17,7 +17,8 @@ includes: [fnGlobalObject.js, propertyHelper.js] var global = fnGlobalObject(); assert.sameValue(f, undefined, "binding is initialized to `undefined`"); -verifyEnumerable(global, "f"); -verifyWritable(global, "f"); -verifyConfigurable(global, "f"); - +verifyProperty(global, "f", { + enumerable: true, + writable: true, + configurable: true +}); diff --git a/src/annex-b-fns/global-init.case b/src/annex-b-fns/global-init.case index b9191010f..cc99bee62 100644 --- a/src/annex-b-fns/global-init.case +++ b/src/annex-b-fns/global-init.case @@ -18,6 +18,8 @@ includes: [fnGlobalObject.js, propertyHelper.js] var global = fnGlobalObject(); assert.sameValue(f, undefined, 'binding is initialized to `undefined`'); -verifyEnumerable(global, 'f'); -verifyWritable(global, 'f'); -verifyNotConfigurable(global, 'f'); +verifyProperty(global, "f", { + enumerable: true, + writable: true, + configurable: false +}); diff --git a/src/dstr-assignment-for-await/array-elem-init-fn-name-arrow.case b/src/dstr-assignment-for-await/array-elem-init-fn-name-arrow.case index d3cf8df24..96186249b 100644 --- a/src/dstr-assignment-for-await/array-elem-init-fn-name-arrow.case +++ b/src/dstr-assignment-for-await/array-elem-init-fn-name-arrow.case @@ -23,10 +23,12 @@ let arrow; //- vals [] //- body -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'arrow' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/array-elem-init-fn-name-class.case b/src/dstr-assignment-for-await/array-elem-init-fn-name-class.case index 448124558..5e66b95da 100644 --- a/src/dstr-assignment-for-await/array-elem-init-fn-name-class.case +++ b/src/dstr-assignment-for-await/array-elem-init-fn-name-class.case @@ -27,10 +27,12 @@ let xCls, cls, xCls2; assert(xCls.name !== 'xCls'); assert(xCls2.name !== 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cls' +}); //- teardown diff --git a/src/dstr-assignment-for-await/array-elem-init-fn-name-cover.case b/src/dstr-assignment-for-await/array-elem-init-fn-name-cover.case index 348a1ced7..975660770 100644 --- a/src/dstr-assignment-for-await/array-elem-init-fn-name-cover.case +++ b/src/dstr-assignment-for-await/array-elem-init-fn-name-cover.case @@ -26,10 +26,12 @@ let xCover, cover; //- body assert(xCover.name !== 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cover' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/array-elem-init-fn-name-fn.case b/src/dstr-assignment-for-await/array-elem-init-fn-name-fn.case index d6d2d5702..4d731eb75 100644 --- a/src/dstr-assignment-for-await/array-elem-init-fn-name-fn.case +++ b/src/dstr-assignment-for-await/array-elem-init-fn-name-fn.case @@ -26,10 +26,12 @@ let xFnexp, fnexp; //- body assert(xFnexp.name !== 'xFnexp'); -assert.sameValue(fnexp.name, 'fnexp'); -verifyNotEnumerable(fnexp, 'name'); -verifyNotWritable(fnexp, 'name'); -verifyConfigurable(fnexp, 'name'); +verifyProperty(fnexp, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'fnexp' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/array-elem-init-fn-name-gen.case b/src/dstr-assignment-for-await/array-elem-init-fn-name-gen.case index c05ff848f..d7b9b6cc5 100644 --- a/src/dstr-assignment-for-await/array-elem-init-fn-name-gen.case +++ b/src/dstr-assignment-for-await/array-elem-init-fn-name-gen.case @@ -26,10 +26,12 @@ let xGen, gen; //- body assert.notSameValue(xGen.name, 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'gen' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-id-init-fn-name-arrow.case b/src/dstr-assignment-for-await/obj-id-init-fn-name-arrow.case index ffac568e7..b6adf7ccf 100644 --- a/src/dstr-assignment-for-await/obj-id-init-fn-name-arrow.case +++ b/src/dstr-assignment-for-await/obj-id-init-fn-name-arrow.case @@ -25,10 +25,12 @@ let arrow; //- vals {} //- body -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'arrow' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-id-init-fn-name-class.case b/src/dstr-assignment-for-await/obj-id-init-fn-name-class.case index 36e269e86..f04f3b759 100644 --- a/src/dstr-assignment-for-await/obj-id-init-fn-name-class.case +++ b/src/dstr-assignment-for-await/obj-id-init-fn-name-class.case @@ -29,10 +29,12 @@ let xCls, cls, xCls2; assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cls' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-id-init-fn-name-cover.case b/src/dstr-assignment-for-await/obj-id-init-fn-name-cover.case index 3f398fa41..2b138e2f6 100644 --- a/src/dstr-assignment-for-await/obj-id-init-fn-name-cover.case +++ b/src/dstr-assignment-for-await/obj-id-init-fn-name-cover.case @@ -28,10 +28,12 @@ let xCover, cover; //- body assert.notSameValue(xCover.name, 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cover' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-id-init-fn-name-fn.case b/src/dstr-assignment-for-await/obj-id-init-fn-name-fn.case index 7c931ef72..456a896d8 100644 --- a/src/dstr-assignment-for-await/obj-id-init-fn-name-fn.case +++ b/src/dstr-assignment-for-await/obj-id-init-fn-name-fn.case @@ -27,10 +27,12 @@ let xFnexp, fnexp; //- body assert.notSameValue(xFnexp.name, 'xFnexp'); -assert.sameValue(fnexp.name, 'fnexp'); -verifyNotEnumerable(fnexp, 'name'); -verifyNotWritable(fnexp, 'name'); -verifyConfigurable(fnexp, 'name'); +verifyProperty(fnexp, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'fnexp' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-id-init-fn-name-gen.case b/src/dstr-assignment-for-await/obj-id-init-fn-name-gen.case index da5c52c5b..c3b7eee00 100644 --- a/src/dstr-assignment-for-await/obj-id-init-fn-name-gen.case +++ b/src/dstr-assignment-for-await/obj-id-init-fn-name-gen.case @@ -28,10 +28,12 @@ let xGen, gen; //- body assert.notSameValue(xGen.name, 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'gen' +}); //- teardown diff --git a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-arrow.case b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-arrow.case index 1fe46df94..3a71c7a35 100644 --- a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-arrow.case +++ b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-arrow.case @@ -24,10 +24,12 @@ let arrow; //- vals {} //- body -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'arrow' +}); //- teardown promise .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) diff --git a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-class.case b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-class.case index a5ba2e3a0..bbd3149d4 100644 --- a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-class.case +++ b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-class.case @@ -28,10 +28,12 @@ let xCls, cls, xCls2; assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cls' +}); //- teardown promise .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) diff --git a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-cover.case b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-cover.case index dc28778da..aa65ee14f 100644 --- a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-cover.case +++ b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-cover.case @@ -27,10 +27,12 @@ let xCover, cover; //- body assert.notSameValue(xCover.name, 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cover' +}); //- teardown promise .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) diff --git a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-fn.case b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-fn.case index bb4478d34..b7464ac21 100644 --- a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-fn.case +++ b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-fn.case @@ -26,10 +26,12 @@ let xFnexp, fnexp; //- body assert.notSameValue(xFnexp.name, 'xFnexp'); -assert.sameValue(fnexp.name, 'fnexp'); -verifyNotEnumerable(fnexp, 'name'); -verifyNotWritable(fnexp, 'name'); -verifyConfigurable(fnexp, 'name'); +verifyProperty(fnexp, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'fnexp' +}); //- teardown promise .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) diff --git a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-gen.case b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-gen.case index b9f7fc89c..e729da8de 100644 --- a/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-gen.case +++ b/src/dstr-assignment-for-await/obj-prop-elem-init-fn-name-gen.case @@ -27,10 +27,12 @@ let xGen, gen; //- body assert.notSameValue(xGen.name, 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'gen' +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-rest-descriptors.case b/src/dstr-assignment-for-await/obj-rest-descriptors.case index b61100602..feb360b18 100644 --- a/src/dstr-assignment-for-await/obj-rest-descriptors.case +++ b/src/dstr-assignment-for-await/obj-rest-descriptors.case @@ -21,16 +21,19 @@ Object.defineProperty(obj, "b", { value: 4, writable: false, enumerable: true }) //- vals obj //- body -assert.sameValue(rest.a, 3); -assert.sameValue(rest.b, 4); +verifyProperty(rest, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); -verifyEnumerable(rest, "a"); -verifyWritable(rest, "a"); -verifyConfigurable(rest, "a"); - -verifyEnumerable(rest, "b"); -verifyWritable(rest, "b"); -verifyConfigurable(rest, "b"); +verifyProperty(rest, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); //- teardown promise .then(() => assert.sameValue(iterCount, 1, 'iteration occurred as expected'), $DONE) diff --git a/src/dstr-assignment-for-await/obj-rest-getter.case b/src/dstr-assignment-for-await/obj-rest-getter.case index 6a3b38a22..0b020d847 100644 --- a/src/dstr-assignment-for-await/obj-rest-getter.case +++ b/src/dstr-assignment-for-await/obj-rest-getter.case @@ -18,12 +18,14 @@ let count = 0; //- vals { get v() { count++; return 2; } } //- body -assert.sameValue(x.v, 2); assert.sameValue(count, 1); -verifyEnumerable(x, "v"); -verifyWritable(x, "v"); -verifyConfigurable(x, "v"); +verifyProperty(x, "v", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-rest-skip-non-enumerable.case b/src/dstr-assignment-for-await/obj-rest-skip-non-enumerable.case index a38daa7a9..77889399c 100644 --- a/src/dstr-assignment-for-await/obj-rest-skip-non-enumerable.case +++ b/src/dstr-assignment-for-await/obj-rest-skip-non-enumerable.case @@ -19,17 +19,21 @@ Object.defineProperty(obj, "x", { value: 4, enumerable: false }); //- vals obj //- body -assert.sameValue(rest.a, 3); -assert.sameValue(rest.b, 4); assert.sameValue(Object.getOwnPropertyDescriptor(rest, "x"), undefined); -verifyEnumerable(rest, "a"); -verifyWritable(rest, "a"); -verifyConfigurable(rest, "a"); +verifyProperty(rest, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); -verifyEnumerable(rest, "b"); -verifyWritable(rest, "b"); -verifyConfigurable(rest, "b"); +verifyProperty(rest, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-rest-to-property.case b/src/dstr-assignment-for-await/obj-rest-to-property.case index fff09d20e..c71d44a01 100644 --- a/src/dstr-assignment-for-await/obj-rest-to-property.case +++ b/src/dstr-assignment-for-await/obj-rest-to-property.case @@ -21,9 +21,11 @@ let src = {}; assert.sameValue(src.y.x, 1); assert.sameValue(src.y.y, 2); -verifyEnumerable(src, "y"); -verifyWritable(src, "y"); -verifyConfigurable(src, "y"); +verifyProperty(src, "y", { + enumerable: true, + writable: true, + configurable: true +}); //- teardown promise diff --git a/src/dstr-assignment-for-await/obj-rest-valid-object.case b/src/dstr-assignment-for-await/obj-rest-valid-object.case index f959b8bbd..180d699e3 100644 --- a/src/dstr-assignment-for-await/obj-rest-valid-object.case +++ b/src/dstr-assignment-for-await/obj-rest-valid-object.case @@ -18,18 +18,22 @@ let rest, a, b; //- vals {x: 1, y: 2, a: 5, b: 3} //- body -assert.sameValue(rest.x, 1); -assert.sameValue(rest.y, 2); assert.sameValue(rest.a, undefined); assert.sameValue(rest.b, undefined); -verifyEnumerable(rest, "x"); -verifyWritable(rest, "x"); -verifyConfigurable(rest, "x"); +verifyProperty(rest, "x", { + enumerable: true, + writable: true, + configurable: true, + value: 1 +}); -verifyEnumerable(rest, "y"); -verifyWritable(rest, "y"); -verifyConfigurable(rest, "y"); +verifyProperty(rest, "y", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); //- teardown promise diff --git a/src/dstr-assignment/array-elem-init-fn-name-arrow.case b/src/dstr-assignment/array-elem-init-fn-name-arrow.case index 75d60e512..8f50bfbce 100644 --- a/src/dstr-assignment/array-elem-init-fn-name-arrow.case +++ b/src/dstr-assignment/array-elem-init-fn-name-arrow.case @@ -26,7 +26,9 @@ var arrow; //- vals [] //- body -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'arrow' +}); diff --git a/src/dstr-assignment/array-elem-init-fn-name-class.case b/src/dstr-assignment/array-elem-init-fn-name-class.case index 3317c8c0b..5d4dd8d5b 100644 --- a/src/dstr-assignment/array-elem-init-fn-name-class.case +++ b/src/dstr-assignment/array-elem-init-fn-name-class.case @@ -30,7 +30,9 @@ var xCls, cls, xCls2; assert(xCls.name !== 'xCls'); assert(xCls2.name !== 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cls' +}); diff --git a/src/dstr-assignment/array-elem-init-fn-name-cover.case b/src/dstr-assignment/array-elem-init-fn-name-cover.case index 43cb36948..787b9313a 100644 --- a/src/dstr-assignment/array-elem-init-fn-name-cover.case +++ b/src/dstr-assignment/array-elem-init-fn-name-cover.case @@ -29,7 +29,9 @@ var xCover, cover; //- body assert(xCover.name !== 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cover' +}); diff --git a/src/dstr-assignment/array-elem-init-fn-name-fn.case b/src/dstr-assignment/array-elem-init-fn-name-fn.case index 4493b8e04..f62bf6a93 100644 --- a/src/dstr-assignment/array-elem-init-fn-name-fn.case +++ b/src/dstr-assignment/array-elem-init-fn-name-fn.case @@ -29,7 +29,9 @@ var xFn, fn; //- body assert(xFn.name !== 'xFn'); -assert.sameValue(fn.name, 'fn'); -verifyNotEnumerable(fn, 'name'); -verifyNotWritable(fn, 'name'); -verifyConfigurable(fn, 'name'); +verifyProperty(fn, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'fn' +}); diff --git a/src/dstr-assignment/array-elem-init-fn-name-gen.case b/src/dstr-assignment/array-elem-init-fn-name-gen.case index fea3bbaa2..1a5b9ec7a 100644 --- a/src/dstr-assignment/array-elem-init-fn-name-gen.case +++ b/src/dstr-assignment/array-elem-init-fn-name-gen.case @@ -29,7 +29,9 @@ var xGen, gen; //- body assert.notSameValue(xGen.name, 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'gen' +}); diff --git a/src/dstr-assignment/obj-id-init-fn-name-arrow.case b/src/dstr-assignment/obj-id-init-fn-name-arrow.case index ba923bacb..87646f89f 100644 --- a/src/dstr-assignment/obj-id-init-fn-name-arrow.case +++ b/src/dstr-assignment/obj-id-init-fn-name-arrow.case @@ -25,7 +25,9 @@ var arrow; //- vals {} //- body -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'arrow' +}); diff --git a/src/dstr-assignment/obj-id-init-fn-name-class.case b/src/dstr-assignment/obj-id-init-fn-name-class.case index f76aa2ee1..dc54f45bc 100644 --- a/src/dstr-assignment/obj-id-init-fn-name-class.case +++ b/src/dstr-assignment/obj-id-init-fn-name-class.case @@ -29,7 +29,9 @@ var xCls, cls, xCls2; assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cls' +}); diff --git a/src/dstr-assignment/obj-id-init-fn-name-cover.case b/src/dstr-assignment/obj-id-init-fn-name-cover.case index b0d92b229..f5530024a 100644 --- a/src/dstr-assignment/obj-id-init-fn-name-cover.case +++ b/src/dstr-assignment/obj-id-init-fn-name-cover.case @@ -28,7 +28,9 @@ var xCover, cover; //- body assert.notSameValue(xCover.name, 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cover' +}); diff --git a/src/dstr-assignment/obj-id-init-fn-name-fn.case b/src/dstr-assignment/obj-id-init-fn-name-fn.case index 28729746a..0d6ec1378 100644 --- a/src/dstr-assignment/obj-id-init-fn-name-fn.case +++ b/src/dstr-assignment/obj-id-init-fn-name-fn.case @@ -27,7 +27,9 @@ var xFn, fn; //- body assert.notSameValue(xFn.name, 'xFn'); -assert.sameValue(fn.name, 'fn'); -verifyNotEnumerable(fn, 'name'); -verifyNotWritable(fn, 'name'); -verifyConfigurable(fn, 'name'); +verifyProperty(fn, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'fn' +}); diff --git a/src/dstr-assignment/obj-id-init-fn-name-gen.case b/src/dstr-assignment/obj-id-init-fn-name-gen.case index 712672024..bbb3cf901 100644 --- a/src/dstr-assignment/obj-id-init-fn-name-gen.case +++ b/src/dstr-assignment/obj-id-init-fn-name-gen.case @@ -28,7 +28,9 @@ var xGen, gen; //- body assert.notSameValue(xGen.name, 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'gen' +}); diff --git a/src/dstr-assignment/obj-prop-elem-init-fn-name-arrow.case b/src/dstr-assignment/obj-prop-elem-init-fn-name-arrow.case index 3cfff7b2a..70c7574c7 100644 --- a/src/dstr-assignment/obj-prop-elem-init-fn-name-arrow.case +++ b/src/dstr-assignment/obj-prop-elem-init-fn-name-arrow.case @@ -26,7 +26,9 @@ var arrow; //- vals {} //- body -assert.sameValue(arrow.name, 'arrow'); -verifyNotEnumerable(arrow, 'name'); -verifyNotWritable(arrow, 'name'); -verifyConfigurable(arrow, 'name'); +verifyProperty(arrow, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'arrow' +}); diff --git a/src/dstr-assignment/obj-prop-elem-init-fn-name-class.case b/src/dstr-assignment/obj-prop-elem-init-fn-name-class.case index 86f60afc0..e8a5e9540 100644 --- a/src/dstr-assignment/obj-prop-elem-init-fn-name-class.case +++ b/src/dstr-assignment/obj-prop-elem-init-fn-name-class.case @@ -30,7 +30,9 @@ var xCls, cls, xCls2; assert.notSameValue(xCls.name, 'xCls'); assert.notSameValue(xCls2.name, 'xCls2'); -assert.sameValue(cls.name, 'cls'); -verifyNotEnumerable(cls, 'name'); -verifyNotWritable(cls, 'name'); -verifyConfigurable(cls, 'name'); +verifyProperty(cls, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cls' +}); diff --git a/src/dstr-assignment/obj-prop-elem-init-fn-name-cover.case b/src/dstr-assignment/obj-prop-elem-init-fn-name-cover.case index 6e6afc489..0d1867f6b 100644 --- a/src/dstr-assignment/obj-prop-elem-init-fn-name-cover.case +++ b/src/dstr-assignment/obj-prop-elem-init-fn-name-cover.case @@ -29,7 +29,9 @@ var xCover, cover; //- body assert.notSameValue(xCover.name, 'xCover'); -assert.sameValue(cover.name, 'cover'); -verifyNotEnumerable(cover, 'name'); -verifyNotWritable(cover, 'name'); -verifyConfigurable(cover, 'name'); +verifyProperty(cover, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'cover' +}); diff --git a/src/dstr-assignment/obj-prop-elem-init-fn-name-fn.case b/src/dstr-assignment/obj-prop-elem-init-fn-name-fn.case index 7a2290ac6..f5c133341 100644 --- a/src/dstr-assignment/obj-prop-elem-init-fn-name-fn.case +++ b/src/dstr-assignment/obj-prop-elem-init-fn-name-fn.case @@ -28,7 +28,9 @@ var xFn, fn; //- body assert.notSameValue(xFn.name, 'xFn'); -assert.sameValue(fn.name, 'fn'); -verifyNotEnumerable(fn, 'name'); -verifyNotWritable(fn, 'name'); -verifyConfigurable(fn, 'name'); +verifyProperty(fn, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'fn' +}); diff --git a/src/dstr-assignment/obj-prop-elem-init-fn-name-gen.case b/src/dstr-assignment/obj-prop-elem-init-fn-name-gen.case index 292e8c615..e4e8702d0 100644 --- a/src/dstr-assignment/obj-prop-elem-init-fn-name-gen.case +++ b/src/dstr-assignment/obj-prop-elem-init-fn-name-gen.case @@ -29,7 +29,9 @@ var xGen, gen; //- body assert.notSameValue(xGen.name, 'xGen'); -assert.sameValue(gen.name, 'gen'); -verifyNotEnumerable(gen, 'name'); -verifyNotWritable(gen, 'name'); -verifyConfigurable(gen, 'name'); +verifyProperty(gen, 'name', { + enumerable: false, + writable: false, + configurable: true, + value: 'gen' +}); diff --git a/src/dstr-assignment/obj-rest-descriptors.case b/src/dstr-assignment/obj-rest-descriptors.case index 780f895ab..6d13c4ef3 100644 --- a/src/dstr-assignment/obj-rest-descriptors.case +++ b/src/dstr-assignment/obj-rest-descriptors.case @@ -21,14 +21,17 @@ Object.defineProperty(obj, "b", { value: 4, writable: false, enumerable: true }) //- vals obj //- body -assert.sameValue(rest.a, 3); -assert.sameValue(rest.b, 4); +verifyProperty(rest, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); -verifyEnumerable(rest, "a"); -verifyWritable(rest, "a"); -verifyConfigurable(rest, "a"); - -verifyEnumerable(rest, "b"); -verifyWritable(rest, "b"); -verifyConfigurable(rest, "b"); +verifyProperty(rest, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); diff --git a/src/dstr-assignment/obj-rest-getter.case b/src/dstr-assignment/obj-rest-getter.case index 5dd66039d..8d2db4b35 100644 --- a/src/dstr-assignment/obj-rest-getter.case +++ b/src/dstr-assignment/obj-rest-getter.case @@ -18,10 +18,11 @@ var count = 0; //- vals { get v() { count++; return 2; } } //- body -assert.sameValue(x.v, 2); assert.sameValue(count, 1); -verifyEnumerable(x, "v"); -verifyWritable(x, "v"); -verifyConfigurable(x, "v"); - +verifyProperty(x, "v", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); diff --git a/src/dstr-assignment/obj-rest-skip-non-enumerable.case b/src/dstr-assignment/obj-rest-skip-non-enumerable.case index 4acaaca66..79a2ba56f 100644 --- a/src/dstr-assignment/obj-rest-skip-non-enumerable.case +++ b/src/dstr-assignment/obj-rest-skip-non-enumerable.case @@ -19,15 +19,18 @@ Object.defineProperty(obj, "x", { value: 4, enumerable: false }); //- vals obj //- body -assert.sameValue(rest.a, 3); -assert.sameValue(rest.b, 4); assert.sameValue(Object.getOwnPropertyDescriptor(rest, "x"), undefined); -verifyEnumerable(rest, "a"); -verifyWritable(rest, "a"); -verifyConfigurable(rest, "a"); - -verifyEnumerable(rest, "b"); -verifyWritable(rest, "b"); -verifyConfigurable(rest, "b"); +verifyProperty(rest, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); +verifyProperty(rest, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); diff --git a/src/dstr-assignment/obj-rest-to-property.case b/src/dstr-assignment/obj-rest-to-property.case index c8f6de663..3cfc221b6 100644 --- a/src/dstr-assignment/obj-rest-to-property.case +++ b/src/dstr-assignment/obj-rest-to-property.case @@ -21,7 +21,8 @@ var src = {}; assert.sameValue(src.y.x, 1); assert.sameValue(src.y.y, 2); -verifyEnumerable(src, "y"); -verifyWritable(src, "y"); -verifyConfigurable(src, "y"); - +verifyProperty(src, "y", { + enumerable: true, + writable: true, + configurable: true +}); diff --git a/src/dstr-assignment/obj-rest-valid-object.case b/src/dstr-assignment/obj-rest-valid-object.case index c875c3162..57cc34c09 100644 --- a/src/dstr-assignment/obj-rest-valid-object.case +++ b/src/dstr-assignment/obj-rest-valid-object.case @@ -18,16 +18,19 @@ var rest, a, b; //- vals {x: 1, y: 2, a: 5, b: 3} //- body -assert.sameValue(rest.x, 1); -assert.sameValue(rest.y, 2); assert.sameValue(rest.a, undefined); assert.sameValue(rest.b, undefined); -verifyEnumerable(rest, "x"); -verifyWritable(rest, "x"); -verifyConfigurable(rest, "x"); - -verifyEnumerable(rest, "y"); -verifyWritable(rest, "y"); -verifyConfigurable(rest, "y"); +verifyProperty(rest, "x", { + enumerable: true, + writable: true, + configurable: true, + value: 1 +}); +verifyProperty(rest, "y", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); diff --git a/src/dstr-binding-for-await/obj-ptrn-rest-getter.case b/src/dstr-binding-for-await/obj-ptrn-rest-getter.case index c5360e5e5..16e8f242e 100644 --- a/src/dstr-binding-for-await/obj-ptrn-rest-getter.case +++ b/src/dstr-binding-for-await/obj-ptrn-rest-getter.case @@ -20,7 +20,9 @@ var count = 0; assert.sameValue(x.v, 2); assert.sameValue(count, 1); -verifyEnumerable(x, "v"); -verifyWritable(x, "v"); -verifyConfigurable(x, "v"); - +verifyProperty(x, "v", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); diff --git a/src/dstr-binding-for-await/obj-ptrn-rest-skip-non-enumerable.case b/src/dstr-binding-for-await/obj-ptrn-rest-skip-non-enumerable.case index 869ffd241..82e129f02 100644 --- a/src/dstr-binding-for-await/obj-ptrn-rest-skip-non-enumerable.case +++ b/src/dstr-binding-for-await/obj-ptrn-rest-skip-non-enumerable.case @@ -22,11 +22,16 @@ assert.sameValue(rest.a, 3); assert.sameValue(rest.b, 4); assert.sameValue(rest.x, undefined); -verifyEnumerable(rest, "a"); -verifyWritable(rest, "a"); -verifyConfigurable(rest, "a"); - -verifyEnumerable(rest, "b"); -verifyWritable(rest, "b"); -verifyConfigurable(rest, "b"); +verifyProperty(rest, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); +verifyProperty(rest, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); diff --git a/src/dstr-binding-for-await/obj-ptrn-rest-val-obj.case b/src/dstr-binding-for-await/obj-ptrn-rest-val-obj.case index 0379ddd94..c9f87d221 100644 --- a/src/dstr-binding-for-await/obj-ptrn-rest-val-obj.case +++ b/src/dstr-binding-for-await/obj-ptrn-rest-val-obj.case @@ -15,16 +15,19 @@ features: [object-rest] //- vals {x: 1, y: 2, a: 5, b: 3} //- body -assert.sameValue(rest.x, 1); -assert.sameValue(rest.y, 2); assert.sameValue(rest.a, undefined); assert.sameValue(rest.b, undefined); -verifyEnumerable(rest, "x"); -verifyWritable(rest, "x"); -verifyConfigurable(rest, "x"); - -verifyEnumerable(rest, "y"); -verifyWritable(rest, "y"); -verifyConfigurable(rest, "y"); +verifyProperty(rest, "x", { + enumerable: true, + writable: true, + configurable: true, + value: 1 +}); +verifyProperty(rest, "y", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); diff --git a/src/dstr-binding/obj-ptrn-rest-getter.case b/src/dstr-binding/obj-ptrn-rest-getter.case index c5360e5e5..f324fca73 100644 --- a/src/dstr-binding/obj-ptrn-rest-getter.case +++ b/src/dstr-binding/obj-ptrn-rest-getter.case @@ -17,10 +17,11 @@ var count = 0; //- vals { get v() { count++; return 2; } } //- body -assert.sameValue(x.v, 2); assert.sameValue(count, 1); -verifyEnumerable(x, "v"); -verifyWritable(x, "v"); -verifyConfigurable(x, "v"); - +verifyProperty(x, "v", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); diff --git a/src/dstr-binding/obj-ptrn-rest-skip-non-enumerable.case b/src/dstr-binding/obj-ptrn-rest-skip-non-enumerable.case index 869ffd241..8b3b3567c 100644 --- a/src/dstr-binding/obj-ptrn-rest-skip-non-enumerable.case +++ b/src/dstr-binding/obj-ptrn-rest-skip-non-enumerable.case @@ -18,15 +18,18 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false }); //- vals o //- body -assert.sameValue(rest.a, 3); -assert.sameValue(rest.b, 4); assert.sameValue(rest.x, undefined); -verifyEnumerable(rest, "a"); -verifyWritable(rest, "a"); -verifyConfigurable(rest, "a"); - -verifyEnumerable(rest, "b"); -verifyWritable(rest, "b"); -verifyConfigurable(rest, "b"); +verifyProperty(rest, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); +verifyProperty(rest, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); diff --git a/src/dstr-binding/obj-ptrn-rest-val-obj.case b/src/dstr-binding/obj-ptrn-rest-val-obj.case index 0379ddd94..c9f87d221 100644 --- a/src/dstr-binding/obj-ptrn-rest-val-obj.case +++ b/src/dstr-binding/obj-ptrn-rest-val-obj.case @@ -15,16 +15,19 @@ features: [object-rest] //- vals {x: 1, y: 2, a: 5, b: 3} //- body -assert.sameValue(rest.x, 1); -assert.sameValue(rest.y, 2); assert.sameValue(rest.a, undefined); assert.sameValue(rest.b, undefined); -verifyEnumerable(rest, "x"); -verifyWritable(rest, "x"); -verifyConfigurable(rest, "x"); - -verifyEnumerable(rest, "y"); -verifyWritable(rest, "y"); -verifyConfigurable(rest, "y"); +verifyProperty(rest, "x", { + enumerable: true, + writable: true, + configurable: true, + value: 1 +}); +verifyProperty(rest, "y", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); diff --git a/src/spread/mult-obj-ident.case b/src/spread/mult-obj-ident.case index 3de69a396..a81d2c55d 100644 --- a/src/spread/mult-obj-ident.case +++ b/src/spread/mult-obj-ident.case @@ -26,24 +26,32 @@ let o = {c: 3, d: 4}; //- params obj //- body -assert.sameValue(obj.a, 1); -assert.sameValue(obj.b, 2); -assert.sameValue(obj.c, 3); -assert.sameValue(obj.d, 4); assert.sameValue(Object.keys(obj).length, 4); -verifyEnumerable(obj, "a"); -verifyWritable(obj, "a"); -verifyConfigurable(obj, "a"); - -verifyEnumerable(obj, "b"); -verifyWritable(obj, "b"); -verifyConfigurable(obj, "b"); - -verifyEnumerable(obj, "c"); -verifyWritable(obj, "c"); -verifyConfigurable(obj, "c"); - -verifyEnumerable(obj, "d"); -verifyWritable(obj, "d"); -verifyConfigurable(obj, "d"); +verifyProperty(obj, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 1 +}); + +verifyProperty(obj, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); + +verifyProperty(obj, "c", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); + +verifyProperty(obj, "d", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); diff --git a/src/spread/obj-getter-descriptor.case b/src/spread/obj-getter-descriptor.case index c3ec65abb..b52b85640 100644 --- a/src/spread/obj-getter-descriptor.case +++ b/src/spread/obj-getter-descriptor.case @@ -31,11 +31,13 @@ let o = { obj //- body -assert.sameValue(Object.getOwnPropertyDescriptor(obj, "a").value, 42); assert.sameValue(obj.c, 4); assert.sameValue(obj.d, 5); assert.sameValue(Object.keys(obj).length, 3); -verifyEnumerable(obj, "a"); -verifyWritable(obj, "a"); -verifyConfigurable(obj, "a"); +verifyProperty(obj, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 42 +}); diff --git a/src/spread/obj-override-immutable.case b/src/spread/obj-override-immutable.case index 836af9841..65b0947c3 100644 --- a/src/spread/obj-override-immutable.case +++ b/src/spread/obj-override-immutable.case @@ -21,11 +21,16 @@ obj assert.sameValue(obj.a, 3) assert.sameValue(obj.b, 2); -verifyEnumerable(obj, "a"); -verifyWritable(obj, "a"); -verifyConfigurable(obj, "a"); - -verifyEnumerable(obj, "b"); -verifyWritable(obj, "b"); -verifyConfigurable(obj, "b"); +verifyProperty(obj, "a", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); +verifyProperty(obj, "b", { + enumerable: true, + writable: true, + configurable: true, + value: 2 +}); diff --git a/src/spread/sngl-obj-ident.case b/src/spread/sngl-obj-ident.case index ad12d9d6c..215d8b039 100644 --- a/src/spread/sngl-obj-ident.case +++ b/src/spread/sngl-obj-ident.case @@ -26,14 +26,18 @@ let o = {c: 3, d: 4}; //- params obj //- body -assert.sameValue(obj.c, 3); -assert.sameValue(obj.d, 4); assert.sameValue(Object.keys(obj).length, 2); -verifyEnumerable(obj, "c"); -verifyWritable(obj, "c"); -verifyConfigurable(obj, "c"); +verifyProperty(obj, "c", { + enumerable: true, + writable: true, + configurable: true, + value: 3 +}); -verifyEnumerable(obj, "d"); -verifyWritable(obj, "d"); -verifyConfigurable(obj, "d"); +verifyProperty(obj, "d", { + enumerable: true, + writable: true, + configurable: true, + value: 4 +}); |