test_helper library

Dependency-light assertions for consumers of package:diene_result.

This library deliberately depends on no test framework. A mismatch throws TestHelperFailure, so it works with package:test, Flutter test, or any other runner.

Functions

expectErr<T>(Result<T> actual) → Problem
Requires actual to be Err and returns its problem.
expectNone<T>(Option<T> actual) → void
Requires actual to be None.
expectOk<T>(Result<T> actual) → T
Requires actual to be Ok and returns its value for further assertions.
expectSome<T>(Option<T> actual) → T
Requires actual to be Some and returns its value.

Exceptions / Errors

TestHelperFailure
Thrown when a dependency-light Result/Option assertion fails.