1
0
mirror of https://github.com/tc39/test262.git synced 2025-04-08 19:35:28 +02:00

Add missing test cases for set __proto__ ()

Fixes 
This commit is contained in:
Zirak 2017-03-13 17:03:28 +02:00 committed by Leo Balter
parent 6ef9cef4a0
commit ed2bcdc0a9

@ -12,8 +12,24 @@ features: [Symbol]
---*/
var set = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
var subject = {};
assert.sameValue(set.call(true), undefined, 'boolean');
assert.sameValue(
Object.getPrototypeOf(subject), Object.prototype, 'following boolean'
);
assert.sameValue(set.call(1), undefined, 'number');
assert.sameValue(
Object.getPrototypeOf(subject), Object.prototype, 'following number'
);
assert.sameValue(set.call('string'), undefined, 'string');
assert.sameValue(
Object.getPrototypeOf(subject), Object.prototype, 'following string'
);
assert.sameValue(set.call(Symbol('')), undefined, 'symbol');
assert.sameValue(
Object.getPrototypeOf(subject), Object.prototype, 'following symbol'
);