Add missing sum() on Streams.

This commit is contained in:
Ilya Ryzhenkov
2014-12-15 18:11:29 +03:00
parent f7d4ca092c
commit 846014b37f
3 changed files with 50 additions and 0 deletions
@@ -435,6 +435,7 @@ class CollectionTest {
expect(3.0) { arrayListOf(1.0, 2.0).sum() }
expect(3000000000000) { arrayListOf<Long>(1000000000000, 2000000000000).sum() }
expect(3.0.toFloat()) { arrayListOf<Float>(1.0.toFloat(), 2.0.toFloat()).sum() }
expect(3.0.toFloat()) { streamOf<Float>(1.0.toFloat(), 2.0.toFloat()).sum() }
}
test fun takeReturnsFirstNElements() {