Changed test output from line comments to block comments

This commit is contained in:
Valentin Kipyatkov
2014-11-21 16:01:09 +03:00
parent 2f226685d5
commit 6cb6a907d7
37 changed files with 59 additions and 59 deletions
@@ -2,8 +2,8 @@ Resolve target: value-parameter val p: kotlin.Any smart-cast to kotlin.String
---------------------------------------------- ----------------------------------------------
fun foo(p: Any, p1: Any?) { fun foo(p: Any, p1: Any?) {
x(e.f as String) x(e.f as String)
// STATEMENT DELETED: y(p as? Int) /* STATEMENT DELETED: y(p as? Int) */
// STATEMENT DELETED: z(f() as String) /* STATEMENT DELETED: z(f() as String) */
if (a) { if (a) {
print((p as String).size) print((p as String).size)
@@ -14,8 +14,8 @@ fun foo(p: Any, p1: Any?) {
if (y()) { if (y()) {
print(<caret>p.size) 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?) { fun foo(p: String?, p1: Any?) {
x(e.f!!) x(e.f!!)
// STATEMENT DELETED: y(f()!!) /* STATEMENT DELETED: y(f()!!) */
if (a) { if (a) {
print(p!!.size) print(p!!.size)
@@ -13,8 +13,8 @@ fun foo(p: String?, p1: Any?) {
if (y()) { if (y()) {
print(<caret>p.size) 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?) { fun foo(p: Boolean?, p1: Any?) {
if (p!!) { if (p!!) {
// STATEMENT DELETED: print(p1!!.hashCode()) /* STATEMENT DELETED: print(p1!!.hashCode()) */
} }
<caret>p.hashCode() <caret>p.hashCode()
@@ -1,7 +1,7 @@
Resolve target: val v2: kotlin.Int Resolve target: val v2: kotlin.Int
---------------------------------------------- ----------------------------------------------
fun foo(p: Int) { fun foo(p: Int) {
// STATEMENT DELETED: x() /* STATEMENT DELETED: x() */
val v1 = p * p val v1 = p * p
@@ -9,12 +9,12 @@ fun foo(p: Int) {
val v2 = v1 * v1 val v2 = v1 * v1
val v3 = v1 * v2 val v3 = v1 * v2
// STATEMENT DELETED: run { val v2 = 1 println(v2) } /* STATEMENT DELETED: run { val v2 = 1 println(v2) } */
print(<caret>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 Resolve target: val v: kotlin.Int
---------------------------------------------- ----------------------------------------------
fun foo(): String = run { fun foo(): String = run {
// STATEMENT DELETED: print("a") /* STATEMENT DELETED: print("a") */
val v = 1 val v = 1
print(<caret>v) print(<caret>v)
"x" "x"
} }
@@ -1,7 +1,7 @@
Resolve target: null Resolve target: null
---------------------------------------------- ----------------------------------------------
fun foo(p: Any?, c: Collection<String>) { 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 <caret>xxx
} }
@@ -4,7 +4,7 @@ fun x(s: String): Collection<String>{}
fun foo(p: Any?, p1: Any?) { fun foo(p: Any?, p1: Any?) {
for (e in x(p as String)) { for (e in x(p as String)) {
// STATEMENT DELETED: print(p1!!) /* STATEMENT DELETED: print(p1!!) */
} }
<caret>p.size <caret>p.size
@@ -1,7 +1,7 @@
Resolve target: null Resolve target: null
---------------------------------------------- ----------------------------------------------
fun foo(p: Any?, p1, Any?) { 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 <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?) { fun foo(p: Any?, p1: Any?, p2: Any?) {
if (x()) { if (x()) {
// STATEMENT DELETED: print(p!!) /* STATEMENT DELETED: print(p!!) */
print(p1!!) print(p1!!)
} }
else { else {
print(p1 as String) print(p1 as String)
// STATEMENT DELETED: print(p2!!) /* STATEMENT DELETED: print(p2!!) */
} }
<caret>p1.hashCode() <caret>p1.hashCode()
@@ -2,6 +2,6 @@ Resolve target: value-parameter val p: kotlin.Any
---------------------------------------------- ----------------------------------------------
val error = "error" val error = "error"
fun foo(p: Any) { fun foo(p: Any) {
// STATEMENT DELETED: if (p !is String) { print(error) } /* STATEMENT DELETED: if (p !is String) { print(error) } */
println(<caret>p.size) 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?) { fun foo(p: Any?) {
if (p !is String) { if (p !is String) {
if (p == null) { if (p == null) {
// STATEMENT DELETED: print("null") /* STATEMENT DELETED: print("null") */
return return
} }
else { else {
@@ -2,7 +2,7 @@ Resolve target: value-parameter val p: kotlin.Any? smart-cast to kotlin.Any
---------------------------------------------- ----------------------------------------------
fun foo(p: Any?) { fun foo(p: Any?) {
if (p != null) { if (p != null) {
// STATEMENT DELETED: print("not null") /* STATEMENT DELETED: print("not null") */
} }
else { else {
return 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) { fun foo(p: String?, x: Boolean, y: Boolean, z: Boolean, t: Boolean) {
if (p == null) { if (p == null) {
if (x) { if (x) {
// STATEMENT DELETED: print("x") /* STATEMENT DELETED: print("x") */
error("error") error("error")
} }
else if (y) { else if (y) {
// STATEMENT DELETED: print("y") /* STATEMENT DELETED: print("y") */
if (z) { if (z) {
// STATEMENT DELETED: print("z") /* STATEMENT DELETED: print("z") */
return return
} }
else { else {
@@ -18,7 +18,7 @@ fun foo(p: String?, x: Boolean, y: Boolean, z: Boolean, t: Boolean) {
} }
else { else {
if (t) { if (t) {
// STATEMENT DELETED: print("t") /* STATEMENT DELETED: print("t") */
return return
} }
else { else {
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo() { fun foo() {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo() { fun foo() {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo() { fun foo() {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo() { fun foo() {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo(c: Collection<String>) { fun foo(c: Collection<String>) {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -1,6 +1,6 @@
Resolve target: value-parameter val p: kotlin.Any? Resolve target: value-parameter val p: kotlin.Any?
---------------------------------------------- ----------------------------------------------
fun foo(p: Any?) { fun foo(p: Any?) {
// STATEMENT DELETED: if (p == null) { print("null") } /* STATEMENT DELETED: if (p == null) { print("null") } */
<caret>p.hashCode() <caret>p.hashCode()
} }
@@ -2,7 +2,7 @@ Resolve target: value-parameter val p: kotlin.Any? smart-cast to kotlin.Any
---------------------------------------------- ----------------------------------------------
fun foo(p: Any?) { fun foo(p: Any?) {
if (p == null) { if (p == null) {
// STATEMENT DELETED: print("null") /* STATEMENT DELETED: print("null") */
return return
} }
<caret>p.hashCode() <caret>p.hashCode()
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo() { fun foo() {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo() { fun foo() {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -1,6 +1,6 @@
Resolve target: val kotlin.String.size: kotlin.Int Resolve target: val kotlin.String.size: kotlin.Int
---------------------------------------------- ----------------------------------------------
fun foo(p: String) { fun foo(p: String) {
// STATEMENT DELETED: if (x()) return /* STATEMENT DELETED: if (x()) return */
println(p.<caret>size) println(p.<caret>size)
} }
@@ -5,6 +5,6 @@ class C {
} }
fun foo() { fun foo() {
val lambda = {() -> // STATEMENT DELETED: x(); C() } val lambda = {() -> /* STATEMENT DELETED: x() */; C() }
lambda().<caret>f() lambda().<caret>f()
} }
@@ -8,7 +8,7 @@ fun foo(c: Collection<String>): Collection<String> {
true true
} }
else { else {
// STATEMENT DELETED: println() /* STATEMENT DELETED: println() */
it[0] == 'a' it[0] == 'a'
} }
} }
@@ -2,9 +2,9 @@ Resolve target: value-parameter val p: kotlin.String?
---------------------------------------------- ----------------------------------------------
fun foo(p: String?) { fun foo(p: String?) {
fun local(): String? { fun local(): String? {
// STATEMENT DELETED: if (p == null) return null /* STATEMENT DELETED: if (p == null) return null */
// STATEMENT DELETED: print(p.size) /* STATEMENT DELETED: print(p.size) */
// STATEMENT DELETED: return "" /* STATEMENT DELETED: return "" */
} }
<caret>p?.size <caret>p?.size
@@ -3,7 +3,7 @@ Resolve target: val x: kotlin.Any?
fun foo() { fun foo() {
for (i in 1..10) { for (i in 1..10) {
val x = take() 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() <caret>x.hashCode()
} }
} }
@@ -3,6 +3,6 @@ Resolve target: val v: kotlin.String
val v = "" val v = ""
fun foo(s: String = <caret>v) { fun foo(s: String = <caret>v) {
// STATEMENT DELETED: val local = 1 /* STATEMENT DELETED: val local = 1 */
// STATEMENT DELETED: print("foo" + local) /* STATEMENT DELETED: print("foo" + local) */
} }
@@ -2,13 +2,13 @@ Resolve target: val v: kotlin.Int
---------------------------------------------- ----------------------------------------------
var prop: Int var prop: Int
get() { get() {
// STATEMENT DELETED: print("get") /* STATEMENT DELETED: print("get") */
val v = 1 val v = 1
<caret>v <caret>v
// STATEMENT DELETED: return 1 /* STATEMENT DELETED: return 1 */
} }
set { set {
// STATEMENT DELETED: print("set") /* STATEMENT DELETED: print("set") */
// STATEMENT DELETED: val v = 2 /* STATEMENT DELETED: val v = 2 */
// STATEMENT DELETED: print("yes") /* STATEMENT DELETED: print("yes") */
} }
@@ -3,7 +3,7 @@ Resolve target: fun g(): kotlin.Int
import kotlin.properties.Delegates import kotlin.properties.Delegates
val prop: Int by Delegates.lazy { val prop: Int by Delegates.lazy {
// STATEMENT DELETED: print(1) /* STATEMENT DELETED: print(1) */
val v = f() val v = f()
<caret>g() <caret>g()
v + 1 v + 1
@@ -3,7 +3,7 @@ Resolve target: value-parameter val p: kotlin.String? smart-cast to kotlin.Strin
fun foo(p: String?): () -> String { fun foo(p: String?): () -> String {
if (p == null) { if (p == null) {
return { return {
// STATEMENT DELETED: println() /* STATEMENT DELETED: println() */
"a" "a"
} }
} }
@@ -1,9 +1,9 @@
Resolve target: value-parameter val p: kotlin.Int Resolve target: value-parameter val p: kotlin.Int
---------------------------------------------- ----------------------------------------------
fun foo(p: Int) { fun foo(p: Int) {
// STATEMENT DELETED: x() /* STATEMENT DELETED: x() */
if (y()) { if (y()) {
print(<caret>p) 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?) { fun foo(p: Any?, p1: Any?) {
while(x(p!!)) { while(x(p!!)) {
// STATEMENT DELETED: print(p1!!) /* STATEMENT DELETED: print(p1!!) */
} }
<caret>p.hashCode() <caret>p.hashCode()
@@ -5,7 +5,7 @@ fun x(): Boolean{}
fun foo(p: Any?) { fun foo(p: Any?) {
while(true) { while(true) {
print(p!!) print(p!!)
// STATEMENT DELETED: if (x()) break /* STATEMENT DELETED: if (x()) break */
} }
<caret>p.hashCode() <caret>p.hashCode()
@@ -5,7 +5,7 @@ Resolve target: value-parameter val p: kotlin.Any?
fun x(): Boolean{} fun x(): Boolean{}
fun foo(p: Any?) { 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() <caret>p.hashCode()
} }
@@ -77,7 +77,7 @@ public abstract class AbstractPartialBodyResolveTest : JetLightCodeInsightFixtur
{ {
ApplicationManager.getApplication().runWriteAction { ApplicationManager.getApplication().runWriteAction {
for (statement in skippedStatements) { for (statement in skippedStatements) {
statement.replace(JetPsiFactory(getProject()).createComment("// STATEMENT DELETED: ${statement.compactPresentation()}")) statement.replace(JetPsiFactory(getProject()).createComment("/* STATEMENT DELETED: ${statement.compactPresentation()} */"))
} }
} }
}, },