@@ -34,8 +34,8 @@ class EdgePartitionSuite extends FunSuite {
3434 builder.add(e.srcId, e.dstId, e.attr)
3535 }
3636 val edgePartition = builder.toEdgePartition
37- assert(edgePartition.reverse.iterator.map(_.copy()). toList === reversedEdges)
38- assert(edgePartition.reverse.reverse.iterator.map(_.copy()). toList === edges)
37+ assert(edgePartition.reverse.iterator.toList === reversedEdges)
38+ assert(edgePartition.reverse.reverse.iterator.toList === edges)
3939 }
4040
4141 test(" map" ) {
@@ -45,7 +45,7 @@ class EdgePartitionSuite extends FunSuite {
4545 builder.add(e.srcId, e.dstId, e.attr)
4646 }
4747 val edgePartition = builder.toEdgePartition
48- assert(edgePartition.map(e => e.srcId + e.dstId).iterator.map(_.copy()). toList ===
48+ assert(edgePartition.map(e => e.srcId + e.dstId).iterator.toList ===
4949 edges.map(e => e.copy(attr = e.srcId + e.dstId)))
5050 }
5151
@@ -58,7 +58,7 @@ class EdgePartitionSuite extends FunSuite {
5858 builder.add(e.srcId, e.dstId, e.attr)
5959 }
6060 val edgePartition = builder.toEdgePartition
61- assert(edgePartition.groupEdges(_ + _).iterator.map(_.copy()). toList === groupedEdges)
61+ assert(edgePartition.groupEdges(_ + _).iterator.toList === groupedEdges)
6262 }
6363
6464 test(" indexIterator" ) {
@@ -72,8 +72,8 @@ class EdgePartitionSuite extends FunSuite {
7272
7373 val edgePartition = builder.toEdgePartition
7474 assert(edgePartition.iterator.map(_.copy()).toList === sortedEdges)
75- assert(edgePartition.indexIterator(_ == 0 ).map(_.copy()). toList === edgesFrom0)
76- assert(edgePartition.indexIterator(_ == 1 ).map(_.copy()). toList === edgesFrom1)
75+ assert(edgePartition.indexIterator(_ == 0 ).toList === edgesFrom0)
76+ assert(edgePartition.indexIterator(_ == 1 ).toList === edgesFrom1)
7777 }
7878
7979 test(" innerJoin" ) {
@@ -87,7 +87,7 @@ class EdgePartitionSuite extends FunSuite {
8787 val a = makeEdgePartition(aList)
8888 val b = makeEdgePartition(bList)
8989
90- assert(a.innerJoin(b) { (src, dst, a, b) => a }.iterator.map(_.copy()). toList ===
90+ assert(a.innerJoin(b) { (src, dst, a, b) => a }.iterator.toList ===
9191 List (Edge (0 , 1 , 0 ), Edge (1 , 0 , 0 ), Edge (5 , 5 , 0 )))
9292 }
9393}
0 commit comments