Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalatest

    ScalaTest's main traits, classes, and other members, including members supporting ScalaTest's DSL for the Scala interpreter.

    ScalaTest's main traits, classes, and other members, including members supporting ScalaTest's DSL for the Scala interpreter.

    Definition Classes
    org
  • object Assertions extends Assertions

    Companion object that facilitates the importing of Assertions members as an alternative to mixing it in.

    Companion object that facilitates the importing of Assertions members as an alternative to mixing it in. One use case is to import Assertions members so you can use them in the Scala interpreter:

    $scala -classpath scalatest.jar
    Welcome to Scala version 2.7.3.final (Java HotSpot(TM) Client VM, Java 1.5.0_16).
    Type in expressions to have them evaluated.
    Type :help for more information.
     
    scala> import org.scalatest.Assertions._
    import org.scalatest.Assertions._
     
    scala> assert(1 === 2)
    org.scalatest.TestFailedException: 1 did not equal 2
         at org.scalatest.Assertions$class.assert(Assertions.scala:211)
         at org.scalatest.Assertions$.assert(Assertions.scala:511)
         at .<init>(<console>:7)
         at .<clinit>(<console>)
         at RequestResult$.<init>(<console>:3)
         at RequestResult$.<clinit>(<console>)
         at RequestResult$result(<console>)
         at sun.reflect.NativeMethodAccessorImpl.invoke...
     
    scala> assertResult(3) { 1 + 3 }
    org.scalatest.TestFailedException: Expected 3, but got 4
         at org.scalatest.Assertions$class.expect(Assertions.scala:447)
         at org.scalatest.Assertions$.expect(Assertions.scala:511)
         at .<init>(<console>:7)
         at .<clinit>(<console>)
         at RequestResult$.<init>(<console>:3)
         at RequestResult$.<clinit>(<console>)
         at RequestResult$result(<console>)
         at sun.reflect.NativeMethodAccessorImpl.in...
     
    scala> val caught = intercept[StringIndexOutOfBoundsException] { "hi".charAt(-1) }
    caught: StringIndexOutOfBoundsException = java.lang.StringIndexOutOfBoundsException: String index out of range: -1
    

    Definition Classes
    scalatest
  • AssertionsHelper
  • CheckingEqualizer
  • Equalizer
c

org.scalatest.Assertions

AssertionsHelper

class AssertionsHelper extends AnyRef

Helper class used by code generated by the assert macro.

Source
Assertions.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AssertionsHelper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AssertionsHelper()

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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def macroAssert(bool: Bool, clue: Any, prettifier: Prettifier, pos: Position): Assertion

    Assert that the passed in Bool is true, else fail with TestFailedException.

    Assert that the passed in Bool is true, else fail with TestFailedException.

    bool

    the Bool to assert for

    clue

    optional clue to be included in TestFailedException's error message when assertion failed

  13. def macroAssume(bool: Bool, clue: Any, prettifier: Prettifier, pos: Position): Assertion

    Assume that the passed in Bool is true, else throw TestCanceledException.

    Assume that the passed in Bool is true, else throw TestCanceledException.

    bool

    the Bool to assume for

    clue

    optional clue to be included in TestCanceledException's error message when assertion failed

  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped