Companion object for Prettifier
that provides a default Prettifier
implementation.
- Companion:
- class
- Source:
- Prettifier.scala
Value members
Concrete methods
Constract a new Prettifier
from a given partial function.
Constract a new Prettifier
from a given partial function.
- Value parameters:
- fun
a partial function with which to implement the apply method of the returned
Prettifier
.
- Source:
- Prettifier.scala
Construct a new Prettifier
with given prettifier
and customDiffer
.
Construct a new Prettifier
with given prettifier
and customDiffer
.
- Value parameters:
- fun
a partial function with which to implement the apply method of the returned
Prettifier
.- prettifier
the base prettifer that the new prettifier will delegate apply(o: Any) to.
- Source:
- Prettifier.scala
Create a default prettifier instance with collection size limit.
Create a default prettifier instance with collection size limit.
- Source:
- Prettifier.scala
Concrete fields
A basic Prettifier
.
A basic Prettifier
.
This was the default Prettifier
used in ScalaTest 2.0 release.
It transforms:
-
Null
to:null
-
Unit
to:<() the Unit value>
-
String
to:"string"
(thetoString
result surrounded by double quotes) -
Char
to:'c'
(thetoString
result surrounded by single quotes) -
Array
to:Array("1", "2", "3")
-
scala.util.Some
to:Some("3")
For anything else, it returns the result of invoking toString
.
- Source:
- Prettifier.scala
Implicits
Implicits
A default Prettifier
.
A default Prettifier
.
This default Prettifier
is used in ScalaTest to clarify error messages.
It transforms:
-
Null
to:null
-
Unit
to:<() the Unit value>
-
String
to:"string"
(thetoString
result surrounded by double quotes) -
Char
to:'c'
(thetoString
result surrounded by single quotes) -
Array
to:Array("1", "2", "3")
-
scala.Some
to:Some("3")
-
scala.util.Left
to:Left("3")
-
scala.util.Right
to:Right("3")
-
scala.util.Success
to:Success("3")
-
org.scalactic.Good
to:Good("3")
-
org.scalactic.Bad
to:Bad("3")
-
org.scalactic.One
to:One("3")
-
org.scalactic.Many
to:Many("1", "2", "3")
-
scala.collection.Iterable
to:List("1", "2", "3")
-
java.util.Collection
to:["1", "2", "3"]
-
java.util.Map
to:{1="one", 2="two", 3="three"}
For anything else, it returns the result of invoking toString
.
- Source:
- Prettifier.scala