mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-29 18:24:57 +01:00
On #2224 @zygoloid pointed out we needed --implicit-check-not to ensure we were correctly matching output. This is the standard way we're writing explorer tests, so I was looking at unifying our lit approaches. This is one take on it, making more use of substitutions to bring various testing into alignment, as well as symlinks to avoid config skew (maybe I'll eventually figure out a better solution than symlinks). Makes a couple small fixes in explorer to remove end-of-line whitespace on output.
20 lines
697 B
Plaintext
20 lines
697 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
|
|
//
|
|
// This won't auto-update because it uses a regex for the prelude line number,
|
|
// so that it doesn't need to be updated on every prelude change.
|
|
//
|
|
// RUN: %{not} %{explorer} %s 2>&1 | %{FileCheck-strict} %s
|
|
// RUN: %{not} %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
|
|
// NOAUTOUPDATE
|
|
// CHECK:RUNTIME ERROR: {{.*}}/explorer/data/prelude.carbon:{{.*}}: "HALLO WELT"
|
|
|
|
package ExplorerTest api;
|
|
|
|
fn Main() -> i32 {
|
|
Assert(true, "HALLO WELT");
|
|
Assert(false, "HALLO WELT");
|
|
return 0;
|
|
}
|