Library paths updated after migration to new stdlib generators
This commit is contained in:
committed by
Andrey Breslav
parent
e37d8174c3
commit
06873e9d09
+7
-3
@@ -44,15 +44,15 @@ public class NavigateToStdlibSourceRegressionTest extends NavigateToLibraryRegre
|
||||
}
|
||||
|
||||
public void testJavaClass() throws IOException {
|
||||
doNavigationInSourcesTest("libraries/stdlib/src/kotlin/Iterators.kt", "Collections", "java.util.Collections");
|
||||
doNavigationInSourcesTest("libraries/stdlib/src/kotlin/collections/Maps.kt", "Collections", "java.util.Collections");
|
||||
}
|
||||
|
||||
public void testKotlinClass() throws IOException {
|
||||
doNavigationInSourcesTest("libraries/stdlib/src/kotlin/Iterators.kt", "FunctionIterator", "kotlin.FunctionIterator");
|
||||
doNavigationInSourcesTest("libraries/stdlib/src/kotlin/collections/Stream.kt", "AbstractIterator", "kotlin.support.AbstractIterator");
|
||||
}
|
||||
|
||||
public void testClassWithJavaAnalog() throws IOException {
|
||||
doNavigationInSourcesTest("libraries/stdlib/src/kotlin/Iterators.kt", "Iterator", "kotlin.Iterator");
|
||||
doNavigationInSourcesTest("libraries/stdlib/src/kotlin/collections/AbstractIterator.kt", "Iterator", "kotlin.Iterator");
|
||||
}
|
||||
|
||||
public void testNavigationInKotlinBuiltIns() throws IOException {
|
||||
@@ -69,6 +69,10 @@ public class NavigateToStdlibSourceRegressionTest extends NavigateToLibraryRegre
|
||||
PsiFile psiFile = getPsiFileForFileFromSources(file);
|
||||
String text = psiFile.getText();
|
||||
int index = text.indexOf(element);
|
||||
assertNotSame(-1, "Cannot find text '" + element + "' in file " + path);
|
||||
while (Character.isLetter(text.charAt(index - 1))) {
|
||||
index = text.indexOf(element, index + 1);
|
||||
}
|
||||
PsiReference ref = psiFile.findReferenceAt(index);
|
||||
assertNotNull("Cannot find reference at " + index + ", " +
|
||||
text.substring(index - 20, index) + "<caret>" + text.substring(index, index + 20), ref);
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@ import org.jetbrains.jet.plugin.libraries.NavigateToStdlibSourceRegressionTest;
|
||||
public class LightClassForLibrarySourceFileTest extends NavigateToStdlibSourceRegressionTest {
|
||||
|
||||
public void testLightClassForFileFromLibrarySource() throws Exception {
|
||||
PsiElement navigationElement = getNavigationElement("libraries/stdlib/src/kotlin/Iterators.kt", "FunctionIterator");
|
||||
assertTrue("FunctionIterator should navigate to JetClassOrObject", navigationElement instanceof JetClassOrObject);
|
||||
PsiElement navigationElement = getNavigationElement("libraries/stdlib/src/kotlin/collections/Stream.kt", "AbstractIterator");
|
||||
assertTrue("AbstractIterator should navigate to JetClassOrObject", navigationElement instanceof JetClassOrObject);
|
||||
PsiClass lightClass = LightClassUtil.getPsiClass((JetClassOrObject) navigationElement);
|
||||
assertTrue("Do not create Kotlin Light Class for file from library sources", !(lightClass instanceof KotlinLightClass));
|
||||
}
|
||||
|
||||
@@ -21,6 +21,6 @@ import junit.framework.Test;
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class ArraysTest extends JsUnitTestBase {
|
||||
public static Test suite() throws Exception {
|
||||
return createTestSuiteForFile("libraries/stdlib/test/ArraysTest.kt");
|
||||
return createTestSuiteForFile("libraries/stdlib/test/collections/ArraysTest.kt");
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -56,16 +56,16 @@ public class CompileMavenGeneratedJSLibrary extends SingleFileTranslationTest {
|
||||
if (generatedJsLibraryDir.exists() && generatedJsLibraryDir.isDirectory()) {
|
||||
generateJavaScriptFiles(DEFAULT_ECMA_VERSIONS,
|
||||
"libraries/stdlib/test",
|
||||
"ArraysTest.kt",
|
||||
"collections/ArraysTest.kt",
|
||||
"dom/DomTest.kt",
|
||||
"js/MapTest.kt",
|
||||
"js/JsDomTest.kt",
|
||||
"iterators/FunctionIteratorTest.kt",
|
||||
"iterators/IteratorsTest.kt",
|
||||
"collections/FunctionIteratorTest.kt",
|
||||
"collections/IteratorsTest.kt",
|
||||
"GetOrElseTest.kt",
|
||||
"ListTest.kt",
|
||||
"SetTest.kt",
|
||||
"StringTest.kt");
|
||||
"collections/ListTest.kt",
|
||||
"collections/SetTest.kt",
|
||||
"text/StringTest.kt");
|
||||
|
||||
} else {
|
||||
System.out.println("Warning " + generatedJsLibraryDir + " does not exist - I guess you've not run the maven build in library/ yet?");
|
||||
|
||||
+2
-4
@@ -19,11 +19,9 @@ package org.jetbrains.k2js.test.semantics;
|
||||
import junit.framework.Test;
|
||||
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibSetTest extends JsUnitTestBase {
|
||||
public final class StdLibIterableTest extends JsUnitTestBase {
|
||||
public static Test suite() throws Exception {
|
||||
return createTestSuiteForFile("libraries/stdlib/test/SetTest.kt",
|
||||
"SetTest.filter",
|
||||
"SetTest.find");
|
||||
return createTestSuiteForFile("libraries/stdlib/test/collections/IterableTests.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import junit.framework.Test;
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibIteratorsTest extends JsUnitTestBase {
|
||||
public static Test suite() throws Exception {
|
||||
return createTestSuiteForFile("libraries/stdlib/test/iterators/IteratorsTest.kt",
|
||||
"IteratorsTest.requireNoNulls");
|
||||
return createTestSuiteForFile("libraries/stdlib/test/collections/IteratorsTest.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@ import junit.framework.Test;
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibListTest extends JsUnitTestBase {
|
||||
public static Test suite() throws Exception {
|
||||
return createTestSuiteForFile("libraries/stdlib/test/ListTest.kt");
|
||||
return createTestSuiteForFile("libraries/stdlib/test/collections/ListSpecificTest.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@ public class StdLibTestToJSTest extends StdLibTestBase {
|
||||
"dom/DomTest.kt",
|
||||
"js/MapJsTest.kt",
|
||||
"js/JsDomTest.kt",
|
||||
"iterators/FunctionIteratorTest.kt",
|
||||
"iterators/IteratorsTest.kt",
|
||||
"collections/StreamTest.kt",
|
||||
"collections/IteratorsTest.kt",
|
||||
"GetOrElseTest.kt",
|
||||
"ListTest.kt",
|
||||
"SetTest.kt",
|
||||
"StringTest.kt");
|
||||
"collections/ListSpecificTest.kt",
|
||||
"collections/IterableTests.kt",
|
||||
"text/StringTest.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,6 @@ public abstract class Config {
|
||||
"/core/stringsCode.kt",
|
||||
"/stdlib/domCode.kt",
|
||||
"/stdlib/jutilCode.kt",
|
||||
"/stdlib/JUMapsCode.kt",
|
||||
"/stdlib/testCode.kt"
|
||||
);
|
||||
|
||||
@@ -114,20 +113,30 @@ public abstract class Config {
|
||||
@NotNull
|
||||
public static final List<String> STDLIB_FILE_NAMES = Arrays.asList(
|
||||
"/kotlin/Preconditions.kt",
|
||||
"/kotlin/Iterators.kt",
|
||||
"/kotlin/JUtil.kt",
|
||||
"/kotlin/Arrays.kt",
|
||||
"/kotlin/Lists.kt",
|
||||
"/kotlin/Maps.kt",
|
||||
"/kotlin/Exceptions.kt",
|
||||
"/kotlin/IterablesSpecial.kt",
|
||||
"/kotlin/Functions.kt",
|
||||
"/kotlin/collections/JUtil.kt",
|
||||
"/kotlin/collections/Iterators.kt",
|
||||
"/kotlin/collections/Arrays.kt",
|
||||
"/kotlin/collections/Maps.kt",
|
||||
"/kotlin/collections/Exceptions.kt",
|
||||
"/kotlin/collections/MutableCollections.kt",
|
||||
"/kotlin/collections/Stream.kt",
|
||||
"/kotlin/collections/AbstractIterator.kt",
|
||||
"/generated/_Aggregates.kt",
|
||||
"/generated/_Arrays.kt",
|
||||
"/generated/_Collections.kt",
|
||||
"/generated/_Iterables.kt",
|
||||
"/generated/_Iterators.kt",
|
||||
"/kotlin/support/AbstractIterator.kt",
|
||||
"/generated/_DownTo.kt",
|
||||
"/generated/_Elements.kt",
|
||||
"/generated/_Filtering.kt",
|
||||
"/generated/_Generators.kt",
|
||||
"/generated/_Guards.kt",
|
||||
"/generated/_Mapping.kt",
|
||||
"/generated/_Numeric.kt",
|
||||
"/generated/_Ordering.kt",
|
||||
"/generated/_Snapshots.kt",
|
||||
"/generated/_Strings.kt",
|
||||
"/generated/_Streams.kt",
|
||||
"/kotlin/Standard.kt",
|
||||
"/kotlin/Strings.kt",
|
||||
"/kotlin/text/Strings.kt",
|
||||
"/kotlin/dom/Dom.kt",
|
||||
"/kotlin/test/Test.kt"
|
||||
);
|
||||
|
||||
@@ -49,33 +49,31 @@
|
||||
<include name="**/*.kt"/>
|
||||
<exclude name="**/*JVM.kt"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/../../stdlib/src/kotlin/support">
|
||||
<include name="**/*.kt"/>
|
||||
<exclude name="**/*JVM.kt"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/../../stdlib/src/kotlin/test">
|
||||
<include name="**/*.kt"/>
|
||||
<exclude name="**/*JVM.kt"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/../../stdlib/src/kotlin">
|
||||
<include name="Arrays.kt"/>
|
||||
<include name="Preconditions.kt"/>
|
||||
<include name="Iterators.kt"/>
|
||||
<include name="JUtil.kt"/>
|
||||
<include name="Collections.kt"/>
|
||||
<include name="Maps.kt"/>
|
||||
<include name="Iterables.kt"/>
|
||||
<include name="IterablesLazy.kt"/>
|
||||
<include name="IterablesSpecial.kt"/>
|
||||
<include name="Functions.kt"/>
|
||||
<include name="Integers.kt"/>
|
||||
<include name="collections/AbstractIterator.kt"/>
|
||||
<include name="collections/Iterators.kt"/>
|
||||
<include name="collections/Arrays.kt"/>
|
||||
<include name="collections/JUtil.kt"/>
|
||||
<include name="collections/Maps.kt"/>
|
||||
<include name="collections/Stream.kt"/>
|
||||
<include name="collections/MutableCollections.kt"/>
|
||||
<include name="Functions.kt"/>
|
||||
<!--
|
||||
<include name="Ordering.kt"/>
|
||||
-->
|
||||
<include name="Standard.kt"/>
|
||||
<include name="Strings.kt"/>
|
||||
<include name="text/Strings.kt"/>
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/../../stdlib/src/generated">
|
||||
<include name="*.kt"/>
|
||||
<exclude name="**/*JVM.kt"/>
|
||||
<exclude name="*JVM.kt"/>
|
||||
<exclude name="DownTo.kt"/>
|
||||
<!--
|
||||
<include name="IteratorsFromJLangIterables.kt"/>
|
||||
|
||||
Reference in New Issue
Block a user