Added test

This commit is contained in:
Valentin Kipyatkov
2015-04-03 16:43:18 +03:00
parent bcbe10ad2a
commit bf0798ca86
5 changed files with 18 additions and 0 deletions
@@ -0,0 +1,3 @@
class Dependency {
fun getInt(): Int = 1
}
@@ -0,0 +1,3 @@
fun foo(p: Dependency): Double {
return p.getInt().toDouble() // explicit conversion to Double must be added on conversion (if type Dependency) is correctly resolved
}
@@ -0,0 +1,5 @@
class C {
<selection> double foo(Dependency p) {
return p.getInt(); // explicit conversion to Double must be added on conversion (if type Dependency) is correctly resolved
}
</selection>}
@@ -0,0 +1 @@
<caret>
@@ -78,6 +78,12 @@ public class JavaToKotlinCopyPasteConversionTestGenerated extends AbstractJavaTo
doTest(fileName);
}
@TestMetadata("ConversionInCorrectContext.java")
public void testConversionInCorrectContext() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/ConversionInCorrectContext.java");
doTest(fileName);
}
@TestMetadata("HalfTheWhiteSpace.java")
public void testHalfTheWhiteSpace() throws Exception {
String fileName = JetTestUtils.navigationMetadata("idea/testData/copyPaste/conversion/HalfTheWhiteSpace.java");