Changed test output from line comments to block comments
This commit is contained in:
@@ -2,8 +2,8 @@ Resolve target: value-parameter val p: kotlin.Any smart-cast to kotlin.String
|
||||
----------------------------------------------
|
||||
fun foo(p: Any, p1: Any?) {
|
||||
x(e.f as String)
|
||||
// STATEMENT DELETED: y(p as? Int)
|
||||
// STATEMENT DELETED: z(f() as String)
|
||||
/* STATEMENT DELETED: y(p as? Int) */
|
||||
/* STATEMENT DELETED: z(f() as String) */
|
||||
|
||||
if (a) {
|
||||
print((p as String).size)
|
||||
@@ -14,8 +14,8 @@ fun foo(p: Any, p1: Any?) {
|
||||
|
||||
if (y()) {
|
||||
print(<caret>p.size)
|
||||
// STATEMENT DELETED: p1 as String
|
||||
/* STATEMENT DELETED: p1 as String */
|
||||
}
|
||||
|
||||
// STATEMENT DELETED: z(p1 as String)
|
||||
/* STATEMENT DELETED: z(p1 as String) */
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ Resolve target: value-parameter val p: kotlin.String? smart-cast to kotlin.Strin
|
||||
----------------------------------------------
|
||||
fun foo(p: String?, p1: Any?) {
|
||||
x(e.f!!)
|
||||
// STATEMENT DELETED: y(f()!!)
|
||||
/* STATEMENT DELETED: y(f()!!) */
|
||||
|
||||
if (a) {
|
||||
print(p!!.size)
|
||||
@@ -13,8 +13,8 @@ fun foo(p: String?, p1: Any?) {
|
||||
|
||||
if (y()) {
|
||||
print(<caret>p.size)
|
||||
// STATEMENT DELETED: p1!!
|
||||
/* STATEMENT DELETED: p1!! */
|
||||
}
|
||||
|
||||
// STATEMENT DELETED: z(p1!!)
|
||||
/* STATEMENT DELETED: z(p1!!) */
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ Resolve target: value-parameter val p: kotlin.Boolean? smart-cast to kotlin.Bool
|
||||
----------------------------------------------
|
||||
fun foo(p: Boolean?, p1: Any?) {
|
||||
if (p!!) {
|
||||
// STATEMENT DELETED: print(p1!!.hashCode())
|
||||
/* STATEMENT DELETED: print(p1!!.hashCode()) */
|
||||
}
|
||||
|
||||
<caret>p.hashCode()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Resolve target: val v2: kotlin.Int
|
||||
----------------------------------------------
|
||||
fun foo(p: Int) {
|
||||
// STATEMENT DELETED: x()
|
||||
/* STATEMENT DELETED: x() */
|
||||
|
||||
val v1 = p * p
|
||||
|
||||
@@ -9,12 +9,12 @@ fun foo(p: Int) {
|
||||
val v2 = v1 * v1
|
||||
val v3 = v1 * v2
|
||||
|
||||
// STATEMENT DELETED: run { val v2 = 1 println(v2) }
|
||||
/* STATEMENT DELETED: run { val v2 = 1 println(v2) } */
|
||||
|
||||
print(<caret>v2)
|
||||
|
||||
// STATEMENT DELETED: run { val v2 = 2 println(v2) }
|
||||
/* STATEMENT DELETED: run { val v2 = 2 println(v2) } */
|
||||
}
|
||||
|
||||
// STATEMENT DELETED: z()
|
||||
/* STATEMENT DELETED: z() */
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
Resolve target: val v: kotlin.Int
|
||||
----------------------------------------------
|
||||
fun foo(): String = run {
|
||||
// STATEMENT DELETED: print("a")
|
||||
/* STATEMENT DELETED: print("a") */
|
||||
val v = 1
|
||||
print(<caret>v)
|
||||
"x"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Resolve target: null
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?, c: Collection<String>) {
|
||||
// STATEMENT DELETED: for (e in c) { print(p!!) }
|
||||
/* STATEMENT DELETED: for (e in c) { print(p!!) } */
|
||||
|
||||
<caret>xxx
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ fun x(s: String): Collection<String>{}
|
||||
|
||||
fun foo(p: Any?, p1: Any?) {
|
||||
for (e in x(p as String)) {
|
||||
// STATEMENT DELETED: print(p1!!)
|
||||
/* STATEMENT DELETED: print(p1!!) */
|
||||
}
|
||||
|
||||
<caret>p.size
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Resolve target: null
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?, p1, Any?) {
|
||||
// STATEMENT DELETED: if (x()) { y(p!!) } else { z(p1!!) }
|
||||
/* STATEMENT DELETED: if (x()) { y(p!!) } else { z(p1!!) } */
|
||||
|
||||
<caret>xxx
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ Resolve target: value-parameter val p1: kotlin.Any? smart-cast to kotlin.Any
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?, p1: Any?, p2: Any?) {
|
||||
if (x()) {
|
||||
// STATEMENT DELETED: print(p!!)
|
||||
/* STATEMENT DELETED: print(p!!) */
|
||||
print(p1!!)
|
||||
}
|
||||
else {
|
||||
print(p1 as String)
|
||||
// STATEMENT DELETED: print(p2!!)
|
||||
/* STATEMENT DELETED: print(p2!!) */
|
||||
}
|
||||
|
||||
<caret>p1.hashCode()
|
||||
|
||||
@@ -2,6 +2,6 @@ Resolve target: value-parameter val p: kotlin.Any
|
||||
----------------------------------------------
|
||||
val error = "error"
|
||||
fun foo(p: Any) {
|
||||
// STATEMENT DELETED: if (p !is String) { print(error) }
|
||||
/* STATEMENT DELETED: if (p !is String) { print(error) } */
|
||||
println(<caret>p.size)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: value-parameter val p: kotlin.Any? smart-cast to kotlin.String
|
||||
fun foo(p: Any?) {
|
||||
if (p !is String) {
|
||||
if (p == null) {
|
||||
// STATEMENT DELETED: print("null")
|
||||
/* STATEMENT DELETED: print("null") */
|
||||
return
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -2,7 +2,7 @@ Resolve target: value-parameter val p: kotlin.Any? smart-cast to kotlin.Any
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?) {
|
||||
if (p != null) {
|
||||
// STATEMENT DELETED: print("not null")
|
||||
/* STATEMENT DELETED: print("not null") */
|
||||
}
|
||||
else {
|
||||
return
|
||||
|
||||
@@ -3,13 +3,13 @@ Resolve target: value-parameter val p: kotlin.String? smart-cast to kotlin.Strin
|
||||
fun foo(p: String?, x: Boolean, y: Boolean, z: Boolean, t: Boolean) {
|
||||
if (p == null) {
|
||||
if (x) {
|
||||
// STATEMENT DELETED: print("x")
|
||||
/* STATEMENT DELETED: print("x") */
|
||||
error("error")
|
||||
}
|
||||
else if (y) {
|
||||
// STATEMENT DELETED: print("y")
|
||||
/* STATEMENT DELETED: print("y") */
|
||||
if (z) {
|
||||
// STATEMENT DELETED: print("z")
|
||||
/* STATEMENT DELETED: print("z") */
|
||||
return
|
||||
}
|
||||
else {
|
||||
@@ -18,7 +18,7 @@ fun foo(p: String?, x: Boolean, y: Boolean, z: Boolean, t: Boolean) {
|
||||
}
|
||||
else {
|
||||
if (t) {
|
||||
// STATEMENT DELETED: print("t")
|
||||
/* STATEMENT DELETED: print("t") */
|
||||
return
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { print(1) if (f()) return }
|
||||
/* STATEMENT DELETED: if (x == null) { print(1) if (f()) return } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { print(1) if (f()) { return } else { print(2) } }
|
||||
/* STATEMENT DELETED: if (x == null) { print(1) if (f()) { return } else { print(2) } } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { do { if (g()) break } while (f()) }
|
||||
/* STATEMENT DELETED: if (x == null) { do { if (g()) break } while (f()) } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { print(1) val v = f() ?: return }
|
||||
/* STATEMENT DELETED: if (x == null) { print(1) val v = f() ?: return } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo(c: Collection<String>) {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { for (s in c) { print(s) return } }
|
||||
/* STATEMENT DELETED: if (x == null) { for (s in c) { print(s) return } } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Resolve target: value-parameter val p: kotlin.Any?
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?) {
|
||||
// STATEMENT DELETED: if (p == null) { print("null") }
|
||||
/* STATEMENT DELETED: if (p == null) { print("null") } */
|
||||
<caret>p.hashCode()
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ Resolve target: value-parameter val p: kotlin.Any? smart-cast to kotlin.Any
|
||||
----------------------------------------------
|
||||
fun foo(p: Any?) {
|
||||
if (p == null) {
|
||||
// STATEMENT DELETED: print("null")
|
||||
/* STATEMENT DELETED: print("null") */
|
||||
return
|
||||
}
|
||||
<caret>p.hashCode()
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { while (true) { if (g()) break } }
|
||||
/* STATEMENT DELETED: if (x == null) { while (true) { if (g()) break } } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { while (f()) { print(1) return } }
|
||||
/* STATEMENT DELETED: if (x == null) { while (f()) { print(1) return } } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Resolve target: val kotlin.String.size: kotlin.Int
|
||||
----------------------------------------------
|
||||
fun foo(p: String) {
|
||||
// STATEMENT DELETED: if (x()) return
|
||||
/* STATEMENT DELETED: if (x()) return */
|
||||
println(p.<caret>size)
|
||||
}
|
||||
|
||||
@@ -5,6 +5,6 @@ class C {
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
val lambda = {() -> // STATEMENT DELETED: x(); C() }
|
||||
val lambda = {() -> /* STATEMENT DELETED: x() */; C() }
|
||||
lambda().<caret>f()
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ fun foo(c: Collection<String>): Collection<String> {
|
||||
true
|
||||
}
|
||||
else {
|
||||
// STATEMENT DELETED: println()
|
||||
/* STATEMENT DELETED: println() */
|
||||
it[0] == 'a'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@ Resolve target: value-parameter val p: kotlin.String?
|
||||
----------------------------------------------
|
||||
fun foo(p: String?) {
|
||||
fun local(): String? {
|
||||
// STATEMENT DELETED: if (p == null) return null
|
||||
// STATEMENT DELETED: print(p.size)
|
||||
// STATEMENT DELETED: return ""
|
||||
/* STATEMENT DELETED: if (p == null) return null */
|
||||
/* STATEMENT DELETED: print(p.size) */
|
||||
/* STATEMENT DELETED: return "" */
|
||||
}
|
||||
|
||||
<caret>p?.size
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
|
||||
fun foo() {
|
||||
for (i in 1..10) {
|
||||
val x = take()
|
||||
// STATEMENT DELETED: if (x == null) { while (true) { do { println() } while(f()) break } }
|
||||
/* STATEMENT DELETED: if (x == null) { while (true) { do { println() } while(f()) break } } */
|
||||
<caret>x.hashCode()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@ Resolve target: val v: kotlin.String
|
||||
val v = ""
|
||||
|
||||
fun foo(s: String = <caret>v) {
|
||||
// STATEMENT DELETED: val local = 1
|
||||
// STATEMENT DELETED: print("foo" + local)
|
||||
/* STATEMENT DELETED: val local = 1 */
|
||||
/* STATEMENT DELETED: print("foo" + local) */
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@ Resolve target: val v: kotlin.Int
|
||||
----------------------------------------------
|
||||
var prop: Int
|
||||
get() {
|
||||
// STATEMENT DELETED: print("get")
|
||||
/* STATEMENT DELETED: print("get") */
|
||||
val v = 1
|
||||
<caret>v
|
||||
// STATEMENT DELETED: return 1
|
||||
/* STATEMENT DELETED: return 1 */
|
||||
}
|
||||
set {
|
||||
// STATEMENT DELETED: print("set")
|
||||
// STATEMENT DELETED: val v = 2
|
||||
// STATEMENT DELETED: print("yes")
|
||||
}
|
||||
/* STATEMENT DELETED: print("set") */
|
||||
/* STATEMENT DELETED: val v = 2 */
|
||||
/* STATEMENT DELETED: print("yes") */
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: fun g(): kotlin.Int
|
||||
import kotlin.properties.Delegates
|
||||
|
||||
val prop: Int by Delegates.lazy {
|
||||
// STATEMENT DELETED: print(1)
|
||||
/* STATEMENT DELETED: print(1) */
|
||||
val v = f()
|
||||
<caret>g()
|
||||
v + 1
|
||||
|
||||
@@ -3,7 +3,7 @@ Resolve target: value-parameter val p: kotlin.String? smart-cast to kotlin.Strin
|
||||
fun foo(p: String?): () -> String {
|
||||
if (p == null) {
|
||||
return {
|
||||
// STATEMENT DELETED: println()
|
||||
/* STATEMENT DELETED: println() */
|
||||
"a"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Resolve target: value-parameter val p: kotlin.Int
|
||||
----------------------------------------------
|
||||
fun foo(p: Int) {
|
||||
// STATEMENT DELETED: x()
|
||||
/* STATEMENT DELETED: x() */
|
||||
if (y()) {
|
||||
print(<caret>p)
|
||||
}
|
||||
// STATEMENT DELETED: z()
|
||||
/* STATEMENT DELETED: z() */
|
||||
}
|
||||
|
||||
@@ -18,4 +18,4 @@ fun foo(s: String?, b1: Boolean, b2: Boolean) {
|
||||
)
|
||||
}
|
||||
|
||||
fun x(p1: Int, p2: String) { }
|
||||
fun x(p1: Int, p2: String) { }
|
||||
|
||||
@@ -4,7 +4,7 @@ fun x(s: Any): Boolean{}
|
||||
|
||||
fun foo(p: Any?, p1: Any?) {
|
||||
while(x(p!!)) {
|
||||
// STATEMENT DELETED: print(p1!!)
|
||||
/* STATEMENT DELETED: print(p1!!) */
|
||||
}
|
||||
|
||||
<caret>p.hashCode()
|
||||
|
||||
@@ -5,7 +5,7 @@ fun x(): Boolean{}
|
||||
fun foo(p: Any?) {
|
||||
while(true) {
|
||||
print(p!!)
|
||||
// STATEMENT DELETED: if (x()) break
|
||||
/* STATEMENT DELETED: if (x()) break */
|
||||
}
|
||||
|
||||
<caret>p.hashCode()
|
||||
|
||||
@@ -5,7 +5,7 @@ Resolve target: value-parameter val p: kotlin.Any?
|
||||
fun x(): Boolean{}
|
||||
|
||||
fun foo(p: Any?) {
|
||||
// STATEMENT DELETED: while(2 * 2 == 4) { print(p!!) if (x()) break }
|
||||
/* STATEMENT DELETED: while(2 * 2 == 4) { print(p!!) if (x()) break } */
|
||||
|
||||
<caret>p.hashCode()
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public abstract class AbstractPartialBodyResolveTest : JetLightCodeInsightFixtur
|
||||
{
|
||||
ApplicationManager.getApplication().runWriteAction {
|
||||
for (statement in skippedStatements) {
|
||||
statement.replace(JetPsiFactory(getProject()).createComment("// STATEMENT DELETED: ${statement.compactPresentation()}"))
|
||||
statement.replace(JetPsiFactory(getProject()).createComment("/* STATEMENT DELETED: ${statement.compactPresentation()} */"))
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user