Skip to content

Commit b5d3585

Browse files
committed
Update OperationsTest.kt
1 parent 3f0bc85 commit b5d3585

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/com/github/masx200/leetcode_test/operations_lcci/OperationsTest.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ class OperationsTest {
7878
// }
7979
assertContentEquals(
8080

81-
expected.map { if (it is Number) it.toLong() else it },
82-
actual.map { if (it is Number) it.toLong() else it }
81+
mapToLong(expected),
82+
mapToLong(actual)
8383
)
8484
}
8585

86+
private fun mapToLong(expected: List<Any?>) =
87+
expected.map { if (it is Number) it.toLong() else it }
88+
8689

8790
}

0 commit comments

Comments
 (0)