Skip to content

Commit

Permalink
Make some symbols public so other XCT test frameworks can be built (#296
Browse files Browse the repository at this point in the history
)

* Make some symbols public so other XCT test frameworks can be built

* disable 5.10 CI
  • Loading branch information
adam-fowler committed Nov 29, 2023
1 parent a0a17ae commit 49b1ad7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- 'swift:5.7'
- 'swift:5.8'
- 'swift:5.9'
- 'swiftlang/swift:nightly-5.10-jammy'
#- 'swiftlang/swift:nightly-5.10-jammy'

container:
image: ${{ matrix.image }}
Expand Down
18 changes: 12 additions & 6 deletions Sources/HummingbirdXCT/HBXCT.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,16 @@ public struct HBXCTResponse {
public let headers: HTTPHeaders
/// response body
public let body: ByteBuffer?

public init(status: HTTPResponseStatus, headers: HTTPHeaders, body: ByteBuffer? = nil) {
self.status = status
self.headers = headers
self.body = body
}
}

/// Errors thrown by XCT framework.
struct HBXCTError: Error, Equatable {
public struct HBXCTError: Error, Equatable {
private enum _Internal {
case notStarted
case noHead
Expand All @@ -41,11 +47,11 @@ struct HBXCTError: Error, Equatable {
self.value = value
}

static var notStarted: Self { .init(.notStarted) }
static var noHead: Self { .init(.noHead) }
static var illegalBody: Self { .init(.illegalBody) }
static var noEnd: Self { .init(.noEnd) }
static var timeout: Self { .init(.timeout) }
public static var notStarted: Self { .init(.notStarted) }
public static var noHead: Self { .init(.noHead) }
public static var illegalBody: Self { .init(.illegalBody) }
public static var noEnd: Self { .init(.noEnd) }
public static var timeout: Self { .init(.timeout) }
}

/// Protocol for XCT framework.
Expand Down

0 comments on commit 49b1ad7

Please sign in to comment.