@@ -326,30 +326,30 @@ object CheckerAsserting extends ExpectationCheckerAsserting {
326
326
//
327
327
// Passes 0 as verbosity value to prettyArg function.
328
328
//
329
- private [scalacheck] def decorateArgToStringValue (arg : Arg [_] , prettifier : Prettifier ): String =
330
- arg.arg match {
331
- case null => decorateToStringValue(prettifier, arg.arg )
332
- case _ : Unit => decorateToStringValue(prettifier, arg.arg )
333
- case _ : String => decorateToStringValue(prettifier, arg.arg )
334
- case _ : Char => decorateToStringValue(prettifier, arg.arg )
335
- case _ : Array [_] => decorateToStringValue(prettifier, arg.arg )
336
- case _ : mutable.WrappedArray [_] => decorateToStringValue(prettifier, arg.arg )
337
- case a if ArrayHelper .isArrayOps(arg.arg ) => decorateToStringValue(prettifier, arg. arg)
338
- case _ : Many [_] => decorateToStringValue(prettifier, arg.arg )
339
- case _ : scala.collection.GenMap [_, _] => decorateToStringValue(prettifier, arg.arg )
340
- case _ : Iterable [_] => decorateToStringValue(prettifier, arg.arg )
341
- case _ : java.util.Collection [_] => decorateToStringValue(prettifier, arg.arg )
342
- case _ : java.util.Map [_, _] => decorateToStringValue(prettifier, arg.arg )
343
- case p : Product if p.productArity > 0 => decorateToStringValue(prettifier, arg.arg )
344
- case _ => arg. prettyArg(new Pretty .Params (0 ))
329
+ private [scalacheck] def decorateArgToStringValue [ T ] (arg : T , prettyArg : Pretty , prettifier : Prettifier ): String =
330
+ arg match {
331
+ case null => decorateToStringValue(prettifier, arg)
332
+ case _ : Unit => decorateToStringValue(prettifier, arg)
333
+ case _ : String => decorateToStringValue(prettifier, arg)
334
+ case _ : Char => decorateToStringValue(prettifier, arg)
335
+ case _ : Array [_] => decorateToStringValue(prettifier, arg)
336
+ case _ : mutable.WrappedArray [_] => decorateToStringValue(prettifier, arg)
337
+ case a if ArrayHelper .isArrayOps(arg) => decorateToStringValue(prettifier, arg)
338
+ case _ : Many [_] => decorateToStringValue(prettifier, arg)
339
+ case _ : scala.collection.GenMap [_, _] => decorateToStringValue(prettifier, arg)
340
+ case _ : Iterable [_] => decorateToStringValue(prettifier, arg)
341
+ case _ : java.util.Collection [_] => decorateToStringValue(prettifier, arg)
342
+ case _ : java.util.Map [_, _] => decorateToStringValue(prettifier, arg)
343
+ case p : Product if p.productArity > 0 => decorateToStringValue(prettifier, arg)
344
+ case _ => prettyArg(new Pretty .Params (0 ))
345
345
}
346
346
347
347
private [scalacheck] def prettyArgs (args : List [Arg [_]], prettifier : Prettifier ) = {
348
348
val strs = for ((a, i) <- args.zipWithIndex) yield (
349
349
" " +
350
350
(if (a.label == " " ) " arg" + i else a.label) +
351
- " = " + decorateArgToStringValue(a, prettifier) + (if (i < args.length - 1 ) " ," else " " ) +
352
- (if (a.shrinks > 0 ) " // " + a.shrinks + (if (a.shrinks == 1 ) " shrink" else " shrinks" ) else " " )
351
+ " = " + decorateArgToStringValue(a.arg, a.prettyArg , prettifier) + (if (i < args.length - 1 ) " ," else " " ) +
352
+ (if (a.shrinks > 0 ) " // " + a.shrinks + (if (a.shrinks == 1 ) " shrink" else " shrinks" ) + " (orig: " + decorateArgToStringValue(a.origArg, a.prettyOrigArg, prettifier) + " ) " else " " )
353
353
)
354
354
strs.mkString(" \n " )
355
355
}
0 commit comments