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
  • package diagrams

    A single traits and companion object that provides a assertions that draw code diagrams on failure.

    A single traits and companion object that provides a assertions that draw code diagrams on failure.

    This package is released as the scalatest-diagrams module.

    Definition Classes
    scalatest
  • object Diagrams extends Diagrams

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

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

    $scala -classpath scalatest.jar
    Welcome to Scala version 2.10.4.final (Java HotSpot(TM) Client VM, Java 1.6.0_45).
    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.exceptions.TestFailedException:
    
    assert(1 === 2)
           | |   |
           1 |   2
             false
    
         at org.scalatest.Assertions$class.newAssertionFailedException(Assertions.scala:422)
    	    at org.scalatest.Diagrams$.newAssertionFailedException(Diagrams.scala:249)
    	    at org.scalatest.Diagrams$DiagramsHelper.macroAssert(Diagrams.scala:111)
    	    at .<init>(<console>:20)
    	    at .<clinit>(<console>)
    	    at .<init>(<console>:7)
    	    at .<clinit>(<console>)
     	  at $print(<console>)
    	    at sun.reflect.NativeMethodAccessorImpl.invoke...
    

    Definition Classes
    diagrams
  • CheckingEqualizer
  • DiagramsHelper
  • Equalizer

class DiagramsHelper extends AnyRef

Helper class used by code generated by the overriden assert macro.

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

Instance Constructors

  1. new DiagramsHelper()

Value Members

  1. def macroAssert(bool: DiagrammedExpr[Boolean], clue: Any, sourceText: String, pos: Position): Assertion

    Assert that the passed in Bool is true, else fail with TestFailedException with error message that include a diagram showing expression values.

    Assert that the passed in Bool is true, else fail with TestFailedException with error message that include a diagram showing expression values.

    bool

    the Bool to assert for

    clue

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

  2. def macroAssume(bool: DiagrammedExpr[Boolean], clue: Any, sourceText: String, pos: Position): Assertion

    Assume that the passed in Bool is true, else throw TestCanceledException with error message that include a diagram showing expression values.

    Assume that the passed in Bool is true, else throw TestCanceledException with error message that include a diagram showing expression values.

    bool

    the Bool to assume for

    clue

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