Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/S15.2.2.1_A4_T3.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: |
6 When the Object constructor is called with one argument value and
7 the type of value is Boolean, return ToObject(boolean)
8 es5id: 15.2.2.1_A4_T3
9 description: Argument value is boolean expression
10 ---*/
11
12 var n_obj = new Object((1 === 1) && !(false));
13
14 //CHECK#2
15 if (n_obj.constructor !== Boolean) {
16 $ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');
17 }
18
19 //CHECK#3
20 if (typeof n_obj !== 'object') {
21 $ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');
22 }
23
24 //CHECK#4
25 if (n_obj != true) {
26 $ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');
27 }
28
29 //CHECK#5
30 if (n_obj === true) {
31 $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');
32 }