mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:30:12 +01:00
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.
66 lines
2.5 KiB
Plaintext
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:
|