blob: 3eff2032f3d805eabc62356c1efcbbf4fd857642 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 13.6.7
description: Completion value when expression is false without an `else` clause
info: |
IfStatement : if ( Expression ) Statement
[...]
4. If exprValue is false, then
a. Return NormalCompletion(undefined).
---*/
assert.sameValue(eval('1; if (false) { }'), undefined);
assert.sameValue(eval('2; if (false) { 3; }'), undefined);
reportCompare(0, 0);
|