KotlinGoToTest: test go to for builtIn classes and functions
This commit is contained in:
@@ -0,0 +1,4 @@
|
|||||||
|
// RUNTIME_WITH_SOURCES
|
||||||
|
// CHECK_BOX
|
||||||
|
// SEARCH_TEXT: Any
|
||||||
|
// REF: (kotlin).Any
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
// RUNTIME_WITH_SOURCES
|
||||||
|
// CHECK_BOX
|
||||||
|
// SEARCH_TEXT: Int
|
||||||
|
// ALLOW_MORE_RESULTS
|
||||||
|
// REF: (kotlin).Int
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
// RUNTIME_WITH_SOURCES
|
||||||
|
// CHECK_BOX
|
||||||
|
// SEARCH_TEXT: arrayOfNulls
|
||||||
|
// ALLOW_MORE_RESULTS
|
||||||
|
// REF: (kotlin).arrayOfNulls(kotlin.Int)
|
||||||
@@ -115,6 +115,13 @@ public abstract class AbstractKotlinGotoTest extends KotlinLightCodeInsightFixtu
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
UsefulTestCase.assertOrderedEquals(Ordering.natural().sortedCopy(renderedElements), expectedReferences);
|
boolean inexactMatching = InTextDirectivesUtils.isDirectiveDefined(documentText, "// ALLOW_MORE_RESULTS");
|
||||||
|
|
||||||
|
if (inexactMatching) {
|
||||||
|
UsefulTestCase.assertContainsElements(renderedElements, expectedReferences);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
UsefulTestCase.assertOrderedEquals(Ordering.natural().sortedCopy(renderedElements), expectedReferences);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,18 @@ public class KotlinGotoTestGenerated extends AbstractKotlinGotoTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoClass"), Pattern.compile("^(.+)\\.kt$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoClass"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("builtInAny.kt")
|
||||||
|
public void testBuiltInAny() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/builtInAny.kt");
|
||||||
|
doClassTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("builtInInt.kt")
|
||||||
|
public void testBuiltInInt() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/builtInInt.kt");
|
||||||
|
doClassTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("enumEntries.kt")
|
@TestMetadata("enumEntries.kt")
|
||||||
public void testEnumEntries() throws Exception {
|
public void testEnumEntries() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/enumEntries.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoClass/enumEntries.kt");
|
||||||
@@ -94,6 +106,12 @@ public class KotlinGotoTestGenerated extends AbstractKotlinGotoTest {
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoSymbol"), Pattern.compile("^(.+)\\.kt$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/navigation/gotoSymbol"), Pattern.compile("^(.+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("builtInArrayOfNulls.kt")
|
||||||
|
public void testBuiltInArrayOfNulls() throws Exception {
|
||||||
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/builtInArrayOfNulls.kt");
|
||||||
|
doSymbolTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("functions.kt")
|
@TestMetadata("functions.kt")
|
||||||
public void testFunctions() throws Exception {
|
public void testFunctions() throws Exception {
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/functions.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/navigation/gotoSymbol/functions.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user