Skip to content
This repository was archived by the owner on Aug 17, 2019. It is now read-only.

Commit d483be9

Browse files
committed
Small adjustment and refactoring in test
1 parent 3541422 commit d483be9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/scala/com/ckkloverdos/convert/ConvertersTest.scala

+5-3
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,12 @@ class ConvertersTest {
106106
@Test
107107
def testPrimitiveArray: Unit = {
108108
val convertersB = new StdConvertersBuilder()
109-
convertersB.register[Array[Int], Long](true) { array (0 /: array)(_+_)}
109+
convertersB.register[Array[Int], Int](true) { array (0 /: array)(_+_)}
110110
val converters = convertersB.build
111-
val sum = converters.convertEx[Long](Array(1, 2, 3))
111+
val theArray: Array[Int] = Array(1, 2, 3)
112+
val theArraySum: Int = theArray sum
113+
val convertedSum = converters.convertEx[Int](theArray)
112114
// by the way, also test the sum, though we shouldn't for several reasons
113-
assertEquals((1 + 2 + 3), sum)
115+
assertEquals(theArraySum, convertedSum)
114116
}
115117
}

0 commit comments

Comments
 (0)