weaver.pure

package weaver.pure

Members list

Packages

Type members

Classlikes

trait Suite extends EffectSuite[IO], BaseCatsSuite, Helpers

Attributes

Supertypes
trait Helpers
trait BaseCatsSuite
trait Provider[IO]
trait EffectSuite[IO]
trait Here
trait Suite[IO]
trait BaseSuiteClass
class Object
trait Matchable
class Any
Show all
final case class Test(name: TestName, run: Expectations)

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited classlikes

implicit class StringOps(str: String)

Attributes

Inherited from:
Helpers
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

def parSuite(tests: List[IO[Test]]): Stream[IO, Test]
def pureTest(name: String)(run: => Expectations)(implicit loc: SourceLocation): Test
def seqSuite(tests: List[IO[Test]]): Stream[IO, Test]
def test(name: String)(run: IO[Expectations])(implicit loc: SourceLocation): IO[Test]

Inherited methods

inline def clue[A](value: A)(using catsShow: Show[A], clues: Clues): A

Used to investigate failures in expect or assert statements.

Used to investigate failures in expect or assert statements.

Surround a value with a call to clue to display it on failure.

Attributes

Inherited from:
ClueHelpers (hidden)
def exists[L[_], A](la: L[A])(f: A => Expectations)(implicit foldable: Foldable[L], pos: SourceLocation): Expectations

Checks that an assertion is true for at least one element in a foldable. Fails if the foldable is empty.

Checks that an assertion is true for at least one element in a foldable. Fails if the foldable is empty.

Attributes

Example
   val xs =
     List("foo", "bar")
   // success
   exists(xs)(s => expect.eql("foo", s)
Inherited from:
Helpers
def expect: Expect

Expect macros

Expect macros

Attributes

Inherited from:
Helpers
def fail[A](hint: String)(implicit pos: SourceLocation): A => Expectations

Attributes

Inherited from:
Helpers
def failure(hint: String)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def forEach[L[_], A](la: L[A])(f: A => Expectations)(implicit L: Foldable[L]): Expectations

Checks that an assertion is true for all elements in a foldable. Succeeds if the foldable is empty.

Checks that an assertion is true for all elements in a foldable. Succeeds if the foldable is empty.

Attributes

Example
   val xs =
     List("foo", "bar")
   // success
   forEach(xs)(s => expect.eql(3, s.length)
Inherited from:
Helpers
def inEach[L[_], A](la: L[A])(f: A => Expectations)(implicit L: Foldable[L]): Expectations

Alias for forEach

Alias for forEach

Attributes

Inherited from:
Helpers
def matches[A](x: A)(f: PartialFunction[A, Expectations])(implicit pos: SourceLocation, A: Show[A]): Expectations

Checks that a given expression matches a certain pattern; fails otherwise.

Checks that a given expression matches a certain pattern; fails otherwise.

Attributes

Example
   matches(Option(4)) { case Some(x) =>
     expect.eql(4, x)
   }
Inherited from:
Helpers
def not(assertion: Expectations)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def succeed[A]: A => Expectations

Attributes

Inherited from:
Helpers
def verify(condition: Boolean)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def verify(condition: Boolean, hint: String)(implicit pos: SourceLocation): Expectations

Attributes

Inherited from:
Helpers
def whenSuccess[F[_], A, E](fa: F[A])(f: A => Expectations)(implicit pos: SourceLocation, F: ApplicativeError[F, E], G: Foldable[F], E: Show[E]): Expectations

Checks that an ApplicativeError (like Either) is successful

Checks that an ApplicativeError (like Either) is successful

Attributes

Example
   val res: Either[String, Int] =
     Right(4)
   whenSuccess(res) { n =>
     expect.eql(4, n)
   }
Inherited from:
Helpers

Inherited fields

val success: Expectations

Attributes

Inherited from:
Helpers

Implicits

Inherited implicits

final implicit def StringOps(str: String): StringOps

Attributes

Inherited from:
Helpers