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
  • NormalResult
c

org.scalatest.Assertions

NormalResult

case class NormalResult(result: Any) extends Throwable with Product with Serializable

Annotations
@deprecated
Deprecated

The trap method is no longer needed for demos in the REPL, which now abreviates stack traces, so NormalResult will be removed in a future version of ScalaTest

Source
Assertions.scala
Linear Supertypes
Serializable, Product, Equals, Throwable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. NormalResult
  2. Serializable
  3. Product
  4. Equals
  5. Throwable
  6. Serializable
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NormalResult(result: Any)

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 addSuppressed(arg0: Throwable): Unit
    Definition Classes
    Throwable
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def fillInStackTrace(): Throwable
    Definition Classes
    Throwable
  9. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. def getCause(): Throwable
    Definition Classes
    Throwable
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def getLocalizedMessage(): String
    Definition Classes
    Throwable
  13. def getMessage(): String
    Definition Classes
    Throwable
  14. def getStackTrace(): Array[StackTraceElement]
    Definition Classes
    Throwable
  15. final def getSuppressed(): Array[Throwable]
    Definition Classes
    Throwable
  16. def initCause(arg0: Throwable): Throwable
    Definition Classes
    Throwable
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. def printStackTrace(arg0: PrintWriter): Unit
    Definition Classes
    Throwable
  22. def printStackTrace(arg0: PrintStream): Unit
    Definition Classes
    Throwable
  23. def printStackTrace(): Unit
    Definition Classes
    Throwable
  24. val result: Any
  25. def setStackTrace(arg0: Array[StackTraceElement]): Unit
    Definition Classes
    Throwable
  26. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    NormalResult → Throwable → AnyRef → Any
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Throwable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped