Add tests for enhanced java signatures based on AbstractResolvedCallsTest.

Refactor AbstractResolvedCallsTest to support multiple carets (multiple methods being tested  for resolve) in testdata file.
This commit is contained in:
Ilya Gorbunov
2016-12-02 21:41:20 +03:00
parent 15061ff125
commit 84a7e3c032
42 changed files with 946 additions and 21 deletions
@@ -0,0 +1,11 @@
fun notNullValues(collection: MutableCollection<String>) {
collection.<caret>removeIf { it.length > 5 }
}
fun <E : CharSequence> nullableValues(collection: MutableCollection<E?>) {
collection.<caret>removeIf { it != null && it.length > 5 }
}
fun <E : CharSequence?> nullableValues2(collection: MutableCollection<E>) {
collection.<caret>removeIf { it == null }
}
@@ -0,0 +1,20 @@
fun notNullValues(collection: MutableCollection<String>) {
collection.removeIf { it.length > 5 }
// SUCCESS
// ORIGINAL: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
// SUBSTITUTED: fun removeIf((String) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
}
fun <E : CharSequence> nullableValues(collection: MutableCollection<E?>) {
collection.removeIf { it != null && it.length > 5 }
// SUCCESS
// ORIGINAL: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
// SUBSTITUTED: fun removeIf((E?) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
}
fun <E : CharSequence?> nullableValues2(collection: MutableCollection<E>) {
collection.removeIf { it == null }
// SUCCESS
// ORIGINAL: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
// SUBSTITUTED: fun removeIf((E) -> Boolean): Boolean defined in kotlin.collections.MutableCollection
}
@@ -0,0 +1,12 @@
// TODO: Fix platform types
fun <E : CharSequence> notNullValues(collection: Collection<E>) {
collection.<caret>spliterator()
}
fun <E : CharSequence> nullableValues(collection: Collection<E?>) {
collection.<caret>spliterator()
}
fun <E : CharSequence?> nullableValues2(collection: Collection<E>) {
collection.<caret>spliterator()
}
@@ -0,0 +1,21 @@
// TODO: Fix platform types
fun <E : CharSequence> notNullValues(collection: Collection<E>) {
collection.spliterator()
// SUCCESS
// ORIGINAL: fun spliterator(): Spliterator<E!> defined in kotlin.collections.Collection
// SUBSTITUTED: fun spliterator(): Spliterator<E!> defined in kotlin.collections.Collection
}
fun <E : CharSequence> nullableValues(collection: Collection<E?>) {
collection.spliterator()
// SUCCESS
// ORIGINAL: fun spliterator(): Spliterator<E!> defined in kotlin.collections.Collection
// SUBSTITUTED: fun spliterator(): Spliterator<E?> defined in kotlin.collections.Collection
}
fun <E : CharSequence?> nullableValues2(collection: Collection<E>) {
collection.spliterator()
// SUCCESS
// ORIGINAL: fun spliterator(): Spliterator<E!> defined in kotlin.collections.Collection
// SUBSTITUTED: fun spliterator(): Spliterator<E!> defined in kotlin.collections.Collection
}
@@ -0,0 +1,14 @@
fun <E : CharSequence> notNullValues(collection: Collection<E>) {
collection.<caret>stream()
collection.<caret>parallelStream()
}
fun <E : CharSequence> nullableValues(collection: Collection<E?>) {
collection.<caret>stream()
collection.<caret>parallelStream()
}
fun <E : CharSequence?> nullableValues2(collection: Collection<E>) {
collection.<caret>stream()
collection.<caret>parallelStream()
}
@@ -0,0 +1,32 @@
fun <E : CharSequence> notNullValues(collection: Collection<E>) {
collection.stream()
// SUCCESS
// ORIGINAL: fun stream(): Stream<E> defined in kotlin.collections.Collection
// SUBSTITUTED: fun stream(): Stream<E> defined in kotlin.collections.Collection
collection.parallelStream()
// SUCCESS
// ORIGINAL: fun parallelStream(): Stream<E> defined in kotlin.collections.Collection
// SUBSTITUTED: fun parallelStream(): Stream<E> defined in kotlin.collections.Collection
}
fun <E : CharSequence> nullableValues(collection: Collection<E?>) {
collection.stream()
// SUCCESS
// ORIGINAL: fun stream(): Stream<E> defined in kotlin.collections.Collection
// SUBSTITUTED: fun stream(): Stream<E?> defined in kotlin.collections.Collection
collection.parallelStream()
// SUCCESS
// ORIGINAL: fun parallelStream(): Stream<E> defined in kotlin.collections.Collection
// SUBSTITUTED: fun parallelStream(): Stream<E?> defined in kotlin.collections.Collection
}
fun <E : CharSequence?> nullableValues2(collection: Collection<E>) {
collection.stream()
// SUCCESS
// ORIGINAL: fun stream(): Stream<E> defined in kotlin.collections.Collection
// SUBSTITUTED: fun stream(): Stream<E> defined in kotlin.collections.Collection
collection.parallelStream()
// SUCCESS
// ORIGINAL: fun parallelStream(): Stream<E> defined in kotlin.collections.Collection
// SUBSTITUTED: fun parallelStream(): Stream<E> defined in kotlin.collections.Collection
}
@@ -0,0 +1,11 @@
fun <E : CharSequence> notNullValues(collection: Iterable<E>) {
collection.<caret>spliterator()
}
fun <E : CharSequence> nullableValues(collection: Iterable<E?>) {
collection.<caret>spliterator()
}
fun <E : CharSequence?> nullableValues2(collection: Iterable<E>) {
collection.<caret>spliterator()
}
@@ -0,0 +1,20 @@
fun <E : CharSequence> notNullValues(collection: Iterable<E>) {
collection.spliterator()
// SUCCESS
// ORIGINAL: fun spliterator(): Spliterator<T> defined in kotlin.collections.Iterable
// SUBSTITUTED: fun spliterator(): Spliterator<E> defined in kotlin.collections.Iterable
}
fun <E : CharSequence> nullableValues(collection: Iterable<E?>) {
collection.spliterator()
// SUCCESS
// ORIGINAL: fun spliterator(): Spliterator<T> defined in kotlin.collections.Iterable
// SUBSTITUTED: fun spliterator(): Spliterator<E?> defined in kotlin.collections.Iterable
}
fun <E : CharSequence?> nullableValues2(collection: Iterable<E>) {
collection.spliterator()
// SUCCESS
// ORIGINAL: fun spliterator(): Spliterator<T> defined in kotlin.collections.Iterable
// SUBSTITUTED: fun spliterator(): Spliterator<E> defined in kotlin.collections.Iterable
}
@@ -0,0 +1,7 @@
fun notNullValues(it: Iterator<String>) {
it.<caret>forEachRemaining { e -> }
}
fun mutableNullableValues(it: MutableIterator<String?>) {
it.<caret>forEachRemaining { e -> }
}
@@ -0,0 +1,13 @@
fun notNullValues(it: Iterator<String>) {
it.forEachRemaining { e -> }
// SUCCESS
// ORIGINAL: fun forEachRemaining((T) -> Unit): Unit defined in kotlin.collections.Iterator
// SUBSTITUTED: fun forEachRemaining((String) -> Unit): Unit defined in kotlin.collections.Iterator
}
fun mutableNullableValues(it: MutableIterator<String?>) {
it.forEachRemaining { e -> }
// SUCCESS
// ORIGINAL: fun forEachRemaining((T) -> Unit): Unit defined in kotlin.collections.MutableIterator
// SUBSTITUTED: fun forEachRemaining((String?) -> Unit): Unit defined in kotlin.collections.MutableIterator
}
@@ -0,0 +1,9 @@
fun notNullValues(list: MutableList<String>) {
// TODO: Fix platform types
list.<caret>replaceAll { it.length.toString() }
}
fun nullableValues(list: MutableList<String?>) {
// TODO: Fix platform types
list.<caret>replaceAll { it?.run { length.toString() } }
}
@@ -0,0 +1,15 @@
fun notNullValues(list: MutableList<String>) {
// TODO: Fix platform types
list.replaceAll { it.length.toString() }
// SUCCESS
// ORIGINAL: fun replaceAll((E!) -> E!): Unit defined in kotlin.collections.MutableList
// SUBSTITUTED: fun replaceAll((String!) -> String!): Unit defined in kotlin.collections.MutableList
}
fun nullableValues(list: MutableList<String?>) {
// TODO: Fix platform types
list.replaceAll { it?.run { length.toString() } }
// SUCCESS
// ORIGINAL: fun replaceAll((E!) -> E!): Unit defined in kotlin.collections.MutableList
// SUBSTITUTED: fun replaceAll((String?) -> String?): Unit defined in kotlin.collections.MutableList
}
@@ -0,0 +1,14 @@
fun <E : CharSequence> notNullValues(collection: List<E>) {
collection.<caret>stream()
collection.<caret>parallelStream()
}
fun <E : CharSequence> nullableValues(collection: List<E?>) {
collection.<caret>stream()
collection.<caret>parallelStream()
}
fun <E : CharSequence?> nullableValues2(collection: List<E>) {
collection.<caret>stream()
collection.<caret>parallelStream()
}
@@ -0,0 +1,32 @@
fun <E : CharSequence> notNullValues(collection: List<E>) {
collection.stream()
// SUCCESS
// ORIGINAL: fun stream(): Stream<E> defined in kotlin.collections.List
// SUBSTITUTED: fun stream(): Stream<E> defined in kotlin.collections.List
collection.parallelStream()
// SUCCESS
// ORIGINAL: fun parallelStream(): Stream<E> defined in kotlin.collections.List
// SUBSTITUTED: fun parallelStream(): Stream<E> defined in kotlin.collections.List
}
fun <E : CharSequence> nullableValues(collection: List<E?>) {
collection.stream()
// SUCCESS
// ORIGINAL: fun stream(): Stream<E> defined in kotlin.collections.List
// SUBSTITUTED: fun stream(): Stream<E?> defined in kotlin.collections.List
collection.parallelStream()
// SUCCESS
// ORIGINAL: fun parallelStream(): Stream<E> defined in kotlin.collections.List
// SUBSTITUTED: fun parallelStream(): Stream<E?> defined in kotlin.collections.List
}
fun <E : CharSequence?> nullableValues2(collection: List<E>) {
collection.stream()
// SUCCESS
// ORIGINAL: fun stream(): Stream<E> defined in kotlin.collections.List
// SUBSTITUTED: fun stream(): Stream<E> defined in kotlin.collections.List
collection.parallelStream()
// SUCCESS
// ORIGINAL: fun parallelStream(): Stream<E> defined in kotlin.collections.List
// SUBSTITUTED: fun parallelStream(): Stream<E> defined in kotlin.collections.List
}
@@ -0,0 +1,19 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.<caret>compute(1) { k, v -> null }
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.<caret>compute(1) { k, v -> v?.let { it + k } }
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.<caret>compute(1) { k, v -> null }
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.<caret>compute(1) { k, v -> null }
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.<caret>compute(1) { k, v -> null }
}
@@ -0,0 +1,34 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.compute(1) { k, v -> null }
// SUCCESS
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun compute(Int, (Int, String?) -> String?): String? defined in kotlin.collections.MutableMap
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.compute(1) { k, v -> v?.let { it + k } }
// SUCCESS
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun compute(Int, (Int, String?) -> String?): String? defined in kotlin.collections.MutableMap
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.compute(1) { k, v -> null }
// SUCCESS
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun compute(Int, (Int, T?) -> T?): T? defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.compute(1) { k, v -> null }
// SUCCESS
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun compute(Int, (Int, T?) -> T?): T? defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.compute(1) { k, v -> null }
// SUCCESS
// ORIGINAL: fun compute(K, (K, V?) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun compute(Int, (Int, T?) -> T?): T? defined in kotlin.collections.MutableMap
}
@@ -0,0 +1,19 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.<caret>computeIfAbsent(1) { k -> "new value" }
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.<caret>computeIfAbsent(1) { k -> null }
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.<caret>computeIfAbsent(1) { k -> newValue }
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.<caret>computeIfAbsent(1) { k -> newValue }
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.<caret>computeIfAbsent(1) { k -> newValue }
}
@@ -0,0 +1,34 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.computeIfAbsent(1) { k -> "new value" }
// SUCCESS
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> String): String defined in kotlin.collections.MutableMap
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.computeIfAbsent(1) { k -> null }
// SUCCESS
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> String?): String? defined in kotlin.collections.MutableMap
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.computeIfAbsent(1) { k -> newValue }
// SUCCESS
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> T): T defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.computeIfAbsent(1) { k -> newValue }
// SUCCESS
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> T): T defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.computeIfAbsent(1) { k -> newValue }
// SUCCESS
// ORIGINAL: fun computeIfAbsent(K, (K) -> V): V defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfAbsent(Int, (Int) -> T?): T? defined in kotlin.collections.MutableMap
}
@@ -0,0 +1,19 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.<caret>computeIfPresent(1) { k, v -> v.length.toString() ?: null }
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.<caret>computeIfPresent(1) { k, v -> v?.length?.toString() }
}
fun <T : String?> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.<caret>computeIfPresent(1) { k, v -> v?.length.toString() ?: null }
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.<caret>computeIfPresent(1) { k, v -> null }
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.<caret>computeIfPresent(1) { k, v -> null }
}
@@ -0,0 +1,34 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.computeIfPresent(1) { k, v -> v.length.toString() ?: null }
// SUCCESS
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfPresent(Int, (Int, String) -> String?): String? defined in kotlin.collections.MutableMap
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.computeIfPresent(1) { k, v -> v?.length?.toString() }
// SUCCESS
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfPresent(Int, (Int, String) -> String?): String? defined in kotlin.collections.MutableMap
}
fun <T : String?> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.computeIfPresent(1) { k, v -> v?.length.toString() ?: null }
// SUCCESS
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfPresent(Int, (Int, T) -> T?): T? defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.computeIfPresent(1) { k, v -> null }
// SUCCESS
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfPresent(Int, (Int, T) -> T?): T? defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.computeIfPresent(1) { k, v -> null }
// SUCCESS
// ORIGINAL: fun computeIfPresent(K, (K, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun computeIfPresent(Int, (Int, T) -> T?): T? defined in kotlin.collections.MutableMap
}
@@ -0,0 +1,7 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.<caret>forEach { k, v -> }
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.<caret>forEach { k, v -> }
}
@@ -0,0 +1,13 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.forEach { k, v -> }
// SUCCESS
// ORIGINAL: fun forEach((K, V) -> Unit): Unit defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun forEach((Int, String) -> Unit): Unit defined in kotlin.collections.MutableMap
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.forEach { k, v -> }
// SUCCESS
// ORIGINAL: fun forEach((K, V) -> Unit): Unit defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun forEach((Int, T) -> Unit): Unit defined in kotlin.collections.MutableMap
}
@@ -0,0 +1,21 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.<caret>merge(1, "x") { old, new -> old + new }
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.<caret>merge(1, "x") { old, new -> old + new }
map.<caret>merge(1, null) { old, new -> old + new }
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.<caret>merge(1, newValue) { old, new -> null }
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.<caret>merge(1, newValue) { old, new -> null }
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.<caret>merge(1, newValue) { old, new -> new }
map.<caret>merge(1, newValue!!) { old, new -> new }
}
@@ -0,0 +1,42 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.merge(1, "x") { old, new -> old + new }
// SUCCESS
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun merge(Int, String, (String, String) -> String?): String? defined in kotlin.collections.MutableMap
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.merge(1, "x") { old, new -> old + new }
// SUCCESS
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun merge(Int, String, (String, String) -> String?): String? defined in kotlin.collections.MutableMap
map.merge(1, null) { old, new -> old + new }
// OTHER_ERROR
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun merge(Int, String, BiFunction<in String, in String, out String?>): String? defined in kotlin.collections.MutableMap
}
fun <T> valuesT(map: MutableMap<Int, T>, newValue: T) {
map.merge(1, newValue) { old, new -> null }
// SUCCESS
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun merge(Int, T, (T, T) -> T?): T? defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNotNull(map: MutableMap<Int, T>, newValue: T) {
map.merge(1, newValue) { old, new -> null }
// SUCCESS
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun merge(Int, T, (T, T) -> T?): T? defined in kotlin.collections.MutableMap
}
fun <T : Any> valuesTNullable(map: MutableMap<Int, T?>, newValue: T?) {
map.merge(1, newValue) { old, new -> new }
// OTHER_ERROR
// ORIGINAL: fun merge(K, V, BiFunction<in V, in V, out V?>): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun merge(Int, T, BiFunction<in T, in T, out T?>): T? defined in kotlin.collections.MutableMap
map.merge(1, newValue!!) { old, new -> new }
// SUCCESS
// ORIGINAL: fun merge(K, V, (V, V) -> V?): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun merge(Int, T, (T, T) -> T?): T? defined in kotlin.collections.MutableMap
}
@@ -0,0 +1,7 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.<caret>putIfAbsent(1, "")
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.<caret>putIfAbsent(1, null)
}
@@ -0,0 +1,14 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.putIfAbsent(1, "")
// SUCCESS
// ORIGINAL: fun putIfAbsent(K, V): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun putIfAbsent(Int, String): String? defined in kotlin.collections.MutableMap
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.putIfAbsent(1, null)
// SUCCESS
// ORIGINAL: fun putIfAbsent(K, V): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun putIfAbsent(Int, String?): String? defined in kotlin.collections.MutableMap
}
@@ -0,0 +1,13 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.<caret>replace(1, "x")
map.<caret>replace(1, "x", "y")
map.<caret>replaceAll { k, v -> "$k to ${v.length}" }
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.<caret>replace(1, null)
map.<caret>replace(1, null, "x")
map.<caret>replaceAll { k, v -> "$k to $v" }
}
@@ -0,0 +1,32 @@
fun valuesNotNull(map: MutableMap<Int, String>) {
map.replace(1, "x")
// SUCCESS
// ORIGINAL: fun replace(K, V): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun replace(Int, String): String? defined in kotlin.collections.MutableMap
map.replace(1, "x", "y")
// SUCCESS
// ORIGINAL: fun replace(K, V, V): Boolean defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun replace(Int, String, String): Boolean defined in kotlin.collections.MutableMap
map.replaceAll { k, v -> "$k to ${v.length}" }
// SUCCESS
// ORIGINAL: fun replaceAll((K, V) -> V): Unit defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun replaceAll((Int, String) -> String): Unit defined in kotlin.collections.MutableMap
}
fun valuesNullable(map: MutableMap<Int, String?>) {
map.replace(1, null)
// SUCCESS
// ORIGINAL: fun replace(K, V): V? defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun replace(Int, String?): String? defined in kotlin.collections.MutableMap
map.replace(1, null, "x")
// SUCCESS
// ORIGINAL: fun replace(K, V, V): Boolean defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun replace(Int, String?, String?): Boolean defined in kotlin.collections.MutableMap
map.replaceAll { k, v -> "$k to $v" }
// SUCCESS
// ORIGINAL: fun replaceAll((K, V) -> V): Unit defined in kotlin.collections.MutableMap
// SUBSTITUTED: fun replaceAll((Int, String?) -> String?): Unit defined in kotlin.collections.MutableMap
}
@@ -0,0 +1,6 @@
import java.util.*
fun use() {
Optional.<caret>empty<String>()
Optional.<caret>empty<String?>()
}
@@ -0,0 +1,13 @@
import java.util.*
fun use() {
Optional.empty<String>()
// SUCCESS
// ORIGINAL: fun <T : Any!> empty(): Optional<T> defined in java.util.Optional
// SUBSTITUTED: fun <T : Any!> empty(): Optional<String> defined in java.util.Optional
Optional.empty<String?>()
// SUCCESS
// ORIGINAL: fun <T : Any!> empty(): Optional<T> defined in java.util.Optional
// SUBSTITUTED: fun <T : Any!> empty(): Optional<String> defined in java.util.Optional
}
@@ -0,0 +1,9 @@
import java.util.*
fun use(v: Optional<String>) {
v.<caret>get()
}
fun use2(v: Optional<String?>) {
v.<caret>get()
}
@@ -0,0 +1,16 @@
import java.util.*
fun use(v: Optional<String>) {
v.get()
// SUCCESS
// ORIGINAL: fun get(): T defined in java.util.Optional
// SUBSTITUTED: fun get(): String defined in java.util.Optional
}
fun use2(v: Optional<String?>) {
v.get()
// SUCCESS
// ORIGINAL: fun get(): T defined in java.util.Optional
// SUBSTITUTED: fun get(): String defined in java.util.Optional
}
@@ -0,0 +1,9 @@
import java.util.*
fun use(v: Optional<String>) {
v.<caret>ifPresent { value -> }
}
fun use2(v: Optional<String?>) {
v.<caret>ifPresent { value -> }
}
@@ -0,0 +1,16 @@
import java.util.*
fun use(v: Optional<String>) {
v.ifPresent { value -> }
// SUCCESS
// ORIGINAL: fun ifPresent((T) -> Unit): Unit defined in java.util.Optional
// SUBSTITUTED: fun ifPresent((String) -> Unit): Unit defined in java.util.Optional
}
fun use2(v: Optional<String?>) {
v.ifPresent { value -> }
// SUCCESS
// ORIGINAL: fun ifPresent((T) -> Unit): Unit defined in java.util.Optional
// SUBSTITUTED: fun ifPresent((String) -> Unit): Unit defined in java.util.Optional
}
@@ -0,0 +1,9 @@
import java.util.*
fun use() {
val x: String? = "x"
Optional.<caret>of(x)
Optional.<caret>of(x!!)
Optional.<caret>ofNullable(x)
}
@@ -0,0 +1,19 @@
import java.util.*
fun use() {
val x: String? = "x"
Optional.of(x)
// OTHER_ERROR
// ORIGINAL: fun <T : Any!> of(T): Optional<T> defined in java.util.Optional
// SUBSTITUTED: fun <T : Any!> of(String): Optional<String> defined in java.util.Optional
Optional.of(x!!)
// SUCCESS
// ORIGINAL: fun <T : Any!> of(T): Optional<T> defined in java.util.Optional
// SUBSTITUTED: fun <T : Any!> of(String): Optional<String> defined in java.util.Optional
Optional.ofNullable(x)
// SUCCESS
// ORIGINAL: fun <T : Any!> ofNullable(T?): Optional<T> defined in java.util.Optional
// SUBSTITUTED: fun <T : Any!> ofNullable(String?): Optional<String> defined in java.util.Optional
}
@@ -0,0 +1,56 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.resolve.calls
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
import org.jetbrains.kotlin.test.ConfigurationKind
import org.jetbrains.kotlin.test.TestJdkKind
abstract class AbstractEnhancedSignaturesResolvedCallsTest : AbstractResolvedCallsTest() {
// requires full JDK with various Java API: java.util.Optional, java.util.Map
override fun createEnvironment(): KotlinCoreEnvironment = createEnvironmentWithJdk(ConfigurationKind.ALL, TestJdkKind.FULL_JDK)
override fun renderOutput(originalText: String, text: String, resolvedCallsAt: List<Pair<Int, ResolvedCall<*>?>>): String {
val lines = text.lines()
val lineOffsets = run {
var offset = 0
lines.map { offset.apply { offset += it.length + 1 /* new-line delimiter */ } }
}
fun lineIndexAt(caret: Int): Int =
lineOffsets.binarySearch(caret).let { result ->
if (result < 0) result.inv() - 1 else result }
val callsByLine = resolvedCallsAt.groupBy ({ (caret) -> lineIndexAt(caret) }, { (_, resolvedCall) -> resolvedCall })
return buildString {
lines.forEachIndexed { lineIndex, line ->
appendln(line)
callsByLine[lineIndex]?.let { calls ->
val indent = line.takeWhile(Char::isWhitespace) + " "
calls.forEach { resolvedCall ->
appendln("$indent// ${resolvedCall?.status}")
appendln("$indent// ORIGINAL: ${resolvedCall?.run { resultingDescriptor!!.original.getText() }}")
appendln("$indent// SUBSTITUTED: ${resolvedCall?.run { resultingDescriptor!!.getText() }}")
}
}
}
}
}
}
@@ -48,34 +48,62 @@ abstract class AbstractResolvedCallsTest : KotlinTestWithEnvironment() {
override fun createEnvironment(): KotlinCoreEnvironment = createEnvironmentWithMockJdk(ConfigurationKind.ALL)
fun doTest(filePath: String) {
val text = KotlinTestUtils.doLoadFile(File(filePath))!!
val originalText = KotlinTestUtils.doLoadFile(File(filePath))!!
val (text, carets) = extractCarets(originalText)
val ktFile = KtPsiFactory(project).createFile(text.replace("<caret>", ""))
val ktFile = KtPsiFactory(project).createFile(text)
val bindingContext = JvmResolveUtil.analyze(ktFile, environment).bindingContext
val (element, cachedCall) = buildCachedCall(bindingContext, ktFile, text)
val resolvedCallsAt = carets.map { caret -> caret to run {
val (element, cachedCall) = buildCachedCallAtIndex(bindingContext, ktFile, caret)
val resolvedCall = if (cachedCall !is VariableAsFunctionResolvedCall) cachedCall
else if ("(" == element?.text) cachedCall.functionCall
else cachedCall.variableCall
val resolvedCall = when {
cachedCall !is VariableAsFunctionResolvedCall -> cachedCall
"(" == element?.text -> cachedCall.functionCall
else -> cachedCall.variableCall
}
resolvedCall
}}
val output = renderOutput(originalText, text, resolvedCallsAt)
val resolvedCallInfoFileName = FileUtil.getNameWithoutExtension(filePath) + ".txt"
KotlinTestUtils.assertEqualsToFile(File(resolvedCallInfoFileName), "$text\n\n\n${resolvedCall?.renderToText()}")
KotlinTestUtils.assertEqualsToFile(File(resolvedCallInfoFileName), output)
}
open protected fun buildCachedCall(
bindingContext: BindingContext, jetFile: KtFile, text: String
protected open fun renderOutput(originalText: String, text: String, resolvedCallsAt: List<Pair<Int, ResolvedCall<*>?>>): String =
resolvedCallsAt.joinToString("\n\n", prefix = "$originalText\n\n\n") { (_, resolvedCall) ->
resolvedCall?.renderToText().toString()
}
protected fun extractCarets(text: String): Pair<String, List<Int>> {
val parts = text.split("<caret>")
if (parts.size < 2) return text to emptyList()
// possible to rewrite using 'scan' function to get partial sums of parts lengths
val indices = mutableListOf<Int>()
val resultText = buildString {
parts.dropLast(1).forEach { part ->
append(part)
indices.add(this.length)
}
append(parts.last())
}
return resultText to indices
}
protected open fun buildCachedCallAtIndex(
bindingContext: BindingContext, jetFile: KtFile, index: Int
): Pair<PsiElement?, ResolvedCall<out CallableDescriptor>?> {
val element = jetFile.findElementAt(text.indexOf("<caret>"))!!
val element = jetFile.findElementAt(index)!!
val expression = element.getStrictParentOfType<KtExpression>()
val cachedCall = expression?.getParentResolvedCall(bindingContext, strict = false)
return Pair(element, cachedCall)
}
}
private fun Receiver?.getText() = when (this) {
internal fun Receiver?.getText() = when (this) {
is ExpressionReceiver -> "${expression.text} {${type}}"
is ImplicitClassReceiver -> "Class{${type}}"
is ExtensionReceiver -> "${type}Ext{${declarationDescriptor.getText()}}"
@@ -83,9 +111,9 @@ private fun Receiver?.getText() = when (this) {
else -> toString()
}
private fun ValueArgument.getText() = this.getArgumentExpression()?.text?.replace("\n", " ") ?: ""
internal fun ValueArgument.getText() = this.getArgumentExpression()?.text?.replace("\n", " ") ?: ""
private fun ArgumentMapping.getText() = when (this) {
internal fun ArgumentMapping.getText() = when (this) {
is ArgumentMatch -> {
val parameterType = DescriptorRenderer.SHORT_NAMES_IN_TYPES.renderType(valueParameter.type)
"${status.name} ${valueParameter.name} : ${parameterType} ="
@@ -93,12 +121,12 @@ private fun ArgumentMapping.getText() = when (this) {
else -> "ARGUMENT UNMAPPED: "
}
private fun DeclarationDescriptor.getText(): String = when (this) {
internal fun DeclarationDescriptor.getText(): String = when (this) {
is ReceiverParameterDescriptor -> "${value.getText()}::this"
else -> DescriptorRenderer.COMPACT_WITH_SHORT_TYPES.render(this)
}
private fun ResolvedCall<*>.renderToText(): String {
internal fun ResolvedCall<*>.renderToText(): String {
return buildString {
appendln("Resolved call:")
appendln()
@@ -27,10 +27,10 @@ import org.jetbrains.kotlin.resolve.calls.model.ResolvedCall
abstract class AbstractResolvedConstructorDelegationCallsTests : AbstractResolvedCallsTest() {
override fun buildCachedCall(
bindingContext: BindingContext, jetFile: KtFile, text: String
override fun buildCachedCallAtIndex(
bindingContext: BindingContext, jetFile: KtFile, index: Int
): Pair<PsiElement?, ResolvedCall<out CallableDescriptor>?> {
val element = jetFile.findElementAt(text.indexOf("<caret>"))
val element = jetFile.findElementAt(index)
val constructor = element?.getNonStrictParentOfType<KtSecondaryConstructor>()!!
val delegationCall = constructor.getDelegationCall()
@@ -0,0 +1,200 @@
/*
* Copyright 2010-2016 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jetbrains.kotlin.resolve.calls;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/resolvedCalls/enhancedSignatures")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class EnhancedSignaturesResolvedCallsTestGenerated extends AbstractEnhancedSignaturesResolvedCallsTest {
public void testAllFilesPresentInEnhancedSignatures() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("compiler/testData/resolvedCalls/enhancedSignatures/collection")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Collection extends AbstractEnhancedSignaturesResolvedCallsTest {
public void testAllFilesPresentInCollection() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/collection"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("collectionRemoveIf.kt")
public void testCollectionRemoveIf() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionRemoveIf.kt");
doTest(fileName);
}
@TestMetadata("collectionSpliterator.kt")
public void testCollectionSpliterator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionSpliterator.kt");
doTest(fileName);
}
@TestMetadata("collectionStream.kt")
public void testCollectionStream() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/collection/collectionStream.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/resolvedCalls/enhancedSignatures/iterable")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Iterable extends AbstractEnhancedSignaturesResolvedCallsTest {
public void testAllFilesPresentInIterable() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/iterable"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("iterableSpliterator.kt")
public void testIterableSpliterator() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/iterable/iterableSpliterator.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/resolvedCalls/enhancedSignatures/iterator")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Iterator extends AbstractEnhancedSignaturesResolvedCallsTest {
public void testAllFilesPresentInIterator() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/iterator"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("iteratorForEachRemaining.kt")
public void testIteratorForEachRemaining() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/iterator/iteratorForEachRemaining.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/resolvedCalls/enhancedSignatures/list")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class List extends AbstractEnhancedSignaturesResolvedCallsTest {
public void testAllFilesPresentInList() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/list"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("listReplaceAll.kt")
public void testListReplaceAll() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/list/listReplaceAll.kt");
doTest(fileName);
}
@TestMetadata("listStream.kt")
public void testListStream() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/list/listStream.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Map extends AbstractEnhancedSignaturesResolvedCallsTest {
public void testAllFilesPresentInMap() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/map"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("mapCompute.kt")
public void testMapCompute() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapCompute.kt");
doTest(fileName);
}
@TestMetadata("mapComputeIfAbsent.kt")
public void testMapComputeIfAbsent() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfAbsent.kt");
doTest(fileName);
}
@TestMetadata("mapComputeIfPresent.kt")
public void testMapComputeIfPresent() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapComputeIfPresent.kt");
doTest(fileName);
}
@TestMetadata("mapForEach.kt")
public void testMapForEach() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapForEach.kt");
doTest(fileName);
}
@TestMetadata("mapMerge.kt")
public void testMapMerge() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapMerge.kt");
doTest(fileName);
}
@TestMetadata("mapPutIfAbsent.kt")
public void testMapPutIfAbsent() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapPutIfAbsent.kt");
doTest(fileName);
}
@TestMetadata("mapReplace.kt")
public void testMapReplace() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/map/mapReplace.kt");
doTest(fileName);
}
}
@TestMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class Optional extends AbstractEnhancedSignaturesResolvedCallsTest {
public void testAllFilesPresentInOptional() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls/enhancedSignatures/optional"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
}
@TestMetadata("optionalEmpty.kt")
public void testOptionalEmpty() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalEmpty.kt");
doTest(fileName);
}
@TestMetadata("optionalGet.kt")
public void testOptionalGet() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalGet.kt");
doTest(fileName);
}
@TestMetadata("optionalIfPresent.kt")
public void testOptionalIfPresent() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalIfPresent.kt");
doTest(fileName);
}
@TestMetadata("optionalOf.kt")
public void testOptionalOf() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/resolvedCalls/enhancedSignatures/optional/optionalOf.kt");
doTest(fileName);
}
}
}
@@ -33,7 +33,7 @@ import java.util.regex.Pattern;
@RunWith(JUnit3RunnerWithInners.class)
public class ResolvedCallsTestGenerated extends AbstractResolvedCallsTest {
public void testAllFilesPresentInResolvedCalls() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/resolvedCalls"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true, "enhancedSignatures");
}
@TestMetadata("explicitReceiverIsDispatchReceiver.kt")
@@ -151,6 +151,7 @@ import org.jetbrains.kotlin.renderer.AbstractFunctionDescriptorInExpressionRende
import org.jetbrains.kotlin.repl.AbstractReplInterpreterTest
import org.jetbrains.kotlin.resolve.AbstractResolveTest
import org.jetbrains.kotlin.resolve.annotation.AbstractAnnotationParameterTest
import org.jetbrains.kotlin.resolve.calls.AbstractEnhancedSignaturesResolvedCallsTest
import org.jetbrains.kotlin.resolve.calls.AbstractResolvedCallsTest
import org.jetbrains.kotlin.resolve.calls.AbstractResolvedConstructorDelegationCallsTests
import org.jetbrains.kotlin.resolve.constants.evaluate.AbstractCompileTimeConstantEvaluatorTest
@@ -208,7 +209,7 @@ fun main(args: Array<String>) {
}
testClass<AbstractResolvedCallsTest>() {
model("resolvedCalls")
model("resolvedCalls", excludeDirs = listOf("enhancedSignatures"))
}
testClass<AbstractResolvedConstructorDelegationCallsTests>() {
@@ -421,6 +422,10 @@ fun main(args: Array<String>) {
model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava")
}
testClass<AbstractEnhancedSignaturesResolvedCallsTest> {
model("resolvedCalls/enhancedSignatures")
}
testClass<AbstractJvm8RuntimeDescriptorLoaderTest>() {
model("loadJava8/compiledJava", extension = "java", excludeDirs = listOf("sam", "kotlinSignature/propagation"))
}