Added 2 failing tests for bugs in resolve

This commit is contained in:
Valentin Kipyatkov
2014-11-24 20:09:17 +03:00
committed by Svetlana Isakova
parent 0f370a7cf6
commit 0cffdeb973
5 changed files with 52 additions and 0 deletions
@@ -0,0 +1,11 @@
Expression type:kotlin.String
----------------------------------------------
fun foo(x: Any) {
if (x is String) {
print(<selection>System.getProperty("abc")!!<selection>)
/* STATEMENT DELETED: println() */
}
else {
/* STATEMENT DELETED: println() */
}
}
@@ -0,0 +1,9 @@
fun foo(x: Any) {
if (x is String) {
print(<selection>System.getProperty("abc")!!</selection>)
println()
}
else {
println()
}
}
@@ -0,0 +1,11 @@
Expression type:kotlin.Int
----------------------------------------------
fun foo(x: Any) {
if (x is String) {
System.getProperty("abc".substring(<selection>1<selection>))
/* STATEMENT DELETED: println() */
}
else {
/* STATEMENT DELETED: println() */
}
}
@@ -0,0 +1,9 @@
fun foo(x: Any) {
if (x is String) {
System.getProperty("abc".substring(<selection>1</selection>))
println()
}
else {
println()
}
}
@@ -54,6 +54,12 @@ public class PartialBodyResolveTestGenerated extends AbstractPartialBodyResolveT
doTest(fileName);
}
@TestMetadata("BangBangHasPlatformTypeBug.kt")
public void testBangBangHasPlatformTypeBug() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/BangBangHasPlatformTypeBug.kt");
doTest(fileName);
}
@TestMetadata("BangBangInIfCondition.kt")
public void testBangBangInIfCondition() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/BangBangInIfCondition.kt");
@@ -252,6 +258,12 @@ public class PartialBodyResolveTestGenerated extends AbstractPartialBodyResolveT
doTest(fileName);
}
@TestMetadata("IntConstantTypeBug.kt")
public void testIntConstantTypeBug() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/IntConstantTypeBug.kt");
doTest(fileName);
}
@TestMetadata("LabeledBreak.kt")
public void testLabeledBreak() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/LabeledBreak.kt");