summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/built-ins/Boolean/S9.2_A1_T1.js
blob: ef74e43f64b64b516400e630c8bbecf8f9bf62dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright 2009 the Sputnik authors.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
info: Result of boolean conversion from undefined value is false
esid: sec-toboolean
description: >
    Undefined, void and others are converted to Boolean by explicit
    transformation
---*/

assert.sameValue(Boolean(undefined), false, 'Boolean(undefined) must return false');
assert.sameValue(Boolean(void 0), false, 'Boolean(void 0) must return false');
assert.sameValue(Boolean(eval("var x")), false, 'Boolean(eval("var x")) must return false');
assert.sameValue(Boolean(), false, 'Boolean() must return false');

reportCompare(0, 0);