mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 09:29:34 +00:00
While most of the examples in our tests are made clear by the code snippet, sometimes that's not the case. This makes it more clear when the implicit `Main` package is used for example. I added this because I got an error message without any source code to show in the snippet (importing the prelude for example) and this makes the error much more understandable.
60 lines
1.9 KiB
Plaintext
60 lines
1.9 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
|
|
//
|
|
// AUTOUPDATE
|
|
|
|
// --- fail_no_api.impl.carbon
|
|
|
|
// CHECK:STDERR: fail_no_api.impl.carbon:[[@LINE+4]]:1: ERROR: Corresponding API for 'Foo' not found.
|
|
// CHECK:STDERR: package Foo impl;
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
package Foo impl;
|
|
|
|
// --- fail_no_api_lib.impl.carbon
|
|
|
|
// CHECK:STDERR: fail_no_api_lib.impl.carbon:[[@LINE+4]]:1: ERROR: Corresponding API for 'Foo//Bar' not found.
|
|
// CHECK:STDERR: package Foo library "Bar" impl;
|
|
// CHECK:STDERR: ^~~~~~~
|
|
// CHECK:STDERR:
|
|
package Foo library "Bar" impl;
|
|
|
|
// --- fail_no_api_main_lib.impl.carbon
|
|
|
|
// CHECK:STDERR: fail_no_api_main_lib.impl.carbon:[[@LINE+3]]:1: ERROR: Corresponding API for 'Main//Bar' not found.
|
|
// CHECK:STDERR: library "Bar" impl;
|
|
// CHECK:STDERR: ^~~~~~~
|
|
library "Bar" impl;
|
|
|
|
// CHECK:STDOUT: --- fail_no_api.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .Core = %Core
|
|
// CHECK:STDOUT: has_error
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_no_api_lib.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .Core = %Core
|
|
// CHECK:STDOUT: has_error
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: --- fail_no_api_main_lib.impl.carbon
|
|
// CHECK:STDOUT:
|
|
// CHECK:STDOUT: file {
|
|
// CHECK:STDOUT: package: <namespace> = namespace [template] {
|
|
// CHECK:STDOUT: .Core = %Core
|
|
// CHECK:STDOUT: has_error
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
|
|
// CHECK:STDOUT: }
|
|
// CHECK:STDOUT:
|