439 |
|
assertEquals(y, x); |
440 |
|
} |
441 |
|
|
442 |
– |
|
442 |
|
static final int SIZE = 10000; |
443 |
|
static ConcurrentHashMap<Long, Long> longMap; |
444 |
|
|
636 |
|
assertEquals(adder.sum(), 3 * SIZE * (SIZE - 1) / 2); |
637 |
|
} |
638 |
|
|
640 |
– |
|
639 |
|
/** |
640 |
|
* reduceKeysSequentially accumulates across all keys, |
641 |
|
*/ |
656 |
|
assertEquals((long)r, (long)SIZE * (SIZE - 1) / 2); |
657 |
|
} |
658 |
|
|
661 |
– |
|
659 |
|
/** |
660 |
|
* reduceEntriesSequentially accumulates across all entries |
661 |
|
*/ |
758 |
|
assertEquals((long)r, (long)3 * SIZE * (SIZE - 1) / 2); |
759 |
|
} |
760 |
|
|
764 |
– |
|
761 |
|
/** |
762 |
|
* reduceKeysToLongSequentially accumulates mapped keys |
763 |
|
*/ |