Code insight: "Generate..." actions for test framework support methods

#KT-9355 Fixed
This commit is contained in:
Alexey Sedunov
2015-09-30 17:26:59 +03:00
parent 5a325aeec0
commit 730cc7b551
45 changed files with 941 additions and 2 deletions
@@ -83,7 +83,7 @@ public fun <K> Iterable<K>.mapToIndex(): Map<K, Int> {
return map
}
public fun <T, C: Collection<T>> C.ifEmpty(body: () -> C): C = if (isEmpty()) body() else this
public inline fun <T, C: Collection<T>> C.ifEmpty(body: () -> C): C = if (isEmpty()) body() else this
public fun <T: Any> emptyOrSingletonList(item: T?): List<T> = if (item == null) listOf() else listOf(item)