Stdlib: run all stdlib tests with JS backend(as possible).

This commit is contained in:
Zalim Bashorov
2014-10-10 17:10:17 +04:00
parent f20ee6df4b
commit f202ad9f98
18 changed files with 252 additions and 208 deletions
@@ -202,13 +202,13 @@ abstract class IterableTests<T : Iterable<String>>(val data: T, val empty: T) {
Test
fun fold() {
expect(231) { data.fold(1, {a, b -> a + if (b == "foo") 200 else 30 }) }
}
Test
fun reduce() {
val reduced = data.reduce {a, b -> a + b }
assertEquals(6, reduced.size)
assertTrue(reduced == "foobar" || reduced == "barfoo")
}
}