Skip to content

Commit ba68faa

Browse files
committed
[test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or `--enable-upcoming-feature` in the tests and replace some of the `REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which should correctly apply to depending on the asserts/noasserts mode of the toolchain for each feature. Remove some comments that talked about enabling asserts since they don't apply anymore (but I might had miss some). All this was done with an automated script, so some formatting weirdness might happen, but I hope I fixed most of those. There might be some tests that were `REQUIRES: asserts` that might run in `noasserts` toolchains now. This will normally be because their feature went from experimental to upcoming/base and the tests were not updated.
1 parent facdb57 commit ba68faa

File tree

727 files changed

+1047
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

727 files changed

+1047
-297
lines changed

test/ASTGen/attrs.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@
1212

1313
// REQUIRES: executable_test
1414
// REQUIRES: swift_swift_parser
15+
// REQUIRES: swift_feature_ParserASTGen
1516

16-
// -enable-experimental-feature requires an asserts build
17-
// REQUIRES: asserts
1817
// rdar://116686158
1918
// UNSUPPORTED: asan
2019

test/ASTGen/decls.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313

1414
// REQUIRES: executable_test
1515
// REQUIRES: swift_swift_parser
16+
// REQUIRES: swift_feature_ParserASTGen
17+
// REQUIRES: swift_feature_SwiftParser
18+
// REQUIRES: swift_feature_ValueGenerics
1619

17-
// -enable-experimental-feature requires an asserts build
18-
// REQUIRES: asserts
1920
// rdar://116686158
2021
// UNSUPPORTED: asan
2122

test/ASTGen/diagnostics.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
// RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-bare-slash-regex -enable-experimental-feature ParserASTGen
1313

1414
// REQUIRES: swift_swift_parser
15-
// -enable-experimental-feature requires an asserts build
16-
// REQUIRES: asserts
15+
// REQUIRES: swift_feature_ParserASTGen
1716
// rdar://116686158
1817
// UNSUPPORTED: asan
1918

test/ASTGen/do_expr.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
// RUN: %target-typecheck-verify-swift -disable-availability-checking -enable-experimental-feature DoExpressions -enable-experimental-feature ParserASTGen
1313

1414
// REQUIRES: swift_swift_parser
15-
// -enable-experimental-feature requires an asserts build
16-
// REQUIRES: asserts
15+
// REQUIRES: swift_feature_DoExpressions
16+
// REQUIRES: swift_feature_ParserASTGen
1717
// rdar://116686158
1818
// UNSUPPORTED: asan
1919

test/ASTGen/exprs.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
// REQUIRES: executable_test
1515
// REQUIRES: swift_swift_parser
16+
// REQUIRES: swift_feature_ParserASTGen
17+
// REQUIRES: swift_feature_SwiftParser
1618

17-
// -enable-experimental-feature requires an asserts build
18-
// REQUIRES: asserts
1919
// rdar://116686158
2020
// UNSUPPORTED: asan
2121

test/ASTGen/if_config.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -DDISCARDABLE -DNONSENDABLE -swift-version 6
2-
/// -enable-experimental-feature requires an asserts build
3-
// REQUIRES: asserts
2+
3+
// REQUIRES: swift_feature_ParserASTGen
44

55
#if NOT_SET
66
func f { } // expected-error{{expected parameter clause in function signature}}

test/ASTGen/if_config_expr.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -D CONDITION_1
22

3-
// -enable-experimental-feature requires an asserts build
4-
// REQUIRES: asserts
53
// REQUIRES: swift_swift_parser
4+
// REQUIRES: swift_feature_ParserASTGen
65

76
postfix operator ++
87
postfix func ++ (_: Int) -> Int { 0 }

test/ASTGen/macros.swift

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// REQUIRES: swift_swift_parser, asserts
2+
// REQUIRES: swift_feature_ParserASTGen
23

34
// RUN: %empty-directory(%t)
45

test/ASTGen/regex.swift

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen -enable-bare-slash-regex -disable-availability-checking
1212

1313
// REQUIRES: swift_swift_parser
14+
// REQUIRES: swift_feature_ParserASTGen
1415

15-
// -enable-experimental-feature requires an asserts build
16-
// REQUIRES: asserts
1716
// rdar://116686158
1817
// UNSUPPORTED: asan
1918

test/ASTGen/stmts.swift

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212

1313
// REQUIRES: executable_test
1414
// REQUIRES: swift_swift_parser
15+
// REQUIRES: swift_feature_ParserASTGen
16+
// REQUIRES: swift_feature_SwiftParser
17+
// REQUIRES: swift_feature_ThenStatements
1518

16-
// -enable-experimental-feature requires an asserts build
17-
// REQUIRES: asserts
1819
// rdar://116686158
1920
// UNSUPPORTED: asan
2021

test/ASTGen/top_level.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
// RUN: %diff -u %t/astgen.ast %t/cpp-parser.ast
1010

11-
// -enable-experimental-feature requires an asserts build
12-
// REQUIRES: asserts
11+
// REQUIRES: swift_feature_ParserASTGen
12+
1313
// rdar://116686158
1414
// UNSUPPORTED: asan
1515

test/ASTGen/types.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-typecheck-verify-swift -enable-experimental-feature ParserASTGen
22

3-
// -enable-experimental-feature requires an asserts build
4-
// REQUIRES: asserts
3+
// REQUIRES: swift_feature_ParserASTGen
4+
55
// rdar://116686158
66
// UNSUPPORTED: asan
77

test/AssociatedTypeInference/associated_type_tuple.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %target-typecheck-verify-swift -enable-experimental-feature TupleConformances
22

3-
// REQUIRES: asserts
3+
// REQUIRES: swift_feature_TupleConformances
44

55
typealias Tuple<each T> = (repeat each T)
66

test/CAS/block-list.swift

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
// RUN: -cache-replay-prefix-map /^tmp=%t \
4141
// RUN: /^tmp/main.swift @%t/MyApp.cmd 2>&1 | %FileCheck %s --check-prefix CHECK-BLOCKED
4242

43+
// REQUIRES: swift_feature_LayoutStringValueWitnesses
44+
// REQUIRES: swift_feature_LayoutStringValueWitnessesInstantiation
45+
4346
// CHECK-BLOCKED: note: Layout string value witnesses have been disabled for module 'Test' through block list entry
4447
// CHECK-BLOCKED-NOT: type_layout_string
4548

test/ClangImporter/dynamic_actor_isolation_checks.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-availability-checking -enable-upcoming-feature DynamicActorIsolation -emit-silgen -module-name preconcurrency_conformances %t/src/checks.swift | %FileCheck %t/src/checks.swift
55
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -disable-availability-checking -swift-version 6 -disable-dynamic-actor-isolation -emit-silgen -module-name preconcurrency_conformances %t/src/checks_disabled.swift | %FileCheck %t/src/checks_disabled.swift
66

7-
// REQUIRES: asserts
87
// REQUIRES: concurrency
98
// REQUIRES: objc_interop
9+
// REQUIRES: swift_feature_DynamicActorIsolation
1010

1111
//--- checks.swift
1212
import Foundation

test/ClangImporter/incomplete_objc_types_availability.swift

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// REQUIRES: objc_interop
1212
// REQUIRES: executable_test
13+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1314

1415
// Verify that Clang declarations referencing either of the forward declares types "ForwardDeclaredInterface" or
1516
// "ForwardDeclaredProtocol" are usable from Swift.

test/ClangImporter/incomplete_objc_types_base_interface.swift

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// REQUIRES: objc_interop
99
// REQUIRES: executable_test
1010
// REQUIRES: OS=macosx
11+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1112

1213
import Foundation
1314
import IncompleteTypeLibrary1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %target-swift-frontend -import-objc-header %S/Inputs/incomplete_objc_types_bridging_header.h -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck %s
22

33
// REQUIRES: objc_interop
4+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
45

56
let foo = CFunctionReturningAForwardDeclaredInterface()
67
CFunctionTakingAForwardDeclaredInterface(foo)

test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete.swift

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
// REQUIRES: objc_interop
1313
// REQUIRES: executable_test
14+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1415

1516
// "ForwardDeclaredInterface" and "ForwardDeclaredProtocol" are forward declared in IncompleteTypeLibrary1/2, and
1617
// completely declared in CompleteTypes. This test verifies that instances of the complete types can be passed

test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_clang_definition.swift

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
// REQUIRES: executable_test
1111
// REQUIRES: objc_interop
12+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1213

1314
//--- full_definition.swift
1415

test/ClangImporter/incomplete_objc_types_compatibility_complete_incomplete_inter_file_swift_definition.swift

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// RUN: not %target-swift-frontend -enable-upcoming-feature ImportObjcForwardDeclarations -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %t/incomplete_definition.swift %t/full_definition.swift -diagnostic-style llvm 2>&1 | %FileCheck %s
66

77
// REQUIRES: objc_interop
8+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
89

910
//--- full_definition.swift
1011

test/ClangImporter/incomplete_objc_types_compatibility_incomplete_incomplete.swift

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
// REQUIRES: objc_interop
1313
// REQUIRES: executable_test
14+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1415

1516
// Both libraries "IncompleteTypeConsumer1" and "IncompleteTypeConsumer2" forward declare an interface "ForwardDeclaredInterface"
1617
// and a protocol "ForwardDeclaredProtocol". This test verifies that the synthesized Swift declaration created to represent

test/ClangImporter/incomplete_objc_types_full_availability.swift

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
// REQUIRES: objc_interop
99
// REQUIRES: executable_test
10+
// REQUIRES: swift_feature_ImportObjCForwardDeclarations
1011

1112
import IncompleteTypeLibrary1
1213
import CompleteTypes

test/ClangImporter/incomplete_objc_types_importing_limitations_diagnostics.swift

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s -diagnostic-style llvm 2>&1 | %FileCheck %s
33

44
// REQUIRES: objc_interop
5+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
56

67
import IncompleteTypeLibrary1
78
import IncompleteNoRootTypeProtocolLibrary

test/ClangImporter/incomplete_objc_types_no_reference.swift

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes %s 2>&1 | %FileCheck %s
33

44
// REQUIRES: objc_interop
5+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
56

67
import IncompleteTypeLibrary1
78

test/ClangImporter/incomplete_objc_types_no_root_protocol.swift

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
// REQUIRES: objc_interop
1111
// REQUIRES: executable_test
12+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1213

1314
// Verify that a forward declared protocol not inheriting from NSObject is usable
1415
// from Swift, if cumbersome

test/ClangImporter/incomplete_objc_types_nsproxy.swift

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
// REQUIRES: objc_interop
1111
// REQUIRES: executable_test
12+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1213

1314
// Verify that a forward declared interface for a type inheriting from NSProxy instead
1415
// of NSObject is still usable from Swift.

test/ClangImporter/incomplete_objc_types_swift_definition_imported.swift

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s
55

66
// REQUIRES: objc_interop
7+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
78

89
import CompleteSwiftTypes
910
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

test/ClangImporter/incomplete_objc_types_swift_definition_imported_implementationOnly.swift

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s
55

66
// REQUIRES: objc_interop
7+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
78

89
@_implementationOnly import CompleteSwiftTypes
910
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

test/ClangImporter/incomplete_objc_types_swift_definition_imported_name_conflict.swift

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// RUN: not %target-swift-frontend -swift-version 6 -enable-objc-interop -typecheck -I %S/Inputs/custom-modules/IncompleteTypes -I %t %s -diagnostic-style llvm 2>&1 | %FileCheck %s
55

66
// REQUIRES: objc_interop
7+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
78

89
import CompleteSwiftTypes
910
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

test/ClangImporter/incomplete_objc_types_swift_definition_imported_shadow_type_mismatch.swift

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
// REQUIRES: objc_interop
88
// REQUIRES: executable_test
9+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
910

1011
import CompleteSwiftTypes
1112
import ObjCLibraryForwardDeclaringCompleteSwiftTypes

test/ClangImporter/incomplete_objc_types_swift_ide_test.swift

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// RUN: -enable-objc-interop -swift-version 6 -source-filename x | %FileCheck %s
1212

1313
// REQUIRES: objc_interop
14+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
1415

1516
// CHECK: import Foundation
1617
// CHECK: @available(*, unavailable, message: "This Objective-C class has only been forward-declared; import its owning module to use it")

test/ClangImporter/objc_async.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// REQUIRES: objc_interop
44
// REQUIRES: concurrency
5-
// REQUIRES: asserts
5+
// REQUIRES: swift_feature_SendableCompletionHandlers
66

77
import Foundation
88
import ObjCConcurrency

test/ClangImporter/objc_forward_declarations.swift

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// RUN: %target-swift-frontend -emit-module -o %t -I %S/Inputs/custom-modules -enable-objc-interop %s
33
// RUN: %target-swift-ide-test -print-module -module-to-print objc_forward_declarations -I %t -I %S/Inputs/custom-modules -enable-objc-interop -enable-upcoming-feature ImportObjcForwardDeclarations -source-filename x | %FileCheck %s
44

5+
// REQUIRES: swift_feature_ImportObjcForwardDeclarations
6+
57
// CHECK: class Innocuous : Confusing {
68

79
import ForwardDeclarationsHelper

test/ClangImporter/sending.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -swift-version 6 -disable-availability-checking -emit-sil -o /dev/null %s -parse-as-library -enable-experimental-feature SendingArgsAndResults -verify -import-objc-header %S/Inputs/sending.h
22

33
// REQUIRES: concurrency
4-
// REQUIRES: asserts
4+
// REQUIRES: swift_feature_SendingArgsAndResults
55

66
////////////////////////
77
// MARK: Declarations //

test/Concurrency/CaseIterableIsolation.swift

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
// REQUIRES: executable_test
55
// REQUIRES: concurrency
6+
// REQUIRES: swift_feature_RegionBasedIsolation
67

78
import StdlibUnittest
89

test/Concurrency/Runtime/actor_deinit_escaping_self.swift

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// REQUIRES: libdispatch
55
// REQUIRES: concurrency
66
// REQUIRES: concurrency_runtime
7+
// REQUIRES: swift_feature_IsolatedDeinit
78
// UNSUPPORTED: back_deployment_runtime
89

910
import _Concurrency

test/Concurrency/Runtime/actor_recursive_deinit.swift

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
// REQUIRES: concurrency
55

66
// REQUIRES: concurrency_runtime
7+
// REQUIRES: swift_feature_IsolatedDeinit
78
// UNSUPPORTED: back_deployment_runtime
89

910
// Compiler crashes because builtin "ifdef_SWIFT_STDLIB_PRINT_DISABLED"() gets lowered as "i32 0",

test/Concurrency/Runtime/async_task_locals_isolated_deinit.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// REQUIRES: executable_test
88
// REQUIRES: concurrency
99
// REQUIRES: concurrency_runtime
10+
// REQUIRES: swift_feature_IsolatedDeinit
1011
// UNSUPPORTED: back_deployment_runtime
1112

1213
import Swift
@@ -87,14 +88,14 @@ class Probe {
8788
var probeExpectedExecutor: UnownedSerialExecutor
8889
let probeExpectedNumber: Int
8990
let probeGroup: DispatchGroup
90-
91+
9192
init(expectedNumber: Int, group: DispatchGroup) {
9293
self.probeExpectedExecutor = AnotherActor.shared.unownedExecutor
9394
self.probeExpectedNumber = expectedNumber
9495
self.probeGroup = group
9596
group.enter()
9697
}
97-
98+
9899
deinit {
99100
expectTrue(isCurrentExecutor(probeExpectedExecutor))
100101
expectEqual(probeExpectedNumber, TL.number)
@@ -148,7 +149,7 @@ if #available(SwiftStdlib 5.1, *) {
148149
}
149150
group.wait()
150151
}
151-
152+
152153
tests.test("class sync slow path") {
153154
let group = DispatchGroup()
154155
group.enter(1)

test/Concurrency/Runtime/isolated_deinit_main_sync.swift

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// REQUIRES: executable_test
44
// REQUIRES: concurrency
55
// REQUIRES: concurrency_runtime
6+
// REQUIRES: swift_feature_IsolatedDeinit
67

78
var isDead: Bool = false
89

test/Concurrency/actor_call_implicitly_async.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// RUN: %target-swift-frontend -target %target-swift-5.1-abi-triple -strict-concurrency=complete -enable-upcoming-feature InferSendableFromCaptures -parse-as-library %s -emit-sil -o /dev/null -verify
22

33
// REQUIRES: concurrency
4-
// REQUIRES: asserts
4+
// REQUIRES: swift_feature_InferSendableFromCaptures
55

66
// some utilities
77
func thrower() throws {}

0 commit comments

Comments
 (0)