mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 22:02:33 +01:00
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.
22 lines
597 B
Plaintext
22 lines
597 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 lhs: i32 = 8;
|
|
var rhs: i32 = 3;
|
|
// Make sure that both the interface and operator work with i32. These rely on
|
|
// builtin arithmetic more directly.
|
|
Print("Interface: {0}", lhs.(SubWith(i32).Op)(rhs));
|
|
Print("Op: {0}", lhs - rhs);
|
|
return 0;
|
|
}
|
|
|
|
// CHECK:STDOUT: Interface: 5
|
|
// CHECK:STDOUT: Op: 5
|
|
// CHECK:STDOUT: result: 0
|