<commit_before>// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency %import-libdispatch -parse-as-library)

// REQUIRES: concurrency
// REQUIRES: libdispatch
// UNSUPPORTED: use_os_stdlib

// https://bugs.swift.org/browse/SR-14466
// UNSUPPORTED: OS=windows-msvc

import _Concurrency
import StdlibUnittest
import Dispatch

struct SomeError: Error, Equatable {
  var value = Int.random(in: 0..<100)
}

var tests = TestSuite("AsyncStream")

@main struct Main {
  static func main() async {
    if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
      final class Expectation: UnsafeSendable {
        var fulfilled = false
      }

      tests.test("yield with no awaiting next") {
        let series = AsyncStream(String.self) { continuation in
          continuation.yield("hello")
        }
      }

      tests.test("yield with no awaiting next throwing") {<commit_msg>Mark test async_stream as executable_test<commit_after>// RUN: %target-run-simple-swift(-Xfrontend -enable-experimental-concurrency %import-libdispatch -parse-as-library)

// REQUIRES: concurrency
// REQUIRES: libdispatch
// REQUIRES: executable_test
// UNSUPPORTED: use_os_stdlib

// https://bugs.swift.org/browse/SR-14466
// UNSUPPORTED: OS=windows-msvc

import _Concurrency
import StdlibUnittest
import Dispatch

struct SomeError: Error, Equatable {
  var value = Int.random(in: 0..<100)
}

var tests = TestSuite("AsyncStream")

@main struct Main {
  static func main() async {
    if #available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) {
      final class Expectation: UnsafeSendable {
        var fulfilled = false
      }

      tests.test("yield with no awaiting next") {
        let series = AsyncStream(String.self) { continuation in
          continuation.yield("hello")
        }
      }

      tests.test("yield with no awaiting next throwing") {
{'fraction_non_alphanumeric': 0.11241342567927544, 'fraction_numerical': 0.02663825253063399, 'mean_word_length': 3.3472222222222223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2391408', 'n_tokens_mistral': 655, 'n_tokens_neox': 584, 'n_words': 150}