Update RiotSwiftUI symbols to triple slash documentation style with function annotations.

This commit is contained in:
David Langley
2021-09-13 11:36:33 +01:00
parent a73d8a4122
commit d5455cf58b
39 changed files with 184 additions and 240 deletions
@@ -17,16 +17,19 @@
import XCTest
import Combine
/**
XCTest utility to wait for results from publishers, so that the output can be used for assertions.
```
let collectedEvents = somePublisher.collect(3).first()
XCTAssertEqual(try xcAwait(collectedEvents), [expected, values, here])
```
*/
@available(iOS 14.0, *)
extension XCTestCase {
/// XCTest utility to wait for results from publishers, so that the output can be used for assertions.
///
/// ```
/// let collectedEvents = somePublisher.collect(3).first()
/// XCTAssertEqual(try xcAwait(collectedEvents), [expected, values, here])
/// ```
/// - Parameters:
/// - publisher: The publisher to wait on.
/// - timeout: A timeout after which we give up.
/// - Throws: If it can't get the unwrapped result.
/// - Returns: The unwrapped result.
func xcAwait<T: Publisher>(
_ publisher: T,
timeout: TimeInterval = 10