org

scalactic

package scalactic

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. scalactic
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait AbstractStringUniformity extends Uniformity[String]

    Convenience base trait for string Uniformitys.

  2. trait Accumulation extends AnyRef

    Provides mechanisms that enable errors to be accumulated in “accumulating Ors,” Ors whose Bad type is an Every.

  3. trait AsMethods extends AnyRef

  4. final case class Bad[+G, +B](b: B) extends Or[G, B] with Product with Serializable

    Contains a “bad” value.

  5. trait Bool extends AnyRef

    A trait that represent a rich-featured boolean value, which includes the following members:

  6. class Catcher extends AnyRef

    Convenience class for extractors that match and return Throwables based on a type and Boolean condition.

  7. trait CheckedEquality extends LowPriorityCheckedEqualityConstraints

    Provides === and !== operators that return Boolean, delegate the equality determination to an Equality type class, and require the types of the two values compared to be in a subtype/supertype relationship.

  8. abstract class Constraint[A, B] extends AnyRef

    Abstract class used to enforce type constraints for equality checks.

  9. trait ConversionCheckedTripleEquals extends LowPriorityConversionCheckedConstraint

    Provides === and !== operators that return Boolean, delegate the equality determination to an Equality type class, and require that either the types of the two values compared are in a subtype/supertype relationship, or that an implicit conversion is available that can convert from one type to the other.

  10. sealed abstract class CooperatingBoolean[T] extends AnyRef

  11. sealed abstract class CooperatingNumeric[T] extends AnyRef

  12. trait Differ[A] extends AnyRef

  13. trait EitherSugar extends AnyRef

  14. trait EnabledEquality extends LowPriorityEnabledEqualityConstraints

    Provides === and !== operators that return Boolean, delegate the equality determination to an Equality type class, and require the types of the two values compared to be in a subtype/supertype relationship.

  15. class EnabledEqualityBetween[A, B] extends AnyRef

  16. class EnabledEqualityConverting[A, B] extends AnyRef

  17. trait EnabledEqualityConvertingOptions extends RecursiveOptionEquality

  18. class EnabledEqualityFor[A] extends AnyRef

  19. case class Entry[K, V](key: K, value: V) extends java.util.Map.Entry[K, V] with Product with Serializable

    A case class implementation of java.util.Map.Entry to make it easier to test Java Maps with ScalaTest Matchers.

  20. class EquaSets[T] extends AnyRef

  21. trait Equality[A] extends Equivalence[A]

    Defines a custom way to determine equality for a type when compared with another value of type Any.

  22. abstract class EqualityConstraint[A, B] extends AnyRef

    Abstract class used to enforce type constraints for equality checks.

  23. trait EqualityPolicy extends AnyRef

    Trait that defines abstract methods used to enforce compile-time type constraints for equality comparisons, and defines === and !== operators used by matchers.

  24. trait Equivalence[T] extends AnyRef

    Defines a custom way to determine equality for a type when compared with another value of the same type.

  25. type ErrorMessage = String

    Type alias for String.

    Type alias for String.

  26. sealed abstract class Every[+T] extends PartialFunction[Int, T]

    An ordered, immutable, non-empty collection of elements.

  27. trait Explicitly extends AnyRef

    Provides ScalaTest's “explicitly DSL,” which facilitates the explicit specification of an Equality[T] or a Uniformity[T] where Equality[T] is taken implicitly.

  28. sealed abstract class Fact extends AnyRef

  29. case class Fail[E](error: E) extends Validation[E] with Product with Serializable

    Indicates a validation failed, describing the failure with a contained error value.

  30. final case class Good[+G, +B](g: G) extends Or[G, B] with Product with Serializable

    Contains a “good” value.

  31. trait HashingEquality[T] extends Equality[T]

  32. trait LowPriorityCheckedEqualityConstraints extends EqualityPolicy

    Provides an implicit conversion that will be applied only if a higher-priority implicit conversion declared a subtrait is not applicable.

  33. trait LowPriorityConversionCheckedConstraint extends EqualityPolicy

    Provides an implicit conversion that will be applied only if a higher-priority implicit conversion declared a subtrait is not applicable.

  34. trait LowPriorityEnabledEqualityConstraints extends EqualityPolicy

    Provides === and !== operators that return Boolean, delegate the equality determination to an Equality type class, and require the types of the two values compared to be in a subtype/supertype relationship.

  35. trait LowPriorityEqualityConstraints extends AnyRef

  36. trait LowPriorityTypeCheckedConstraint extends EqualityPolicy

    Provides an implicit conversion that will be applied only if a higher-priority implicit conversion declared a subtrait is not applicable.

  37. final case class Many[+T](firstElement: T, secondElement: T, otherElements: T*) extends Every[T] with Product with Serializable

    An Every that contains two or more elements.

  38. trait MapEqualityConstraints extends AnyRef

    Provides an implicit method that loosens the equality constraint defined by TypeCheckedTripleEquals or ConversionCheckedTripleEquals for Scala Maps to one that more closely matches Scala's approach to Map equality.

  39. trait NativeSupport extends AnyRef

  40. trait NewTripleEquals extends TypeCheckedTripleEquals with TraversableEqualityConstraints

  41. case class No(rawFailureMessage: String, rawNegatedFailureMessage: String, rawMidSentenceFailureMessage: String, rawMidSentenceNegatedFailureMessage: String, failureMessageArgs: IndexedSeq[Any], negatedFailureMessageArgs: IndexedSeq[Any], midSentenceFailureMessageArgs: IndexedSeq[Any], midSentenceNegatedFailureMessageArgs: IndexedSeq[Any], composite: Boolean = false, prettifier: Prettifier = Prettifier.default) extends Fact with Product with Serializable

  42. trait NormMethods extends AnyRef

    Provides an implicit conversion that allows norm to be invoked on any value of type T for which an implicit Normalization[T] exists.

  43. trait Normalization[A] extends AnyRef

    Defines a custom way to normalize instances of a type.

  44. trait NormalizingEquality[A] extends Equality[A]

    An Equality[A] implementation that determines the equality of two objects by normalizing one or both objects, then comparing the results using an “after normalization” equality referenced from the afterNormalizationEquality member.

  45. trait NormalizingEquivalence[A] extends Equivalence[A]

    An Equivalence[A] implementation that determines the equality of two objects by normalizing one or both objects, then comparing the results using an “after normalization” Equivalence referenced from the afterNormalizationEquivalence member.

  46. trait NormalizingHashingEquality[A] extends NormalizingEquality[A] with HashingEquality[A]

  47. abstract class NormalizingOrderingEquality[A] extends NormalizingHashingEquality[A] with OrderingEquality[A]

  48. final case class One[+T](loneElement: T) extends Every[T] with Product with Serializable

    An Every that contains exactly one element.

  49. trait OptionSugar extends AnyRef

    Provides an implicit conversion that allows norm to be invoked on any value of type T for which an implicit Normalization[T] exists.

  50. sealed abstract class Or[+G, +B] extends AnyRef

    Represents a value that is one of two possible types, with one type being “good” and the other “bad.

  51. trait OrderingEquality[A] extends HashingEquality[A]

  52. trait Prettifier extends (Any) ⇒ String

    A function that given any object will produce a “pretty” string representation of that object, where “pretty” is in the eye of the implementer.

  53. trait PrettyMethods extends AnyRef

    Provides an implicit conversion that enables pretty to be invoked on any object, to transform that object into a String representation.

  54. trait RecursiveOptionEquality extends AnyRef

  55. trait Requirements extends AnyRef

    Trait that contains require, and requireState, and requireNonNull methods for checking pre-conditions that give descriptive error messages extracted via a macro.

  56. trait SafeSeqs extends AnyRef

  57. trait SeqEqualityConstraints extends AnyRef

    Provides an implicit method that loosens the equality constraint defined by TypeCheckedTripleEquals or ConversionCheckedTripleEquals for Scala Seqs to one that more closely matches Scala's approach to Seq equality.

  58. trait SetEqualityConstraints extends AnyRef

    Provides an implicit method that loosens the equality constraint defined by TypeCheckedTripleEquals or ConversionCheckedTripleEquals for Scala Sets to one that more closely matches Scala's approach to Set equality.

  59. final case class Snapshot(name: String, value: Any) extends Product with Serializable

    Case class that stores the name and value of a variable or expression.

  60. final class SnapshotSeq extends IndexedSeq[Snapshot]

    An IndexedSeq[Snapshot] providing toString and lines methods that can be useful for debug and log messages about program state.

  61. trait Snapshots extends AnyRef

    Trait that provides a snap method that takes one or more arguments and results in a SnapshotSeq, whose toString lists the names and values of each argument.

  62. class SortedEquaSets[T] extends EquaSets[T]

  63. trait StrictCheckedEquality extends CheckedEquality

  64. trait StrictEnabledEquality extends EnabledEquality

  65. trait StringNormalizations extends AnyRef

    Provides methods that produce Uniformity[String] instances for various ways to normalize strings for equality comparisons.

  66. trait TimesOnInt extends AnyRef

    Trait providing an implicit conversion that adds a times method to Ints that will repeat a given side-effecting operation multiple times.

  67. trait Tolerance extends AnyRef

    Trait containing an implicit conversion that adds a +- method to Numeric types, which enables spreads to be expressed in terms of a pivot and tolerance.

  68. trait TolerantNumerics extends AnyRef

    Provides Equality and Equivalence instances for Numeric types that compare for equality with a given tolerance.

  69. trait TrySugar extends AnyRef

  70. trait TypeCheckedTripleEquals extends LowPriorityTypeCheckedConstraint

    Provides === and !== operators that return Boolean, delegate the equality determination to an Equality type class, and require the types of the two values compared to be in a subtype/supertype relationship.

  71. trait UncheckedEquality extends EqualityPolicy

    Provides === and !== operators that return Boolean, delegate the equality determination to an Equality type class, and require no relationship between the types of the two values compared.

  72. trait Uniformity[A] extends Normalization[A]

    Defines a custom way to normalize instances of a type that can also handle normalization of that type when passed as Any.

  73. sealed trait Validation[+E] extends AnyRef

    Represents the result of a validation, either the object Pass if the validation succeeded, else an instance of Fail containing an error value describing the validation failure.

  74. case class Yes(rawFailureMessage: String, rawNegatedFailureMessage: String, rawMidSentenceFailureMessage: String, rawMidSentenceNegatedFailureMessage: String, failureMessageArgs: IndexedSeq[Any], negatedFailureMessageArgs: IndexedSeq[Any], midSentenceFailureMessageArgs: IndexedSeq[Any], midSentenceNegatedFailureMessageArgs: IndexedSeq[Any], composite: Boolean = false, prettifier: Prettifier = Prettifier.default) extends Fact with Product with Serializable

  75. trait TraversableEqualityConstraints extends SeqEqualityConstraints with SetEqualityConstraints with MapEqualityConstraints

    Provides three implicit methods that loosen the equality constraint defined by TypeCheckedTripleEquals or ConversionCheckedTripleEquals for Scala Traversables to one that more closely matches Scala's approach to Traversable equality.

  76. trait TripleEquals extends EqualityPolicy

    Provides === and !== operators that return Boolean, delegate the equality determination to an Equality type class, and require no relationship between the types of the two values compared.

  77. type TripleEqualsSupport = EqualityPolicy

    Annotations
    @deprecated
    Deprecated

    Please use org.scalactic.EqualityPolicy instead.

