Files
carbon-lang/explorer/testdata/if_expression/if_then_else.carbon
T
Richard Smith 212188a922 Prefer to put STDOUT CHECK at the end of the file. (#3073)
Allow interleaving of STDOUT and STDERR check lines. Put STDOUT lines
after the line they're attached to, and STDERR lines before. If no
STDOUT check line is attached to any line, then put them all at the end
of the file instead.

This is intended to better handle the case where stdout contains
unreplaced mentions of line numbers, and also reflects that stdout is
typically a consequence of the test rather than commentary on it, so
placing it after the test seems likely to read better.
2023-08-08 19:51:52 +00:00

19 lines
571 B
Plaintext

// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// AUTOUPDATE
package ExplorerTest api;
fn Main() -> i32 {
var cond: if true then bool else i32 = true;
if (if cond then true else false) {}
while (if cond then false else true) {}
return if if cond then true or false else false and true
then if not cond then 1 + 2 else 3 * 4
else if not cond then 5 + 6 else 7 * 8;
}
// CHECK:STDOUT: result: 12