@@ -322,22 +322,22 @@ object CheckerAsserting extends ExpectationCheckerAsserting {
322
322
//
323
323
// Passes 0 as verbosity value to prettyArg function.
324
324
//
325
- private [scalacheck] def decorateArgToStringValue (arg : Arg [_] , prettifier : Prettifier ): String =
326
- arg.arg match {
327
- case null => decorateToStringValue(prettifier, arg.arg )
328
- case _ : Unit => decorateToStringValue(prettifier, arg.arg )
329
- case _ : String => decorateToStringValue(prettifier, arg.arg )
330
- case _ : Char => decorateToStringValue(prettifier, arg.arg )
331
- case _ : Array [_] => decorateToStringValue(prettifier, arg.arg )
332
- case _ => arg. prettyArg(new Pretty .Params (0 ))
325
+ private [scalacheck] def decorateArgToStringValue [ T ] (arg : T , prettyArg : Pretty , prettifier : Prettifier ): String =
326
+ arg match {
327
+ case null => decorateToStringValue(prettifier, arg)
328
+ case _ : Unit => decorateToStringValue(prettifier, arg)
329
+ case _ : String => decorateToStringValue(prettifier, arg)
330
+ case _ : Char => decorateToStringValue(prettifier, arg)
331
+ case _ : Array [_] => decorateToStringValue(prettifier, arg)
332
+ case _ => prettyArg(new Pretty .Params (0 ))
333
333
}
334
334
335
335
private [scalacheck] def prettyArgs (args : List [Arg [_]], prettifier : Prettifier ) = {
336
336
val strs = for ((a, i) <- args.zipWithIndex) yield (
337
337
" " +
338
338
(if (a.label == " " ) " arg" + i else a.label) +
339
- " = " + decorateArgToStringValue(a, prettifier) + (if (i < args.length - 1 ) " ," else " " ) +
340
- (if (a.shrinks > 0 ) " // " + a.shrinks + (if (a.shrinks == 1 ) " shrink" else " shrinks" ) else " " )
339
+ " = " + decorateArgToStringValue(a.arg, a.prettyArg , prettifier) + (if (i < args.length - 1 ) " ," else " " ) +
340
+ (if (a.shrinks > 0 ) " // " + a.shrinks + (if (a.shrinks == 1 ) " shrink" else " shrinks" ) + " (orig: " + decorateArgToStringValue(a.origArg, a.prettyOrigArg, prettifier) + " ) " else " " )
341
341
)
342
342
strs.mkString(" \n " )
343
343
}
0 commit comments