@@ -492,6 +492,41 @@ object GenSpecification extends Properties("Gen") with GenSpecificationVersionSp
492
492
_ == ((1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ))
493
493
}
494
494
495
+ property(" zipWith2" ) = {
496
+ val ts = (1 .toShort, 2 .toInt)
497
+ def fun (t1 : Short , t2 : Int ) = (t1, t2)
498
+
499
+ forAll(zipWith(const(ts._1), const(ts._2))(fun)) {
500
+ _ == ts
501
+ }
502
+ }
503
+ property(" zipWith3" ) = {
504
+ val ts = (1 .toShort, 2 .toInt, 3 .toLong)
505
+ def fun (t1 : Short , t2 : Int , t3 : Long ) = (t1, t2, t3)
506
+
507
+ forAll(zipWith(const(ts._1), const(ts._2), const(ts._3))(fun)) {
508
+ _ == ts
509
+ }
510
+ }
511
+ property(" zipWith22" ) = {
512
+ // format: off
513
+ val ts = (1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 , 11 , 12 , 13 , 14 , 15 , 16 , 17 , 18 , 19 , 20 , 21 , 22 )
514
+ def fun (
515
+ t1 : Int , t2 : Int , t3 : Int , t4 : Int , t5 : Int , t6 : Int , t7 : Int , t8 : Int , t9 : Int , t10 : Int , t11 : Int ,
516
+ t12 : Int , t13 : Int , t14 : Int , t15 : Int , t16 : Int , t17 : Int , t18 : Int , t19 : Int , t20 : Int , t21 : Int , t22 : Int
517
+ ) =
518
+ (t1, t2,t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20, t21, t22)
519
+
520
+ forAll(zipWith(
521
+ const(ts._1), const(ts._2), const(ts._3), const(ts._4), const(ts._5), const(ts._6), const(ts._7), const(ts._8),
522
+ const(ts._9), const(ts._10), const(ts._11), const(ts._12), const(ts._13), const(ts._14), const(ts._15),
523
+ const(ts._16), const(ts._17), const(ts._18), const(ts._19), const(ts._20), const(ts._21), const(ts._22)
524
+ )(fun)) {
525
+ _ == ts
526
+ }
527
+ // format: on
528
+ }
529
+
495
530
// // See https://github.com/typelevel/scalacheck/issues/79
496
531
property(" issue #79" ) = {
497
532
val g = oneOf(const(0 ).suchThat(_ => true ), const(" 0" ).suchThat(_ => true ))
0 commit comments