@@ -109,7 +109,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
109
109
println(" cf == tf - " + (cf == tf))
110
110
}
111
111
112
- property(" reductions must be equal for assoc. operators" ) = forAll (collectionPairs) { case (t, coll) =>
112
+ property(" reductions must be equal for assoc. operators" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
113
113
if (t.size != 0 ) {
114
114
val results = for ((op, ind) <- reduceOperators.zipWithIndex) yield {
115
115
val tr = t.reduceLeft(op)
@@ -127,7 +127,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
127
127
} else " has size 0" |: true
128
128
}
129
129
130
- property(" counts must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
130
+ property(" counts must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
131
131
val results = for ((pred, ind) <- countPredicates.zipWithIndex) yield {
132
132
val tc = t.count(pred)
133
133
val cc = coll.count(pred)
@@ -143,19 +143,19 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
143
143
results.reduceLeft(_ && _)
144
144
}
145
145
146
- property(" forall must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
146
+ property(" forall must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
147
147
val results = for ((pred, ind) <- forallPredicates.zipWithIndex)
148
148
yield (" op index: " + ind) |: t.forall(pred) == coll.forall(pred)
149
149
results.reduceLeft(_ && _)
150
150
}
151
151
152
- property(" exists must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
152
+ property(" exists must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
153
153
val results = for ((pred, ind) <- existsPredicates.zipWithIndex)
154
154
yield (" op index: " + ind) |: t.exists(pred) == coll.exists(pred)
155
155
results.reduceLeft(_ && _)
156
156
}
157
157
158
- property(" both must find or not find an element" ) = forAll (collectionPairs) { case (t, coll) =>
158
+ property(" both must find or not find an element" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
159
159
val results = for ((pred, ind) <- findPredicates.zipWithIndex) yield {
160
160
val ft = t.find(pred)
161
161
val fcoll = coll.find(pred)
@@ -164,7 +164,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
164
164
results.reduceLeft(_ && _)
165
165
}
166
166
167
- property(" mappings must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
167
+ property(" mappings must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
168
168
val results = for ((f, ind) <- mapFunctions.zipWithIndex) yield {
169
169
val ms = t.map(f)
170
170
val mp = coll.map(f)
@@ -185,7 +185,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
185
185
results.reduceLeft(_ && _)
186
186
}
187
187
188
- property(" collects must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
188
+ property(" collects must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
189
189
val results = for ((f, ind) <- partialMapFunctions.zipWithIndex) yield {
190
190
val ps = t.collect(f)
191
191
val pp = coll.collect(f)
@@ -201,12 +201,12 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
201
201
results.reduceLeft(_ && _)
202
202
}
203
203
204
- property(" flatMaps must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
204
+ property(" flatMaps must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
205
205
(for ((f, ind) <- flatMapFunctions.zipWithIndex)
206
206
yield (" op index: " + ind) |: areEqual(t.flatMap(f), coll.flatMap(f))).reduceLeft(_ && _)
207
207
}
208
208
209
- property(" filters must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
209
+ property(" filters must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
210
210
(for ((p, ind) <- filterPredicates.zipWithIndex) yield {
211
211
val tf = t.filter(p)
212
212
val cf = coll.filter(p)
@@ -235,7 +235,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
235
235
}).reduceLeft(_ && _)
236
236
}
237
237
238
- property(" filterNots must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
238
+ property(" filterNots must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
239
239
(for ((p, ind) <- filterNotPredicates.zipWithIndex) yield {
240
240
val tf = t.filterNot(p)
241
241
val cf = coll.filterNot(p)
@@ -244,7 +244,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
244
244
}).reduceLeft(_ && _)
245
245
}
246
246
247
- if (! isCheckingViews) property(" partitions must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
247
+ if (! isCheckingViews) property(" partitions must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
248
248
(for ((p, ind) <- partitionPredicates.zipWithIndex) yield {
249
249
val tpart = t.partition(p)
250
250
val cpart = coll.partition(p)
@@ -258,15 +258,15 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
258
258
}).reduceLeft(_ && _)
259
259
}
260
260
261
- if (hasStrictOrder) property(" takes must be equal" ) = forAll (collectionPairsWithLengths) { case (t, coll, n) =>
261
+ if (hasStrictOrder) property(" takes must be equal" ) = forAllNoShrink (collectionPairsWithLengths) { case (t, coll, n) =>
262
262
(" take " + n + " elements" ) |: t.take(n) == coll.take(n)
263
263
}
264
264
265
- if (hasStrictOrder) property(" drops must be equal" ) = forAll (collectionPairsWithLengths) { case (t, coll, n) =>
265
+ if (hasStrictOrder) property(" drops must be equal" ) = forAllNoShrink (collectionPairsWithLengths) { case (t, coll, n) =>
266
266
(" drop " + n + " elements" ) |: t.drop(n) == coll.drop(n)
267
267
}
268
268
269
- if (hasStrictOrder) property(" slices must be equal" ) = forAll (collectionPairsWith2Indices)
269
+ if (hasStrictOrder) property(" slices must be equal" ) = forAllNoShrink (collectionPairsWith2Indices)
270
270
{ case (t, coll, fr, slicelength) =>
271
271
val from = if (fr < 0 ) 0 else fr
272
272
val until = if (from + slicelength > t.size) t.size else from + slicelength
@@ -290,7 +290,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
290
290
(" slice from " + from + " until " + until) |: tsl == collsl
291
291
}
292
292
293
- if (hasStrictOrder) property(" splits must be equal" ) = forAll (collectionPairsWithLengths) { case (t, coll, n) =>
293
+ if (hasStrictOrder) property(" splits must be equal" ) = forAllNoShrink (collectionPairsWithLengths) { case (t, coll, n) =>
294
294
val tspl = t.splitAt(n)
295
295
val cspl = coll.splitAt(n)
296
296
if (tspl != cspl) {
@@ -303,7 +303,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
303
303
(" splitAt " + n) |: tspl == cspl
304
304
}
305
305
306
- if (hasStrictOrder) property(" takeWhiles must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
306
+ if (hasStrictOrder) property(" takeWhiles must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
307
307
(for ((pred, ind) <- takeWhilePredicates.zipWithIndex) yield {
308
308
val tt = t.takeWhile(pred)
309
309
val ct = coll.takeWhile(pred)
@@ -318,7 +318,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
318
318
}).reduceLeft(_ && _)
319
319
}
320
320
321
- if (hasStrictOrder) property(" spans must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
321
+ if (hasStrictOrder) property(" spans must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
322
322
(for ((pred, ind) <- spanPredicates.zipWithIndex) yield {
323
323
val tsp = t.span(pred)
324
324
val csp = coll.span(pred)
@@ -336,13 +336,13 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
336
336
}).reduceLeft(_ && _)
337
337
}
338
338
339
- if (hasStrictOrder) property(" dropWhiles must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
339
+ if (hasStrictOrder) property(" dropWhiles must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
340
340
(for ((pred, ind) <- dropWhilePredicates.zipWithIndex) yield {
341
341
(" operator " + ind) |: t.dropWhile(pred) == coll.dropWhile(pred)
342
342
}).reduceLeft(_ && _)
343
343
}
344
344
345
- property(" folds must be equal for assoc. operators" ) = forAll (collectionPairs) { case (t, coll) =>
345
+ property(" folds must be equal for assoc. operators" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
346
346
(for (((first, op), ind) <- foldArguments.zipWithIndex) yield {
347
347
val tres = t.foldLeft(first)(op)
348
348
val cres = coll.fold(first)(op)
@@ -389,7 +389,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
389
389
}
390
390
}
391
391
392
- if (hasStrictOrder) property(" copies to array must be equal" ) = forAll (collectionPairs) { case (t, coll) =>
392
+ if (hasStrictOrder) property(" copies to array must be equal" ) = forAllNoShrink (collectionPairs) { case (t, coll) =>
393
393
val tarr = newArray(t.size)
394
394
val collarr = newArray(coll.size)
395
395
t.copyToArray(tarr, 0 , t.size)
@@ -403,7 +403,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
403
403
tarr.toSeq == collarr.toSeq
404
404
}
405
405
406
- if (hasStrictOrder) property(" scans must be equal" ) = forAll (collectionPairs) {
406
+ if (hasStrictOrder) property(" scans must be equal" ) = forAllNoShrink (collectionPairs) {
407
407
case (t, coll) =>
408
408
(for (((first, op), ind) <- foldArguments.zipWithIndex) yield {
409
409
val tscan = t.scanLeft(first)(op)
@@ -419,7 +419,7 @@ abstract class ParallelIterableCheck[T](collName: String) extends Properties(col
419
419
}).reduceLeft(_ && _)
420
420
}
421
421
422
- property(" groupBy must be equal" ) = forAll (collectionPairs) {
422
+ property(" groupBy must be equal" ) = forAllNoShrink (collectionPairs) {
423
423
case (t, coll) =>
424
424
(for ((f, ind) <- groupByFunctions.zipWithIndex) yield {
425
425
val tgroup = t.groupBy(f)
0 commit comments