File tree 1 file changed +9
-0
lines changed
Tests/OpenSwiftUITests/Core/Semantics
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 6
6
import Testing
7
7
8
8
struct SemanticFeatureTests {
9
+ /// Represent a smallest version
9
10
struct SemanticFeature1 : SemanticFeature {
10
11
static var introduced : Semantics { . init( value: 0x0000_0000 ) }
11
12
}
12
13
14
+ /// Represent a middle version
13
15
struct SemanticFeature2 : SemanticFeature {
14
16
static var introduced : Semantics { . init( value: 0xFFFF_0000 ) }
15
17
}
16
18
19
+ /// Represent a max version
17
20
struct SemanticFeature3 : SemanticFeature {
18
21
static var introduced : Semantics { . init( value: 0xFFFF_FFFF ) }
19
22
}
20
23
21
24
@Test
22
25
func defaultEnable( ) async throws {
23
26
#expect( Semantics . forced == nil )
27
+ #if canImport(Darwin)
24
28
#expect( SemanticFeature1 . isEnable == true )
25
29
#expect( SemanticFeature2 . isEnable == false )
26
30
#expect( SemanticFeature3 . isEnable == false )
31
+ #else
32
+ #expect( SemanticFeature1 . isEnable == true )
33
+ #expect( SemanticFeature2 . isEnable == true )
34
+ #expect( SemanticFeature3 . isEnable == true )
35
+ #endif
27
36
}
28
37
29
38
@Test
You can’t perform that action at this time.
0 commit comments