Helper class used by code generated by the overriden assert macro.
Helper class used by code generated by the overriden assert macro.
Assert that a boolean condition, described in String
message, is true.
Assert that a boolean condition, described in String
message, is true.
If the condition is true, this method returns normally.
Else, it throws TestFailedException with the
String obtained by invoking toString on the
specified clue as the exception's detail message and a
diagram showing expression values.
If multi-line Boolean is passed in, it will fallback to the macro implementation of Assertions
that does not contain diagram.
the boolean condition to assert
An objects whose toString method returns a message to include in a failure report.
NullArgumentException if message is null.
TestFailedException if the condition is false.
Assert that a boolean condition is true.
Assert that a boolean condition is true.
If the condition is true, this method returns normally.
Else, it throws TestFailedException.
This method is implemented in terms of a Scala macro that will generate a more helpful error message that includes a diagram showing expression values.
If multi-line Boolean is passed in, it will fallback to the macro implementation of Assertions
that does not contain diagram.
the boolean condition to assert
TestFailedException if the condition is false.
Assume that a boolean condition, described in String
message, is true.
Assume that a boolean condition, described in String
message, is true.
If the condition is true, this method returns normally.
Else, it throws TestCanceledException with the
String obtained by invoking toString on the
specified clue as the exception's detail message and a
diagram showing expression values.
If multi-line Boolean is passed in, it will fallback to the macro implementation of Assertions
that does not contain diagram.
the boolean condition to assume
An objects whose toString method returns a message to include in a failure report.
NullArgumentException if message is null.
TestCanceledException if the condition is false.
Assume that a boolean condition is true.
Assume that a boolean condition is true.
If the condition is true, this method returns normally.
Else, it throws TestCanceledException.
This method is implemented in terms of a Scala macro that will generate a more helpful error message that includes a diagram showing expression values.
If multi-line Boolean is passed in, it will fallback to the macro implementation of Assertions
that does not contain diagram.
the boolean condition to assume
TestCanceledException if the condition is false.
Helper instance used by code generated by the overriden macro assertion.
(Since version 3.1.0) The conversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
(Since version 3.1.0) The convertEquivalenceToAToBConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
(Since version 3.1.0) The convertEquivalenceToBToAConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
(Since version 3.1.0) The lowPriorityConversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.
Companion object that facilitates the importing of
Diagramsmembers as an alternative to mixing it in. One use case is to importDiagramsmembers 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...