Value Members

  1. object Accumulation extends Accumulation

    Companion object to trait Accumulation that allows Accumulation's members to be imported rather than mixed in, and also contains nested traits used by implicit conversions declared in trait Accumulations.

  2. object AsMethods extends AsMethods

    Companion object for NormMethods enabling its members to be imported as an alternative to mixing them in.

  3. object Bool

    Bool companion object that provides factory methods to create different sub types of Bool

  4. object Catcher

    Companion object for Catcher that provides a factory method for creating Throwable extractors.

  5. object CheckedEquality extends CheckedEquality

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

  6. object ConversionCheckedTripleEquals extends ConversionCheckedTripleEquals

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

  7. object CooperatingBoolean

  8. object CooperatingNumeric

  9. object EitherSugar extends EitherSugar

  10. object EnabledEquality extends EnabledEquality

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

  11. object EnabledEqualityBetween

  12. object EnabledEqualityConverting

  13. object EnabledEqualityConvertingOptions extends EnabledEqualityConvertingOptions

  14. object EnabledEqualityFor

  15. object EquaSets

  16. object Equality

    Companion object for trait Equality that provides factory methods for producing Equality instances.

  17. object EqualityConstraint extends LowPriorityEqualityConstraints

  18. object EqualityPolicy

  19. object Equivalence

    Companion object for trait Equivalence that provides a factory method for producing default Equivalence instances.

  20. object Every

    Companion object for abstract class Every.

  21. object Explicitly extends Explicitly

    Companion object for Explicitly, which enables the Scalactic explicitly DSL to be imported rather than mixed in, like this:

  22. object Good extends Serializable

    Companion object for Good that offers, in addition to the standard factory method for Good that takes single “good” type, an parameterless apply used to narrow the Good type when creating a Bad.

  23. object MapEqualityConstraints extends MapEqualityConstraints

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

  24. object NewTripleEquals extends NewTripleEquals

  25. object No extends Serializable

    Companion object for the No case class.

  26. object NormMethods extends NormMethods

    Companion object for NormMethods enabling its members to be imported as an alternative to mixing them in.

  27. object OptionSugar extends OptionSugar

    Companion object for NormMethods enabling its members to be imported as an alternative to mixing them in.

  28. object Or

    The companion object for Or providing factory methods for creating Ors from Eithers and Trys.

  29. object OrderingEquality

  30. object Pass extends Validation[Nothing] with Product with Serializable

    Indicates a validation succeeded.

  31. object Prettifier

    Companion object for Prettifier that provides a default Prettifier implementation.

  32. object PrettyMethods extends PrettyMethods

    Companion object for trait PrettyMethods enabling its members to be imported as an alternative to mixing them in.

  33. object RecursiveOptionEquality extends RecursiveOptionEquality

  34. object Requirements extends Requirements

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

  35. object SafeSeqs extends SafeSeqs

  36. val ScalacticVersion: String

    The version number of Scalactic.

    The version number of Scalactic.

    returns

    the Scalactic version number.

  37. object SeqEqualityConstraints extends SeqEqualityConstraints

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

  38. object SetEqualityConstraints extends SetEqualityConstraints

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

  39. object SnapshotSeq

  40. object Snapshots extends Snapshots

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

  41. object SortedEquaSets

  42. object StrictCheckedEquality extends StrictCheckedEquality

  43. object StrictEnabledEquality extends StrictEnabledEquality

  44. object StringNormalizations extends StringNormalizations

    Companion object to trait StringNormalizations that provides an alternative to mixing it in.

  45. object TimesOnInt extends TimesOnInt

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

  46. object Tolerance extends Tolerance

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

  47. object TolerantNumerics extends TolerantNumerics

    Companion object for TolerantNumerics that enables its members to be imported as an alternative to mixing them in.

  48. object TrySugar extends TrySugar

  49. object TypeCheckedTripleEquals extends TypeCheckedTripleEquals

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

  50. object UncheckedEquality extends UncheckedEquality

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

  51. object Yes extends Serializable

    Companion object for the Yes case class.

  52. def attempt[R](f: ⇒ R): Or[R, Throwable]

    Returns the result of evaluating the given block f, wrapped in a Good, or if an exception is thrown, the Throwable, wrapped in a Bad.

    Returns the result of evaluating the given block f, wrapped in a Good, or if an exception is thrown, the Throwable, wrapped in a Bad.

    Here are some examples:

    scala> import org.scalactic._
    import org.scalactic._
    
    scala> attempt { 2 / 1 }
    res0: org.scalactic.Or[Int,Throwable] = Good(2)
    
    scala> attempt { 2 / 0 }
    res1: org.scalactic.Or[Int,Throwable] = Bad(java.lang.ArithmeticException: / by zero)
    

    f

    the block to attempt to evaluate

    returns

    the result of evaluating the block, wrapped in a Good, or the thrown exception, wrapped in a Bad

  53. package enablers

Deprecated Value Members

  1. object TraversableEqualityConstraints extends TraversableEqualityConstraints

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

  2. object TripleEquals extends TripleEquals

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

  3. val TripleEqualsSupport: EqualityPolicy.type

    Annotations
    @deprecated
    Deprecated

    Please use org.scalactic.EqualityPolicy instead.

Inherited from AnyRef

Inherited from Any

Ungrouped