Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/decodeURIComponent/S15.1.3.2_A5.7.js

raw
1 // Copyright 2009 the Sputnik authors. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 info: The decodeURIComponent property can't be used as constructor
6 es5id: 15.1.3.2_A5.7
7 es6id: 18.2.6.3
8 esid: sec-decodeuricomponent-encodeduricomponent
9 description: >
10 If property does not implement the internal [[Construct]] method,
11 throw a TypeError exception
12 ---*/
13
14 //CHECK#1
15
16 try {
17 new decodeURIComponent();
18 $ERROR('#1.1: new decodeURIComponent() throw TypeError. Actual: ' + (new decodeURIComponent()));
19 } catch (e) {
20 if ((e instanceof TypeError) !== true) {
21 $ERROR('#1.2: new decodeURIComponent() throw TypeError. Actual: ' + (e));
22 }
23 }