mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 11:08:11 +00: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.
21 lines
757 B
Plaintext
21 lines
757 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
|
|
//
|
|
// RUN: %{not} %{explorer} %s 2>&1 | %{FileCheck-strict} %s
|
|
// RUN: %{not} %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
|
|
// AUTOUPDATE: %{explorer} %s
|
|
|
|
package ExplorerTest api;
|
|
|
|
// TODO: We should type-check the prelude before the main input so that we can
|
|
// use it within the types of top-level declarations.
|
|
// CHECK:COMPILATION ERROR: {{.*}}/explorer/testdata/function/fail_invalid_fnty.carbon:[[@LINE+2]]: type error in `-`:
|
|
// CHECK:missing declaration for builtin `Negate`
|
|
fn f(g: __Fn(-true) -> true) {
|
|
}
|
|
|
|
fn Main() -> i32 {
|
|
return 0;
|
|
}
|