object AssertUtil

This module contains additional higher-level assert statements that are ultimately based on junit.Assert primitives.

Source
AssertUtil.scala
Linear Supertypes
AnyRef, Any
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AssertUtil
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Progress extends AnyRef

    How frequently to check a termination condition.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def assert8(b: => Boolean, msg: => Any): Unit

    Assert on Java 8, but on later versions, just print if assert would fail.

  6. def assertNotReachable[A <: AnyRef](a: => A, roots: AnyRef*)(body: => Unit): Unit

    Value is not strongly reachable from roots after body is evaluated.

  7. def assertSameElements[A, B >: A](expected: Iterable[A], actual: IterableOnce[B]): Unit

    Convenient for testing iterators.

  8. def assertSameElements[A, B >: A](expected: Iterable[A], actual: Iterable[B], message: String = ""): Unit

    JUnit-style assertion for IterableLike.sameElements.

  9. def assertThrown[T <: Throwable](checker: (T) => Boolean)(body: => Any)(implicit arg0: ClassTag[T]): Unit
  10. def assertThrows[T <: Throwable](body: => Any, checkMessage: (String) => Boolean = s => true)(implicit arg0: ClassTag[T]): Unit

    Check that throwable T (or a subclass) was thrown during evaluation of body, and that its message satisfies the checkMessage predicate.

    Check that throwable T (or a subclass) was thrown during evaluation of body, and that its message satisfies the checkMessage predicate. Any other exception is propagated.

  11. def assertZeroNetThreads[A](group: ThreadGroup)(body: => A): Try[A]
  12. def assertZeroNetThreads(body: => Unit): Unit

    Assert no new threads, with some margin for arbitrary threads to exit.

  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  23. def readyOrNot(awaitable: Awaitable[_]): Boolean

    Like Await.ready but return false on timeout, true on completion, throw InterruptedException.

  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. def toString(): String
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  28. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  29. def waitForIt(terminated: => Boolean, progress: Progress = Fast, label: => String = "test"): Unit

    Wait for a condition, with a simple back-off strategy.

    Wait for a condition, with a simple back-off strategy.

    This makes it easier to see hanging threads in development without tweaking a timeout parameter. Conversely, when a thread fails to make progress in a test environment, we allow the wait period to grow larger than usual, since a long wait for failure is acceptable.

    It would be nicer if what we're waiting for gave us a progress indicator: we don't care if something takes a long time, so long as we can verify progress.

  30. def withoutATrace[A](body: => A): NoTrace[A]
  31. object Fast extends Progress with Product with Serializable
  32. object Slow extends Progress with Product with Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped