mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 06:54:44 +01:00
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:
+5
-4
@@ -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/int.carbon
|
||||
// TODO: Add ranges and switch to "--dump-sem-ir-ranges=only".
|
||||
// EXTRA-ARGS: --dump-sem-ir-ranges=if-present
|
||||
//
|
||||
@@ -40,8 +41,8 @@ var x: {.a: i32} = {.a: i32};
|
||||
// CHECK:STDOUT: import Core//prelude
|
||||
// CHECK:STDOUT: import Core//prelude/...
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/types/int, Int, loaded [concrete = constants.%Int.generic]
|
||||
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/operators/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
|
||||
// CHECK:STDOUT: %Core.Int: %Int.type = import_ref Core//prelude/parts/int, Int, loaded [concrete = constants.%Int.generic]
|
||||
// CHECK:STDOUT: %Core.ImplicitAs: %ImplicitAs.type.cc7 = import_ref Core//prelude/parts/as, ImplicitAs, loaded [concrete = constants.%ImplicitAs.generic]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT:
|
||||
// CHECK:STDOUT: file {
|
||||
@@ -55,7 +56,7 @@ var x: {.a: i32} = {.a: i32};
|
||||
// CHECK:STDOUT: %x.var_patt: %pattern_type.268 = var_pattern %x.patt [concrete]
|
||||
// CHECK:STDOUT: }
|
||||
// CHECK:STDOUT: %x.var: ref %struct_type.a = var %x.var_patt [concrete]
|
||||
// CHECK:STDOUT: %.loc21: type = splice_block %struct_type.a [concrete = constants.%struct_type.a] {
|
||||
// CHECK:STDOUT: %.loc22: type = splice_block %struct_type.a [concrete = constants.%struct_type.a] {
|
||||
// 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: %struct_type.a: type = struct_type {.a: %i32} [concrete = constants.%struct_type.a]
|
||||
@@ -68,7 +69,7 @@ var x: {.a: i32} = {.a: 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: %struct_type.a: type = struct_type {.a: %i32} [concrete = constants.%struct_type.a]
|
||||
// CHECK:STDOUT: %.loc21: %struct_type.a = converted %struct_type.a, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: %.loc22: %struct_type.a = converted %struct_type.a, <error> [concrete = <error>]
|
||||
// CHECK:STDOUT: assign file.%x.var, <error>
|
||||
// CHECK:STDOUT: return
|
||||
// CHECK:STDOUT: }
|
||||
|
||||
Reference in New Issue
Block a user