Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/harness/propertyhelper-verifyconfigurable-not-configurable-strict.js

raw symbols SCIP
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 /*---
5 description: >
6 Objects whose specified property is not configurable do not satisfy the
7 assertion in strict mode.
8 includes: [propertyHelper.js,sta.js]
9 flags: [onlyStrict]
10 ---*/
11 var threw = false;
12 var obj = {};
13 Object.defineProperty(obj, 'a', {
14 configurable: false
15 });
16
17 try {
18 verifyConfigurable(obj, 'a');
19 } catch(err) {
20 threw = true;
21 if (err.constructor !== Test262Error) {
22 $ERROR(
23 'Expected a Test262Error, but a "' + err.constructor.name +
24 '" was thrown.'
25 );
26 }
27 }
28
29 if (threw === false) {
30 $ERROR('Expected a Test262Error, but no error was thrown.');
31 }