Clean warnings and refactor stdlib tests.

Merge RangeJVMTest into RangeTest.
This commit is contained in:
Ilya Gorbunov
2017-04-12 09:23:57 +03:00
parent ac46f1e23d
commit 6ae19e03d5
32 changed files with 133 additions and 124 deletions
+4 -4
View File
@@ -1,13 +1,11 @@
package test.collections
import kotlin.test.*
import test.*
import org.junit.Test
class MapTest {
// just a static type check
fun <T> assertStaticTypeIs(value: T) {}
@Test fun getOrElse() {
val data = mapOf<String, Int>()
val a = data.getOrElse("foo") { 2 }
@@ -109,7 +107,9 @@ class MapTest {
assertTrue(map === newMap)
// static types test
val m: HashMap<String, String> = hashMapOf("a" to "b").onEach { }
assertStaticTypeIs<HashMap<String, String>>(
hashMapOf("a" to "b").onEach { }
)
}
@Test fun stream() {