mirror of https://github.com/tc39/test262.git
Transform compareArray -> assert.compareArray: test/built-ins/Reflect/**/*.js (#3232)
This commit is contained in:
parent
891b7915bd
commit
0f47fe4528
|
@ -45,10 +45,9 @@ Object.defineProperty(o1, 'p', {
|
|||
|
||||
var result = Reflect.getOwnPropertyDescriptor(o1, 'p');
|
||||
|
||||
assert(
|
||||
compareArray(
|
||||
Object.getOwnPropertyNames(result), ['get', 'set', 'enumerable', 'configurable']
|
||||
)
|
||||
assert.compareArray(
|
||||
Object.getOwnPropertyNames(result),
|
||||
['get', 'set', 'enumerable', 'configurable']
|
||||
);
|
||||
assert.sameValue(result.enumerable, false);
|
||||
assert.sameValue(result.configurable, true);
|
||||
|
|
|
@ -21,10 +21,9 @@ var o1 = {
|
|||
|
||||
var result = Reflect.getOwnPropertyDescriptor(o1, 'p');
|
||||
|
||||
assert(
|
||||
compareArray(
|
||||
Object.getOwnPropertyNames(result), ['value', 'writable', 'enumerable', 'configurable']
|
||||
)
|
||||
assert.compareArray(
|
||||
Object.getOwnPropertyNames(result),
|
||||
['value', 'writable', 'enumerable', 'configurable']
|
||||
);
|
||||
assert.sameValue(result.value, 'foo');
|
||||
assert.sameValue(result.enumerable, true);
|
||||
|
|
|
@ -27,10 +27,9 @@ o[s] = 42;
|
|||
|
||||
var result = Reflect.getOwnPropertyDescriptor(o, s);
|
||||
|
||||
assert(
|
||||
compareArray(
|
||||
Object.getOwnPropertyNames(result), ['value', 'writable', 'enumerable', 'configurable']
|
||||
)
|
||||
assert.compareArray(
|
||||
Object.getOwnPropertyNames(result),
|
||||
['value', 'writable', 'enumerable', 'configurable']
|
||||
);
|
||||
assert.sameValue(result.value, 42);
|
||||
assert.sameValue(result.enumerable, true);
|
||||
|
|
|
@ -23,7 +23,4 @@ var o = Object.create(proto);
|
|||
o.p1 = 42;
|
||||
o.p2 = 43;
|
||||
o.p3 = 44;
|
||||
assert(
|
||||
compareArray(Reflect.ownKeys(o), ['p1', 'p2', 'p3']),
|
||||
'return object own keys'
|
||||
);
|
||||
assert.compareArray(Reflect.ownKeys(o), ['p1', 'p2', 'p3'], 'return object own keys');
|
||||
|
|
|
@ -15,10 +15,10 @@ includes: [compareArray.js]
|
|||
features: [Reflect]
|
||||
---*/
|
||||
|
||||
assert(compareArray(Reflect.ownKeys({}), []));
|
||||
assert.compareArray(Reflect.ownKeys({}), []);
|
||||
|
||||
var o = {
|
||||
d: 42
|
||||
};
|
||||
delete o.d;
|
||||
assert(compareArray(Reflect.ownKeys(o), []));
|
||||
assert.compareArray(Reflect.ownKeys(o), []);
|
||||
|
|
|
@ -15,15 +15,13 @@ includes: [compareArray.js]
|
|||
features: [Reflect]
|
||||
---*/
|
||||
|
||||
assert(
|
||||
compareArray(Reflect.ownKeys([]), ['length']),
|
||||
assert.compareArray(
|
||||
Reflect.ownKeys([]),
|
||||
['length'],
|
||||
'return non enumerable `length` from empty array'
|
||||
);
|
||||
|
||||
assert(
|
||||
compareArray(Reflect.ownKeys([, , 2]), ['2', 'length']),
|
||||
'return array keys'
|
||||
);
|
||||
assert.compareArray(Reflect.ownKeys([, , 2]), ['2', 'length'], 'return array keys');
|
||||
|
||||
var o = {};
|
||||
Object.defineProperty(o, 'p1', {
|
||||
|
@ -35,4 +33,4 @@ Object.defineProperty(o, 'p2', {
|
|||
enumerable: false
|
||||
});
|
||||
|
||||
assert(compareArray(Reflect.ownKeys(o), ['p1', 'p2']));
|
||||
assert.compareArray(Reflect.ownKeys(o), ['p1', 'p2']);
|
||||
|
|
Loading…
Reference in New Issue