Files
carbon-lang/toolchain/check/testdata/packages/fail_api_not_found.carbon
T
Dana Jansens 0b022feb12 Apply min-preludes to more tests (part 8) (#5705)
This drops file_test runtime from about 2.5s to 2s on my machine, which
is now ~50% faster than before
https://github.com/carbon-language/carbon-lang/pull/5653 slowed things
down by adding a lot of stuff to the production prelude.
2025-06-23 13:50:03 +00:00

66 lines
2.5 KiB
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
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/none.carbon
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/packages/fail_api_not_found.carbon
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/packages/fail_api_not_found.carbon
// --- fail_no_api.impl.carbon
// CHECK:STDERR: fail_no_api.impl.carbon:[[@LINE+4]]:1: error: corresponding API for 'Foo' not found [LibraryApiNotFound]
// CHECK:STDERR: impl package Foo;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~
// CHECK:STDERR:
impl package Foo;
// --- fail_no_api_lib.impl.carbon
// CHECK:STDERR: fail_no_api_lib.impl.carbon:[[@LINE+4]]:1: error: corresponding API for 'Foo//no_api_lib' not found [LibraryApiNotFound]
// CHECK:STDERR: impl package Foo library "no_api_lib";
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
impl package Foo library "[[@TEST_NAME]]";
// --- fail_no_api_main_lib.impl.carbon
// CHECK:STDERR: fail_no_api_main_lib.impl.carbon:[[@LINE+4]]:1: error: corresponding API for 'Main//no_api_main_lib' not found [LibraryApiNotFound]
// CHECK:STDERR: impl library "no_api_main_lib";
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
impl library "[[@TEST_NAME]]";
// CHECK:STDOUT: --- fail_no_api.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: has_error
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <none>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_no_api_lib.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: has_error
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <none>
// CHECK:STDOUT: }
// CHECK:STDOUT:
// CHECK:STDOUT: --- fail_no_api_main_lib.impl.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: file {
// CHECK:STDOUT: package: <namespace> = namespace [concrete] {
// CHECK:STDOUT: has_error
// CHECK:STDOUT: }
// CHECK:STDOUT: %default.import = import <none>
// CHECK:STDOUT: }
// CHECK:STDOUT: