mirror of
https://github.com/tc39/test262.git
synced 2025-07-24 14:35:30 +02:00
Re-generate tests
This commit is contained in:
parent
31f7b3e218
commit
7630235d5d
@ -37,7 +37,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");{ function f() { } }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});{ function f() { } }'
|
||||
);
|
||||
|
@ -21,8 +21,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
{ function f() { } }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});{ function f() { } }'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");if (true) function f() { } else function _f() {}'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (true) function f() { } else function _f() {}'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (true) function f() { } else function _f() {}'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (true) function f() { } else function _f() {}'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");if (false) function _f() {} else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (false) function _f() {} else function f() { }'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (false) function _f() {} else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (false) function _f() {} else function f() { }'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");if (true) function f() { } else ;'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (true) function f() { } else ;'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (true) function f() { } else ;'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (true) function f() { } else ;'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");if (true) function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (true) function f() { }'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (true) function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (true) function f() { }'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");if (false) ; else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (false) ; else function f() { }'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (false) ; else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (false) ; else function f() { }'
|
||||
);
|
||||
|
@ -37,9 +37,11 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});switch (1) {' +
|
||||
' case 1:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -21,10 +21,11 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});switch (1) {' +
|
||||
' case 1:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -37,9 +37,11 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyNotConfigurable(global, "f");switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});switch (1) {' +
|
||||
' default:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -21,10 +21,11 @@ eval(
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});switch (1) {' +
|
||||
' default:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -37,7 +37,9 @@ 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");{ function f() { } }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});{ function f() { } }'
|
||||
);
|
||||
|
@ -21,8 +21,9 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
{ function f() { } }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});{ function f() { } }'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ 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");if (true) function f() { } else function _f() {}'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (true) function f() { } else function _f() {}'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (true) function f() { } else function _f() {}'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (true) function f() { } else function _f() {}'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ 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");if (false) function _f() {} else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (false) function _f() {} else function f() { }'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (false) function _f() {} else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (false) function _f() {} else function f() { }'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ 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");if (true) function f() { } else ;'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (true) function f() { } else ;'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (true) function f() { } else ;'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (true) function f() { } else ;'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ 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");if (true) function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (true) function f() { }'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (true) function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (true) function f() { }'
|
||||
);
|
||||
|
@ -46,7 +46,9 @@ 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");if (false) ; else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});if (false) ; else function f() { }'
|
||||
);
|
||||
|
@ -30,8 +30,9 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
if (false) ; else function f() { }'
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});if (false) ; else function f() { }'
|
||||
);
|
||||
|
@ -37,9 +37,11 @@ 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");switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});switch (1) {' +
|
||||
' case 1:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -21,10 +21,11 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});switch (1) {' +
|
||||
' case 1:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -37,9 +37,11 @@ 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");switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: false\
|
||||
});switch (1) {' +
|
||||
' default:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -21,10 +21,11 @@ info: |
|
||||
'var global = fnGlobalObject();\
|
||||
assert.sameValue(f, undefined, "binding is initialized to `undefined`");\
|
||||
\
|
||||
verifyEnumerable(global, "f");\
|
||||
verifyWritable(global, "f");\
|
||||
verifyConfigurable(global, "f");\
|
||||
switch (1) {' +
|
||||
verifyProperty(global, "f", {\
|
||||
enumerable: true,\
|
||||
writable: true,\
|
||||
configurable: true\
|
||||
});switch (1) {' +
|
||||
' default:' +
|
||||
' function f() { }' +
|
||||
'}\
|
||||
|
@ -20,9 +20,11 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
{
|
||||
function f() { }
|
||||
|
@ -29,8 +29,10 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
if (true) function f() { } else function _f() {}
|
||||
|
@ -29,8 +29,10 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
if (false) function _f() {} else function f() { }
|
||||
|
@ -29,8 +29,10 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
if (true) function f() { } else ;
|
||||
|
@ -29,8 +29,10 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
if (true) function f() { }
|
||||
|
@ -29,8 +29,10 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
if (false) ; else function f() { }
|
||||
|
@ -20,9 +20,11 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
switch (1) {
|
||||
case 1:
|
||||
|
@ -20,9 +20,11 @@ info: |
|
||||
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
|
||||
});
|
||||
|
||||
switch (1) {
|
||||
default:
|
||||
|
@ -40,27 +40,35 @@ let o = {c: 3, d: 4};
|
||||
var callCount = 0;
|
||||
|
||||
(function(obj) {
|
||||
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");
|
||||
verifyProperty(obj, "a", {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
value: 1
|
||||
});
|
||||
|
||||
verifyEnumerable(obj, "b");
|
||||
verifyWritable(obj, "b");
|
||||
verifyConfigurable(obj, "b");
|
||||
verifyProperty(obj, "b", {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
value: 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
|
||||
});
|
||||
callCount += 1;
|
||||
}.apply(null, [{a: 1, b: 2, ...o}]));
|
||||
|
||||
|
@ -44,14 +44,16 @@ let o = {
|
||||
var callCount = 0;
|
||||
|
||||
(function(obj) {
|
||||
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
|
||||
});
|
||||
callCount += 1;
|
||||
}.apply(null, [{...o, c: 4, d: 5}]));
|
||||
|
||||
|
@ -34,14 +34,19 @@ var callCount = 0;
|
||||
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
|
||||
});
|
||||
callCount += 1;
|
||||
}.apply(null, [{...o, a: 3}]));
|
||||
|
||||
|
@ -40,17 +40,21 @@ let o = {c: 3, d: 4};
|
||||
var callCount = 0;
|
||||
|
||||
(function(obj) {
|
||||
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
|
||||
});
|
||||
callCount += 1;
|
||||
}.apply(null, [{...o}]));
|
||||
|
||||
|
@ -43,13 +43,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({...x} = { get v() { count++; return 2; } }) => {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -44,18 +44,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({...rest} = o) => {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -42,19 +42,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({a, b, ...rest} = {x: 1, y: 2, a: 5, b: 3}) => {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -43,13 +43,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({...x}) => {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -44,18 +44,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({...rest}) => {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -42,19 +42,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = ({a, b, ...rest}) => {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -34,9 +34,11 @@ var vals = [];
|
||||
|
||||
result = [ arrow = () => {} ] = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -37,9 +37,11 @@ result = [ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} }
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -36,9 +36,11 @@ result = [ xCover = (0, function() {}), cover = (function() {}) ] = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -36,9 +36,11 @@ result = [ xFn = function x() {}, fn = function() {} ] = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -36,9 +36,11 @@ result = [ xGen = function* x() {}, gen = function*() {} ] = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -33,9 +33,11 @@ var vals = {};
|
||||
|
||||
result = { arrow = () => {} } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -36,9 +36,11 @@ result = { xCls = class x {}, cls = class {}, xCls2 = class { static name() {} }
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -35,9 +35,11 @@ result = { xCover = (0, function() {}), cover = (function() {}) } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -35,9 +35,11 @@ result = { xFn = function x() {}, fn = function() {} } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -35,9 +35,11 @@ result = { xGen = function* x() {}, gen = function*() {} } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -34,9 +34,11 @@ var vals = {};
|
||||
|
||||
result = { x: arrow = () => {} } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -37,9 +37,11 @@ result = { x: xCls = class x {}, x: cls = class {}, x: xCls2 = class { static na
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -36,9 +36,11 @@ result = { x: xCover = (0, function() {}), x: cover = (function() {}) } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -36,9 +36,11 @@ result = { x: xFn = function x() {}, x: fn = function() {} } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -36,9 +36,11 @@ result = { x: xGen = function* x() {}, x: gen = function*() {} } = vals;
|
||||
|
||||
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'
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -27,16 +27,19 @@ var vals = obj;
|
||||
|
||||
result = {...rest} = vals;
|
||||
|
||||
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
|
||||
});
|
||||
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -25,12 +25,13 @@ var vals = { get v() { count++; return 2; } };
|
||||
|
||||
result = {...x} = vals;
|
||||
|
||||
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
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -26,17 +26,20 @@ var vals = obj;
|
||||
|
||||
result = {...rest} = vals;
|
||||
|
||||
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
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -27,9 +27,10 @@ result = {...src.y} = vals;
|
||||
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
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -25,18 +25,21 @@ var vals = {x: 1, y: 2, a: 5, b: 3};
|
||||
|
||||
result = {a, b, ...rest} = vals;
|
||||
|
||||
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
|
||||
});
|
||||
|
||||
assert.sameValue(result, vals);
|
||||
|
@ -23,13 +23,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*({...x} = { get v() { count++; return 2; } }) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -24,18 +24,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*({...rest} = o) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -22,19 +22,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*({a, b, ...rest} = {x: 1, y: 2, a: 5, b: 3}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -23,13 +23,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* h({...x} = { get v() { count++; return 2; } }) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -24,18 +24,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* h({...rest} = o) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -22,19 +22,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* h({a, b, ...rest} = {x: 1, y: 2, a: 5, b: 3}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -23,13 +23,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* h({...x}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -24,18 +24,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* h({...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -22,19 +22,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function* h({a, b, ...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -23,13 +23,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*({...x}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -24,18 +24,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*({...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -22,19 +22,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var f;
|
||||
f = async function*({a, b, ...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
};
|
||||
|
||||
|
@ -38,27 +38,35 @@ let o = {c: 3, d: 4};
|
||||
var callCount = 0;
|
||||
|
||||
(function(obj) {
|
||||
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");
|
||||
verifyProperty(obj, "a", {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
value: 1
|
||||
});
|
||||
|
||||
verifyEnumerable(obj, "b");
|
||||
verifyWritable(obj, "b");
|
||||
verifyConfigurable(obj, "b");
|
||||
verifyProperty(obj, "b", {
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
configurable: true,
|
||||
value: 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
|
||||
});
|
||||
callCount += 1;
|
||||
}({a: 1, b: 2, ...o}));
|
||||
|
||||
|
@ -42,14 +42,16 @@ let o = {
|
||||
var callCount = 0;
|
||||
|
||||
(function(obj) {
|
||||
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
|
||||
});
|
||||
callCount += 1;
|
||||
}({...o, c: 4, d: 5}));
|
||||
|
||||
|
@ -32,14 +32,19 @@ var callCount = 0;
|
||||
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
|
||||
});
|
||||
callCount += 1;
|
||||
}({...o, a: 3}));
|
||||
|
||||
|
@ -38,17 +38,21 @@ let o = {c: 3, d: 4};
|
||||
var callCount = 0;
|
||||
|
||||
(function(obj) {
|
||||
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
|
||||
});
|
||||
callCount += 1;
|
||||
}({...o}));
|
||||
|
||||
|
@ -47,13 +47,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method({...x} = { get v() { count++; return 2; } }) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -48,18 +48,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method({...rest} = o) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -46,19 +46,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method({a, b, ...rest} = {x: 1, y: 2, a: 5, b: 3}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -47,13 +47,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method({...x}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -48,18 +48,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method({...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -46,19 +46,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
async *method({a, b, ...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -47,13 +47,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method({...x} = { get v() { count++; return 2; } }) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -48,18 +48,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method({...rest} = o) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -46,19 +46,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method({a, b, ...rest} = {x: 1, y: 2, a: 5, b: 3}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -47,13 +47,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method({...x}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -48,18 +48,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method({...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -46,19 +46,22 @@ info: |
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
static async *method({a, b, ...rest}) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -67,13 +67,14 @@ var count = 0;
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
*method({...x} = { get v() { count++; return 2; } }) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
@ -68,18 +68,21 @@ Object.defineProperty(o, "x", { value: 4, enumerable: false });
|
||||
var callCount = 0;
|
||||
var C = class {
|
||||
*method({...rest} = o) {
|
||||
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
|
||||
});
|
||||
callCount = callCount + 1;
|
||||
}
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user