Skip to content

Rename toolchain/check/testdata/interop/cpp/no_prelude/function_decl_inline.carbon and its shard files to simpler names #5476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,41 @@
//
// AUTOUPDATE
// TIP: To test this file alone, run:
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/no_prelude/function_decl_inline.carbon
// TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/interop/cpp/no_prelude/function_inline.carbon
// TIP: To dump output, run:
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/no_prelude/function_decl_inline.carbon
// TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interop/cpp/no_prelude/function_inline.carbon

// ============================================================================
// inline_function_decl_with_definition
// with_definition
// ============================================================================

// --- inline_function_decl_with_definition.h
// --- with_definition.h

inline void foo() {}

// --- import_inline_function_decl_with_definition.carbon
// --- import_with_definition.carbon

library "[[@TEST_NAME]]";

import Cpp library "inline_function_decl_with_definition.h";
import Cpp library "with_definition.h";

fn MyF() {
Cpp.foo();
}

// ============================================================================
// inline_function_decl_without_definition
// without_definition
// ============================================================================

// --- inline_function_decl_without_definition.h
// --- without_definition.h

inline void foo();

// --- todo_fail_import_inline_function_decl_without_definition.carbon
// --- todo_fail_import_without_definition.carbon

library "[[@TEST_NAME]]";

import Cpp library "inline_function_decl_without_definition.h";
import Cpp library "without_definition.h";

fn MyF() {
// TODO: Error on using an inline function without definition.
Expand All @@ -48,7 +48,7 @@ fn MyF() {
Cpp.foo();
}

// CHECK:STDOUT: --- import_inline_function_decl_with_definition.carbon
// CHECK:STDOUT: --- import_with_definition.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
Expand All @@ -71,7 +71,7 @@ fn MyF() {
// CHECK:STDOUT: .MyF = %MyF.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
// CHECK:STDOUT: import Cpp "inline_function_decl_with_definition.h"
// CHECK:STDOUT: import Cpp "with_definition.h"
// CHECK:STDOUT: }
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
// CHECK:STDOUT: }
Expand All @@ -87,7 +87,7 @@ fn MyF() {
// CHECK:STDOUT:
// CHECK:STDOUT: fn @foo();
// CHECK:STDOUT:
// CHECK:STDOUT: --- todo_fail_import_inline_function_decl_without_definition.carbon
// CHECK:STDOUT: --- todo_fail_import_without_definition.carbon
// CHECK:STDOUT:
// CHECK:STDOUT: constants {
// CHECK:STDOUT: %MyF.type: type = fn_type @MyF [concrete]
Expand All @@ -110,7 +110,7 @@ fn MyF() {
// CHECK:STDOUT: .MyF = %MyF.decl
// CHECK:STDOUT: }
// CHECK:STDOUT: %Cpp.import_cpp = import_cpp {
// CHECK:STDOUT: import Cpp "inline_function_decl_without_definition.h"
// CHECK:STDOUT: import Cpp "without_definition.h"
// CHECK:STDOUT: }
// CHECK:STDOUT: %MyF.decl: %MyF.type = fn_decl @MyF [concrete = constants.%MyF] {} {}
// CHECK:STDOUT: }
Expand Down
Loading