Require file tests to specify a min-prelude (#5818)

Use `full.carbon` min-prelude for any tests using the full prelude. A
few tests were using it unnecessarily and are changed to a more minimal
one in the process.

Any test which does not include some min-prelude will now fail with an
error.
This commit is contained in:
Dana Jansens
2025-07-18 16:26:12 +00:00
committed by GitHub
parent 2658142f7b
commit bcba76aca7
69 changed files with 1418 additions and 1387 deletions
@@ -2,6 +2,7 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// INCLUDE-FILE: toolchain/testing/testdata/min_prelude/full.carbon
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
//
@@ -67,7 +68,7 @@ fn Run() {
// CHECK:STDOUT: %x.var: ref %i32 = var %x.var_patt
// CHECK:STDOUT: %str: String = string_literal "hello" [concrete = constants.%str]
// CHECK:STDOUT: assign %x.var, <error>
// CHECK:STDOUT: %.loc19: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %.loc20: type = splice_block %i32 [concrete = constants.%i32] {
// CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
// CHECK:STDOUT: %i32: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
// CHECK:STDOUT: }