Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/conditional/S11.12_A2.1_T2.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: "Operator x ? y : z uses GetValue"
6 es5id: 11.12_A2.1_T2
7 description: If GetBase(x) is null, throw ReferenceError
8 ---*/
9
10 //CHECK#1
11 try {
12 x ? true : false;
13 $ERROR('#1.1: x ? true : false throw ReferenceError. Actual: ' + (x ? true : false));
14 }
15 catch (e) {
16 if ((e instanceof ReferenceError) !== true) {
17 $ERROR('#1.2: x ? true : false throw ReferenceError. Actual: ' + (e));
18 }
19 }