Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / assign / source-get-attr-error.js
blob45dd48223d404de44efdfcd51d0732e5b138c6e2
1 // Copyright (C) 2015 the V8 project authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3 /*---
4 es6id: 19.1.2.1
5 description: Errors thrown during retrieval of source object attributes
6 info: |
7     [...]
8     5. For each element nextSource of sources, in ascending index order,
9     [...]
10     c. Repeat for each element nextKey of keys in List order,
11        [...]
12        iii. if desc is not undefined and desc.[[Enumerable]] is true, then
13             1. Let propValue be Get(from, nextKey).
14             2. ReturnIfAbrupt(propValue).
15 ---*/
17 var source = {
18   get attr() {
19     throw new Test262Error();
20   }
23 assert.throws(Test262Error, function() {
24   Object.assign({}, source);
25 });
27 reportCompare(0, 0);