Added max() and min() for CharArrays.

This commit is contained in:
Evgeny Gerashchenko
2013-12-06 20:35:31 +04:00
parent f439604b57
commit e80af77c31
3 changed files with 32 additions and 2 deletions
+2
View File
@@ -92,6 +92,7 @@ class ArraysJVMTest {
expect(2, { shortArray(3, 2).min() })
expect(2.0.toFloat(), { floatArray(3.0.toFloat(), 2.0.toFloat()).min() })
expect(2.0, { doubleArray(2.0, 3.0).min() })
expect('a', { charArray('a', 'b').min() })
}
test fun max() {
@@ -103,6 +104,7 @@ class ArraysJVMTest {
expect(3, { shortArray(3, 2).max() })
expect(3.0.toFloat(), { floatArray(3.0.toFloat(), 2.0.toFloat()).max() })
expect(3.0, { doubleArray(2.0, 3.0).max() })
expect('b', { charArray('a', 'b').max() })
}
test fun minBy() {