Skip to content

Commit

Permalink
Merge branch 'main' into sendable-expressions-instead-of-mainactor
Browse files Browse the repository at this point in the history
# Conflicts:
#	Sources/AsyncExpectations/AsyncExpectations.swift
  • Loading branch information
KaiOelfke committed Aug 6, 2023
2 parents db9e0fc + 643927a commit bc42e13
Showing 1 changed file with 36 additions and 36 deletions.
72 changes: 36 additions & 36 deletions Sources/AsyncExpectations/AsyncExpectations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@ public func expectEqual<T: Equatable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try expression1()
let second = try expression2()
return first == second
async let first = expression1()
async let second = expression2()
return try await first == second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try expression1()
Expand All @@ -105,9 +105,9 @@ public func expectEqual<T: Equatable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try await expression1()
let second = try await expression2()
return first == second
async let first = expression1()
async let second = expression2()
return try await first == second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try await expression1()
Expand All @@ -132,9 +132,9 @@ public func expectNotEqual<T: Equatable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try expression1()
let second = try expression2()
return first != second
async let first = expression1()
async let second = expression2()
return try await first != second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try expression1()
Expand All @@ -155,9 +155,9 @@ public func expectNotEqual<T: Equatable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try await expression1()
let second = try await expression2()
return first != second
async let first = expression1()
async let second = expression2()
return try await first != second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try await expression1()
Expand Down Expand Up @@ -352,9 +352,9 @@ public func expectLessThan<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try expression1()
let second = try expression2()
return first < second
async let first = expression1()
async let second = expression2()
return try await first < second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try expression1()
Expand All @@ -375,9 +375,9 @@ public func expectLessThan<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try await expression1()
let second = try await expression2()
return first < second
async let first = expression1()
async let second = expression2()
return try await first < second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try await expression1()
Expand All @@ -402,9 +402,9 @@ public func expectLessThanOrEqual<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try expression1()
let second = try expression2()
return first <= second
async let first = expression1()
async let second = expression2()
return try await first <= second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try expression1()
Expand All @@ -425,9 +425,9 @@ public func expectLessThanOrEqual<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try await expression1()
let second = try await expression2()
return first <= second
async let first = expression1()
async let second = expression2()
return try await first <= second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try await expression1()
Expand All @@ -452,9 +452,9 @@ public func expectGreaterThan<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try expression1()
let second = try expression2()
return first > second
async let first = expression1()
async let second = expression2()
return try await first > second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try expression1()
Expand All @@ -475,9 +475,9 @@ public func expectGreaterThan<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try await expression1()
let second = try await expression2()
return first > second
async let first = expression1()
async let second = expression2()
return try await first > second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try await expression1()
Expand All @@ -502,9 +502,9 @@ public func expectGreaterThanOrEqual<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try expression1()
let second = try expression2()
return first >= second
async let first = expression1()
async let second = expression2()
return try await first >= second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try expression1()
Expand All @@ -525,9 +525,9 @@ public func expectGreaterThanOrEqual<T: Comparable>(timeout: TimeInterval = 1,
file: StaticString = #file,
line: UInt = #line) async throws {
let expression = { @Sendable in
let first = try await expression1()
let second = try await expression2()
return first >= second
async let first = expression1()
async let second = expression2()
return try await first >= second
}
if try await !evaluate(expression, timeout: timeout) {
let first = try await expression1()
Expand Down

0 comments on commit bc42e13

Please sign in to comment.