Adjust testData to isEmpty/key/value transformations

This commit is contained in:
Denis Zharkov
2015-10-09 14:16:51 +03:00
parent 83b680935b
commit 97ed8c83a0
28 changed files with 56 additions and 56 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ class StrList : List<String?> {
override val size: Int
get() = throw UnsupportedOperationException()
override fun isEmpty(): Boolean {
override val isEmpty: Boolean get() {
throw UnsupportedOperationException()
}
@@ -1,6 +1,6 @@
class MyCollection<T>: Collection<T> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw UnsupportedOperationException()
override fun containsAll(c: Collection<T>): Boolean = false
+1 -1
View File
@@ -1,6 +1,6 @@
class MyList<T>: List<T> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw Error()
override fun containsAll(c: Collection<T>): Boolean = false
@@ -1,6 +1,6 @@
class MyList<T>(val v: T): List<T> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw Error()
override fun containsAll(c: Collection<T>): Boolean = false
@@ -13,7 +13,7 @@ open class Super<T>(val v: T) {
class MyList<T>(v: T): Super<T>(v), List<T> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun contains(o: T): Boolean = false
override fun iterator(): Iterator<T> = throw Error()
override fun containsAll(c: Collection<T>): Boolean = false
+1 -1
View File
@@ -1,6 +1,6 @@
class MyMap<K, V>: Map<K, V> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun containsKey(key: Any?): Boolean = false
override fun containsValue(value: Any?): Boolean = false
override fun get(key: Any?): V? = null
@@ -1,8 +1,8 @@
class MyMapEntry<K, V>: Map.Entry<K, V> {
override fun hashCode(): Int = 0
override fun equals(other: Any?): Boolean = false
override fun getKey(): K = throw UnsupportedOperationException()
override fun getValue(): V = throw UnsupportedOperationException()
override val key: K get() = throw UnsupportedOperationException()
override val value: V get() = throw UnsupportedOperationException()
}
fun box(): String {
@@ -1,8 +1,8 @@
class MyMapEntry<K, V>: Map.Entry<K, V> {
override fun hashCode(): Int = 0
override fun equals(other: Any?): Boolean = false
override fun getKey(): K = throw UnsupportedOperationException()
override fun getValue(): V = throw UnsupportedOperationException()
override val key: K get() = throw UnsupportedOperationException()
override val value: V get() = throw UnsupportedOperationException()
public fun setValue(value: V): V = value
}
@@ -1,6 +1,6 @@
class MyMap<K, V>: Map<K, V> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun containsKey(key: Any?): Boolean = false
override fun containsValue(value: Any?): Boolean = false
override fun get(key: Any?): V? = null
@@ -1,6 +1,6 @@
class MyList: List<String> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun contains(o: String): Boolean = false
override fun iterator(): Iterator<String> = throw Error()
override fun containsAll(c: Collection<String>): Boolean = false
@@ -4,7 +4,7 @@ interface Addable {
class C : Addable, List<String> {
override val size: Int get() = null!!
override fun isEmpty(): Boolean = null!!
override val isEmpty: Boolean get() = null!!
override fun contains(o: String): Boolean = null!!
override fun iterator(): Iterator<String> = null!!
override fun containsAll(c: Collection<String>): Boolean = null!!
@@ -6,7 +6,7 @@ open class SetStringImpl {
class S : Set<String>, SetStringImpl() {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun contains(o: String): Boolean = false
override fun iterator(): Iterator<String> = null!!
override fun containsAll(c: Collection<String>) = false
@@ -2,10 +2,10 @@ import java.util.Collections
class A<U : Number, V : U, W : V> : Set<W> {
override val size: Int get() = 0
override fun isEmpty(): Boolean = true
override val isEmpty: Boolean get() = true
override fun contains(o: W): Boolean = false
override fun iterator(): Iterator<W> = Collections.emptySet<W>().iterator()
override fun containsAll(c: Collection<W>): Boolean = c.isEmpty()
override fun containsAll(c: Collection<W>): Boolean = c.isEmpty
}
fun expectUoe(block: () -> Any) {
@@ -3,7 +3,7 @@ import java.util.ArrayList
class MyCollection<T> : Collection<List<Iterator<T>>> {
override fun iterator() = null!!
override val size: Int get() = null!!
override fun isEmpty(): Boolean = null!!
override val isEmpty: Boolean get() = null!!
override fun contains(o: List<Iterator<T>>): Boolean = null!!
override fun containsAll(c: Collection<List<Iterator<T>>>): Boolean = null!!
}
@@ -5,7 +5,7 @@ interface A0 {
}
class B0 : Collection<String>, A0 {
override fun isEmpty() = throw UnsupportedOperationException()
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -16,7 +16,7 @@ open class A1 {
}
class B1 : Collection<String>, A1() {
override fun isEmpty() = throw UnsupportedOperationException()
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -41,7 +41,7 @@ interface I4<T> {
}
class B4 : Collection<String>, I4<Int> {
override fun isEmpty() = throw UnsupportedOperationException()
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -52,7 +52,7 @@ interface I5 : Collection<String> {
}
class B5 : I5 {
override fun isEmpty() = throw UnsupportedOperationException()
override val isEmpty: Boolean get() = throw UnsupportedOperationException()
override fun contains(o: String) = throw UnsupportedOperationException()
override fun iterator() = throw UnsupportedOperationException()
override fun containsAll(c: Collection<String>) = throw UnsupportedOperationException()
@@ -2,7 +2,7 @@ class A1 : MutableCollection<String> {
override val size: Int
get() = 56
override fun isEmpty(): Boolean {
override val isEmpty: Boolean get() {
throw UnsupportedOperationException()
}
+1 -1
View File
@@ -1,7 +1,7 @@
class A : Map<String, String> {
override val size: Int get() = 56
override fun isEmpty(): Boolean {
override val isEmpty: Boolean get() {
throw UnsupportedOperationException()
}