File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Tests/TestingTests/Traits Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ //
2
+ // This source file is part of the Swift.org open source project
3
+ //
4
+ // Copyright (c) 2025 Apple Inc. and the Swift project authors
5
+ // Licensed under Apache License v2.0 with Runtime Library Exception
6
+ //
7
+ // See https://swift.org/LICENSE.txt for license information
8
+ // See https://swift.org/CONTRIBUTORS.txt for Swift project authors
9
+ //
10
+
11
+ @testable import Testing
12
+
13
+ @Suite ( " Condition Trait Tests " , . tags( . traitRelated) )
14
+ struct ConditionTraitTests {
15
+ // #if compiler(>=6.1)
16
+ // TODO: Verify this will cause release/6.0 CI to fail
17
+ @Test (
18
+ " .enabled trait " ,
19
+ . enabled { true } ,
20
+ . bug( " https://github.com/swiftlang/swift/issues/76409 " , " Verify the custom trait with closure causes @Test macro to fail is fixed " )
21
+ )
22
+ func enabledTraitClosure( ) throws { }
23
+ // #endif
24
+
25
+ @Test (
26
+ " .enabled if trait " ,
27
+ . enabled( if: true )
28
+ )
29
+ func enabledTraitIf( ) throws { }
30
+
31
+ #if compiler(>=6.1)
32
+ @Test (
33
+ " .disabled trait " ,
34
+ . disabled { false } ,
35
+ . bug( " https://github.com/swiftlang/swift/issues/76409 " , " Verify the custom trait with closure causes @Test macro to fail is fixed " )
36
+ )
37
+ func disabledTraitClosure( ) throws { }
38
+ #endif
39
+
40
+ @Test (
41
+ " .disabled if trait " ,
42
+ . disabled( if: false )
43
+ )
44
+ func disabledTraitIf( ) throws { }
45
+ }
You can’t perform that action at this time.
0 commit comments