File tree Expand file tree Collapse file tree 4 files changed +8
-15
lines changed
Tests/TestingTests/Traits Expand file tree Collapse file tree 4 files changed +8
-15
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,10 @@ and install a toolchain.
48
48
49
49
#### Installing a toolchain
50
50
51
- 1 . Download a toolchain. A recent ** 6.0 development snapshot** toolchain is
52
- required to build the testing library. Visit
53
- [ swift.org] ( http://swift.org/install ) and download the most recent toolchain
54
- from the section titled ** release/6.0** under ** Development Snapshots** on
55
- the page for your platform.
51
+ 1 . Download a toolchain. A recent ** development snapshot** toolchain is required
52
+ to build the testing library. Visit [ swift.org] ( https://swift.org/install ) ,
53
+ select your platform, and download the most recent toolchain from the section
54
+ titled ** release/6.x** under ** Development Snapshots** .
56
55
57
56
Be aware that development snapshot toolchains aren't intended for day-to-day
58
57
development and may contain defects that affect the programs built with them.
Original file line number Diff line number Diff line change @@ -308,11 +308,7 @@ extension TypeInfo {
308
308
}
309
309
switch _kind {
310
310
case let . type( type) :
311
- #if compiler(>=6.1)
312
311
return _mangledTypeName ( type)
313
- #else
314
- return _mangledTypeName ( unsafeBitCast ( type, to: Any . Type. self) )
315
- #endif
316
312
case let . nameOnly( _, _, mangledName) :
317
313
return mangledName
318
314
}
@@ -412,6 +408,7 @@ extension TypeInfo: Hashable {
412
408
}
413
409
}
414
410
411
+ #if compiler(<6.2)
415
412
// MARK: - ObjectIdentifier support
416
413
417
414
extension ObjectIdentifier {
@@ -426,6 +423,7 @@ extension ObjectIdentifier {
426
423
self . init ( unsafeBitCast ( type, to: Any . Type. self) )
427
424
}
428
425
}
426
+ #endif
429
427
430
428
// MARK: - Codable
431
429
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ extension os_unfair_lock_s: Lockable {
41
41
typealias pthread_mutex_t = _TestingInternals . pthread_mutex_t ?
42
42
#endif
43
43
44
- #if SWT_TARGET_OS_APPLE || os(Linux) || os(Android) || (os(WASI) && compiler(>=6.1) && _runtime(_multithreaded)) || os(FreeBSD) || os(OpenBSD)
44
+ #if SWT_TARGET_OS_APPLE || os(Linux) || os(Android) || (os(WASI) && _runtime(_multithreaded)) || os(FreeBSD) || os(OpenBSD)
45
45
extension pthread_mutex_t : Lockable {
46
46
static func initializeLock( at lock: UnsafeMutablePointer < Self > ) {
47
47
_ = pthread_mutex_init ( lock, nil )
@@ -83,7 +83,7 @@ extension SRWLOCK: Lockable {
83
83
84
84
#if SWT_TARGET_OS_APPLE && !SWT_NO_OS_UNFAIR_LOCK
85
85
typealias DefaultLock = os_unfair_lock
86
- #elseif SWT_TARGET_OS_APPLE || os(Linux) || os(Android) || (os(WASI) && compiler(>=6.1) && _runtime(_multithreaded)) || os(FreeBSD) || os(OpenBSD)
86
+ #elseif SWT_TARGET_OS_APPLE || os(Linux) || os(Android) || (os(WASI) && _runtime(_multithreaded)) || os(FreeBSD) || os(OpenBSD)
87
87
typealias DefaultLock = pthread_mutex_t
88
88
#elseif os(Windows)
89
89
typealias DefaultLock = SRWLOCK
Original file line number Diff line number Diff line change 12
12
13
13
@Suite ( " Condition Trait Tests " , . tags( . traitRelated) )
14
14
struct ConditionTraitTests {
15
- #if compiler(>=6.1)
16
15
@Test (
17
16
" .enabled trait " ,
18
17
. enabled { true } ,
19
18
. bug( " https://github.com/swiftlang/swift/issues/76409 " , " Verify the custom trait with closure causes @Test macro to fail is fixed " )
20
19
)
21
20
func enabledTraitClosure( ) throws { }
22
- #endif
23
21
24
22
@Test (
25
23
" .enabled if trait " ,
26
24
. enabled( if: true )
27
25
)
28
26
func enabledTraitIf( ) throws { }
29
27
30
- #if compiler(>=6.1)
31
28
@Test (
32
29
" .disabled trait " ,
33
30
. disabled { false } ,
34
31
. bug( " https://github.com/swiftlang/swift/issues/76409 " , " Verify the custom trait with closure causes @Test macro to fail is fixed " )
35
32
)
36
33
func disabledTraitClosure( ) throws { }
37
- #endif
38
34
39
35
@Test (
40
36
" .disabled if trait " ,
You can’t perform that action at this time.
0 commit comments