Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed test compilation with Xcode 15 #2602

Merged
merged 1 commit into from
Jun 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tests/UnitTests/Networking/NetworkErrorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ class NetworkErrorTests: TestCase {
}

private func check<T>(
_ value: T, condition: Predicate<T>, descrition: String,
_ value: T, condition: Nimble.Predicate<T>, descrition: String,
file: FileString = #file, line: UInt = #line
) {
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private extension TransactionPosterTests {

}

private func match(_ data: PurchasedTransactionData) -> Predicate<PurchasedTransactionData> {
private func match(_ data: PurchasedTransactionData) -> Nimble.Predicate<PurchasedTransactionData> {
return .init {
let other = try $0.evaluate()
let matches = (other?.appUserID == data.appUserID &&
Expand Down
14 changes: 7 additions & 7 deletions Tests/UnitTests/TestHelpers/Matchers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import Nimble

// MARK: - Dates

func beCloseToNow() -> Predicate<Date> {
func beCloseToNow() -> Nimble.Predicate<Date> {
return beCloseToDate(Date())
}

func beCloseToDate(_ expectedValue: Date) -> Predicate<Date> {
func beCloseToDate(_ expectedValue: Date) -> Nimble.Predicate<Date> {
return beCloseTo(expectedValue, within: 1)
}

Expand All @@ -32,31 +32,31 @@ func beCloseToDate(_ expectedValue: Date) -> Predicate<Date> {

/// Overload for `Nimble.matchError` that ignores the `PurchasesError` type and compares them as `Error`
/// (comparing the domain and code)
func matchError(_ error: PurchasesError) -> Predicate<Error> {
func matchError(_ error: PurchasesError) -> Nimble.Predicate<Error> {
return Nimble.matchError(error as Error)
}

/// Overload for `Nimble.matchError` that ignores the `ErrorCode` type and compares them as `Error`
/// (comparing the domain and code)
func matchError(_ error: ErrorCode) -> Predicate<Error> {
func matchError(_ error: ErrorCode) -> Nimble.Predicate<Error> {
return Nimble.matchError(error as Error)
}

/// Overload for `Nimble.throwError` that ignores the `PurchasesError` type and compares them as `Error`
/// (comparing the domain and code)
public func throwError<Out>(_ error: PurchasesError) -> Predicate<Out> {
public func throwError<Out>(_ error: PurchasesError) -> Nimble.Predicate<Out> {
return Nimble.throwError(error as Error)
}

/// Overload for `Nimble.throwError` that ignores the `ErrorCode` type and compares them as `Error`
/// (comparing the domain and code)
public func throwError<Out>(_ error: ErrorCode) -> Predicate<Out> {
public func throwError<Out>(_ error: ErrorCode) -> Nimble.Predicate<Out> {
return Nimble.throwError(error as Error)
}

// MARK: - Data

func matchJSONData(_ other: Data) -> Predicate<Data> {
func matchJSONData(_ other: Data) -> Nimble.Predicate<Data> {
return equal(other.serialized)
}

Expand Down