File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
Tests/TestingTests/Traits Expand file tree Collapse file tree 1 file changed +44
-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+ @Test (
17+ " .enabled trait " ,
18+ . enabled { true } ,
19+ . bug( " https://github.com/swiftlang/swift/issues/76409 " , " Verify the custom trait with closure causes @Test macro to fail is fixed " )
20+ )
21+ func enabledTraitClosure( ) throws { }
22+ #endif
23+
24+ @Test (
25+ " .enabled if trait " ,
26+ . enabled( if: true )
27+ )
28+ func enabledTraitIf( ) throws { }
29+
30+ #if compiler(>=6.1)
31+ @Test (
32+ " .disabled trait " ,
33+ . disabled { false } ,
34+ . bug( " https://github.com/swiftlang/swift/issues/76409 " , " Verify the custom trait with closure causes @Test macro to fail is fixed " )
35+ )
36+ func disabledTraitClosure( ) throws { }
37+ #endif
38+
39+ @Test (
40+ " .disabled if trait " ,
41+ . disabled( if: false )
42+ )
43+ func disabledTraitIf( ) throws { }
44+ }
You can’t perform that action at this time.
0 commit comments