[FIR-TEST] Move analysis tests to separate module

This commit is contained in:
Dmitriy Novozhilov
2020-03-18 15:10:46 +03:00
parent 3a479d5d16
commit cc07ae96b3
1477 changed files with 1001 additions and 980 deletions
@@ -0,0 +1,25 @@
// FULL_JDK
import java.util.*
import java.util.function.BiConsumer
private val DEBUG = true
abstract class SomeHashTable<K : Any, V : Any> : AbstractMutableMap<K, V>() {
override fun forEach(action: BiConsumer<in K, in V>) {}
override val entries: MutableSet<MutableMap.MutableEntry<K, V>>
get() {
if (DEBUG) {
return Collections.unmodifiableSet(
mutableSetOf<MutableMap.MutableEntry<K, V>>().apply {
forEach { key, value -> add(Entry(key, value)) }
}
)
}
throw UnsupportedOperationException()
}
private class Entry<K, V>(override val key: K, override val value: V) : MutableMap.MutableEntry<K, V> {
override fun setValue(newValue: V): V = throw UnsupportedOperationException()
}
}