Reputation: 8113
When running scalacheck
from an sbt console
the output is limited by 76 char column width:
$ sbt test:console
import scalaz._
import Scalaz._
import scalacheck.ScalazProperties._
import scalacheck.ScalazArbitrary._
import scalacheck.ScalaCheckBinding._
scala> monad.laws[List].check
+ monad.applicative.apply.functor.invariantFunctor.identity: OK, passed 100
tests.
+ monad.applicative.apply.functor.invariantFunctor.composite: OK, passed 10
0 tests.
+ monad.applicative.apply.functor.identity: OK, passed 100 tests.
+ monad.applicative.apply.functor.composite: OK, passed 100 tests.
+ monad.applicative.apply.composition: OK, passed 100 tests.
+ monad.applicative.identity: OK, passed 100 tests.
+ monad.applicative.homomorphism: OK, passed 100 tests.
+ monad.applicative.interchange: OK, passed 100 tests.
+ monad.applicative.map consistent with ap: OK, passed 100 tests.
+ monad.bind.apply.functor.invariantFunctor.identity: OK, passed 100 tests.
+ monad.bind.apply.functor.invariantFunctor.composite: OK, passed 100 tests
.
+ monad.bind.apply.functor.identity: OK, passed 100 tests.
+ monad.bind.apply.functor.composite: OK, passed 100 tests.
+ monad.bind.apply.composition: OK, passed 100 tests.
+ monad.bind.associativity: OK, passed 100 tests.
+ monad.bind.ap consistent with bind: OK, passed 100 tests.
+ monad.right identity: OK, passed 100 tests.
+ monad.left identity: OK, passed 100 tests.
Is there any way to increase that limit?
Upvotes: 3
Views: 151
Reputation: 556
It is impossible as the width value is hard coded in ConsoleReporter
. However, if you are running your tests with the main
defined in Properties
, you can do the following:
object MyCheck extends Properties("My property check") {
override def overrideParameters(p: Test.Parameters) =
p.withTestCallback(WideConsoleReporter)
...
}
And then in your own code, create WideConsoleReporter
based on ConsoleReporter
.
Upvotes: 1
Reputation: 1443
This is unfortunately not possible to change, as it is hard-coded in ScalaCheck (in https://github.com/rickynils/scalacheck/blob/master/src/main/scala/org/scalacheck/util/ConsoleReporter.scala). I suggest opening an issue at ScalaCheck's Github page.
Upvotes: 2