Skip to content

Commit 31c75ab

Browse files
committed
fix?
1 parent d225c66 commit 31c75ab

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

Sources/IssueReporting/TestContext.swift

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// A type representing the context in which a test is being run, _i.e._ either in Swift's native
22
/// Testing framework, or Xcode's XCTest framework.
3-
public enum TestContext {
3+
public enum TestContext: Equatable {
44
/// The Swift Testing framework.
55
case swiftTesting(Testing?)
66

@@ -29,7 +29,7 @@ public enum TestContext {
2929
return .xcTest
3030
}
3131
}
32-
32+
3333
/// Determines if the test context is Swift's native Testing framework.
3434
public var isSwiftTesting: Bool {
3535
guard case .swiftTesting = self
@@ -48,10 +48,8 @@ public enum TestContext {
4848
}
4949
}
5050
}
51-
}
5251

53-
@available(*, deprecated, message: "Test for '.swiftTesting' using pattern matching, instead.")
54-
extension TestContext: Equatable {
52+
@available(*, deprecated, message: "Test for '.swiftTesting' using pattern matching, instead.")
5553
public static func == (lhs: Self, rhs: Self) -> Bool {
5654
switch (lhs, rhs) {
5755
case (.swiftTesting(nil), .swiftTesting),
@@ -62,11 +60,10 @@ extension TestContext: Equatable {
6260
return lhs == rhs
6361
case (.swiftTesting, .xcTest), (.xcTest, .swiftTesting):
6462
return false
65-
@unknown default:
66-
return false
6763
}
6864
}
6965

66+
@available(*, deprecated, message: "Test for '.swiftTesting' using pattern matching, instead.")
7067
public static var swiftTesting: Self {
7168
.swiftTesting(nil)
7269
}

0 commit comments

Comments
 (0)