Package

utest

asserts

Permalink

package asserts

Macro powered asserts of all shapes and sizes. These asserts all use macros to capture the names, types and values of variables used within them, so you get nice error messages for free.

Linear Supertypes
Asserts[DummyTypeclass], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. asserts
  2. Asserts
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. implicit class ArrowAssert[T] extends AnyRef

    Permalink

    Provides a nice syntax for asserting things are equal, that is pretty enough to embed in documentation and examples

    Provides a nice syntax for asserting things are equal, that is pretty enough to embed in documentation and examples

    Definition Classes
    Asserts
  2. type AssertEntry[T] = (String, ((TestValue) ⇒ Unit) ⇒ T)

    Permalink
  3. trait Asserts[V[_]] extends AnyRef

    Permalink
  4. class DummyTypeclass[+T] extends AnyRef

    Permalink
  5. case class RetryInterval(d: FiniteDuration) extends Product with Serializable

    Permalink

    Used to specify a retry-interval for the eventually and continually asserts.

  6. case class RetryMax(d: FiniteDuration) extends Product with Serializable

    Permalink

    Used to specify a maximum retry duration for the eventually and continually asserts.

  7. class Show extends Annotation with StaticAnnotation

    Permalink

Abstract Value Members

  1. abstract def assertPrettyPrint[T](t: T)(implicit arg0: DummyTypeclass[T]): String

    Permalink
    Definition Classes
    Asserts

Concrete Value Members

  1. object Asserts

    Permalink

    Macro implementation that provides rich error message for boolean expression assertion.

  2. object DummyTypeclass

    Permalink
  3. object Parallel

    Permalink

    Asserts which only make sense when running on multiple threads.

  4. object Tracer

    Permalink

    Macro implementation to take a block of code and trace through it, converting it into an AssertEntry and inserting debug loggers.

  5. macro def assert(exprs: Boolean*): Unit

    Permalink

    Checks that one or more expressions are true; otherwises raises an exception with some debugging info

    Checks that one or more expressions are true; otherwises raises an exception with some debugging info

    Definition Classes
    Asserts
  6. def assertError(msgPrefix: String, logged: Seq[TestValue], cause: Throwable = null): Nothing

    Permalink

    Shorthand to quickly throw a utest.AssertionError, together with all the macro-debugging goodness

  7. macro def assertMatch(t: Any)(pf: PartialFunction[Any, Unit]): Unit

    Permalink

    Asserts that the given value matches the PartialFunction.

    Asserts that the given value matches the PartialFunction. Useful for using pattern matching to validate the shape of a data structure.

    Definition Classes
    Asserts
  8. macro def compileError(expr: String): CompileError

    Permalink

    Asserts that the given expression fails to compile, and returns a framework.CompileError containing the message of the failure.

    Asserts that the given expression fails to compile, and returns a framework.CompileError containing the message of the failure. If the expression compile successfully, this macro itself will raise a compilation error.

    Definition Classes
    Asserts
  9. macro def continually(exprs: Boolean*): Unit

    Permalink

    Checks that one or more expressions all remain true within a certain period of time.

    Checks that one or more expressions all remain true within a certain period of time. Polls at a regular interval to check this.

    Definition Classes
    Asserts
  10. macro def eventually(exprs: Boolean*): Unit

    Permalink

    Checks that one or more expressions all become true within a certain period of time.

    Checks that one or more expressions all become true within a certain period of time. Polls at a regular interval to check this.

    Definition Classes
    Asserts
  11. def getAssertionEntry[T](t: AssertEntry[T]): (T, (Throwable) ⇒ Nothing)

    Permalink

    Executes this AssertEntry and returns a successful result or dies in case of failure.

    Executes this AssertEntry and returns a successful result or dies in case of failure. Even on success, it returns a die() function you can call to manually throw and exception later if the result displeases you.

  12. macro def intercept[T](exprs: Unit)(implicit arg0: ClassTag[T]): T

    Permalink

    Asserts that the given block raises the expected exception.

    Asserts that the given block raises the expected exception. The exception is returned if raised, and an AssertionError is raised if the expected exception does not appear.

    Definition Classes
    Asserts
  13. final def retry[T](n: Int)(body: ⇒ T): T

    Permalink
    Definition Classes
    Asserts
    Annotations
    @tailrec()
  14. def runAssertionEntry[T](t: AssertEntry[T]): (Try[T], ArrayBuffer[TestValue], String)

    Permalink

    Executes this AssertEntry and returns the raw results

  15. val utestTruncateLength: Int

    Permalink

Inherited from Asserts[DummyTypeclass]

Inherited from AnyRef

Inherited from Any

Ungrouped