Skip to content

Commit

Permalink
Correctly pass error to suite and expect (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif authored Mar 2, 2023
1 parent 12257de commit c111675
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Sources/t/Structure/t+Structure.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ public extension t {
}

return suite(named: name) {
try assert(isNil: result)
if let result = result {
throw result
}
}
}

Expand All @@ -90,7 +92,9 @@ public extension t {
}

return try expect(description) {
try assert(isNil: result)
if let result = result {
throw result
}
}
}

Expand All @@ -109,7 +113,9 @@ public extension t {
}

return try tested(description) {
try assert(isNil: result)
if let result = result {
throw result
}

return try unwrap(output)
}
Expand Down

0 comments on commit c111675

Please sign in to comment.