mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
While one can disable building the embedded stdlib, the tests for that feature were unconditionally added. If one wants to just build the compiler without any stdlib (except target), a bunch of embedded tests would have failed. Inject the value of `SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB` into the Lit test system as a feature `embedded_stdlib` and add `REQUIRES:` to a couple of tests outside the `embedded/` directory that seems to use the experimental feature. Make the tests in `embedded/` unsupported in the local Lit configuration file.
17 lines
698 B
Swift
17 lines
698 B
Swift
// REQUIRES: asserts
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: OS=macosx
|
|
// REQUIRES: embedded_stdlib
|
|
// RUN: %batch-code-completion -target %target-cpu-apple-macos14 -enable-experimental-feature Embedded
|
|
|
|
func test() {
|
|
#^GLOBAL^#
|
|
// GLOBAL: Literal[Integer]/None: 0[#Int#];
|
|
// GLOBAL: Literal[Boolean]/None: true[#Bool#];
|
|
// GLOBAL: Literal[Boolean]/None: false[#Bool#];
|
|
// GLOBAL: Literal[Nil]/None: nil;
|
|
// GLOBAL: Literal[String]/None: "{#(abc)#}"[#String#];
|
|
// GLOBAL: Literal[Array]/None: [{#(values)#}][#Array#];
|
|
// GLOBAL: Literal[Dictionary]/None: [{#(key)#}: {#(value)#}][#Dictionary#];
|
|
}
|