Package arrow.fx.coroutines

Types

Link copied to clipboard
abstract class ArrowFxSpec(iterations: Int, spec: ArrowFxSpec.() -> Unit) : UnitSpec

Simple overwritten Kotest StringSpec (UnitSpec) to reduce stress on tests.

Link copied to clipboard
class NamedThreadFactory(mkName: (Int) -> String) : ThreadFactory
Link copied to clipboard
data class SideEffect(counter: Int)

Functions

Link copied to clipboard
inline fun <A> assertThrowable(executable: () -> A): Throwable

Example usage:

Link copied to clipboard
suspend fun <A> awaitExitCase(start: CompletableDeferred<Unit>, exit: CompletableDeferred<ExitCase>): A
suspend fun <A> awaitExitCase(send: Channel<Unit>, exit: CompletableDeferred<ExitCase>): A
Link copied to clipboard
fun Arb.Companion.charRange(): Arb<CharRange>
Link copied to clipboard
fun <A> either(e: Either<Throwable, A>): Matcher<Either<Throwable, A>>
fun <L, R> Arb.Companion.either(left: Arb<L>, right: Arb<R>): Arb<Either<L, R>>
Link copied to clipboard
fun <A> Arb.Companion.flow(arbA: Arb<A>): Arb<Flow<A>>
Link copied to clipboard
fun <O> Arb.Companion.function(arb: Arb<O>): Arb<() -> O>
Link copied to clipboard
fun <A, B> Arb.Companion.functionAToB(arb: Arb<B>): Arb<(A) -> B>
Link copied to clipboard
fun Arb.Companion.intRange(min: Int = Int.MIN_VALUE, max: Int = Int.MAX_VALUE): Arb<IntRange>
Link copied to clipboard
fun leftException(e: Throwable): Matcher<Either<Throwable, *>>
Link copied to clipboard
fun Arb.Companion.longRange(min: Long = Long.MIN_VALUE, max: Long = Long.MAX_VALUE): Arb<LongRange>
Link copied to clipboard
fun <A> Arb.Companion.nullable(arb: Arb<A>): Arb<A?>
Link copied to clipboard
fun <A> Either<Throwable, A>.rethrow(): A

Useful for testing success & error scenarios with an Either generator

Link copied to clipboard
suspend fun CoroutineContext.shift()
Link copied to clipboard
suspend fun <A> A.suspend(): A
suspend fun Throwable.suspend(): Nothing
Link copied to clipboard
fun <A> A.suspended(): suspend () -> A
Link copied to clipboard
fun Arb.Companion.throwable(): Arb<Throwable>
Link copied to clipboard
fun <A> Result<A>.toEither(): Either<Throwable, A>
Link copied to clipboard
fun Arb.Companion.unit(): Arb<Unit>
Link copied to clipboard
fun <L, R> Arb.Companion.validated(left: Arb<L>, right: Arb<R>): Arb<Validated<L, R>>
Link copied to clipboard
fun <L, R> Arb.Companion.validatedNel(left: Arb<L>, right: Arb<R>): Arb<ValidatedNel<L, R>>

Properties

Link copied to clipboard
val single: Resource<CoroutineContext>
Link copied to clipboard
val singleThreadName: String
Link copied to clipboard
val threadName: suspend () -> String