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

Added more tests #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extension AsyncIteratorProtocol {
/// Asynchronously advances by the specified number of elements, or ends the sequence if there is no next element.
///
/// If a complete array could not be collected, an error is thrown and the sequence should be considered finished.
/// - Parameter count: The number of bytes to collect.
/// - Parameter count: The number of elements to collect.
/// - Returns: A collection with exactly `count` elements, or `nil` if the sequence is finished.
/// - Throws: `AsyncSequenceReaderError.insufficientElements` if a complete byte sequence could not be returned by the time the sequence ended.
public mutating func collect(_ count: Int) async throws -> [Element]? {
Expand Down
2 changes: 2 additions & 0 deletions Tests/AsyncSequenceReaderTests/AsyncSequenceReaderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import XCTest
@testable import AsyncSequenceReader

final class AsyncSequenceReaderTests: XCTestCase {

// test transform not called when stream is empty
// MARK: - Test Manual Iteration

func testReadSequenceFromStream() async throws {
Expand Down