Skip to content

Commit

Permalink
Fix non-Darwin test case fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Ye committed Jun 2, 2024
1 parent c646a7a commit c4115ec
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,33 @@
import Testing

struct SemanticFeatureTests {
/// Represent a smallest version
struct SemanticFeature1: SemanticFeature {
static var introduced: Semantics { .init(value: 0x0000_0000) }
}

/// Represent a middle version
struct SemanticFeature2: SemanticFeature {
static var introduced: Semantics { .init(value: 0xFFFF_0000) }
}

/// Represent a max version
struct SemanticFeature3: SemanticFeature {
static var introduced: Semantics { .init(value: 0xFFFF_FFFF) }
}

@Test
func defaultEnable() async throws {
#expect(Semantics.forced == nil)
#if canImport(Darwin)
#expect(SemanticFeature1.isEnable == true)
#expect(SemanticFeature2.isEnable == false)
#expect(SemanticFeature3.isEnable == false)
#else
#expect(SemanticFeature1.isEnable == true)
#expect(SemanticFeature2.isEnable == true)
#expect(SemanticFeature3.isEnable == true)
#endif
}

@Test
Expand Down

0 comments on commit c4115ec

Please sign in to comment.