JS: remove -XtypedArraysEnabled flag (always true now)
This commit is contained in:
committed by
Anton Bannykh
parent
60aae55233
commit
4a5e9bbc7f
-4
@@ -99,10 +99,6 @@ class K2JSCompilerArguments : CommonCompilerArguments() {
|
|||||||
|
|
||||||
// Advanced options
|
// Advanced options
|
||||||
|
|
||||||
@GradleOption(DefaultValues.BooleanTrueDefault::class)
|
|
||||||
@Argument(value = "-Xtyped-arrays", description = "Translate primitive arrays to JS typed arrays")
|
|
||||||
var typedArrays: Boolean by FreezableVar(true)
|
|
||||||
|
|
||||||
@GradleOption(DefaultValues.BooleanFalseDefault::class)
|
@GradleOption(DefaultValues.BooleanFalseDefault::class)
|
||||||
@Argument(value = "-Xfriend-modules-disabled", description = "Disable internal declaration export")
|
@Argument(value = "-Xfriend-modules-disabled", description = "Disable internal declaration export")
|
||||||
var friendModulesDisabled: Boolean by FreezableVar(false)
|
var friendModulesDisabled: Boolean by FreezableVar(false)
|
||||||
|
|||||||
@@ -388,8 +388,6 @@ public class K2JSCompiler extends CLICompiler<K2JSCompilerArguments> {
|
|||||||
configuration.put(JSConfigurationKeys.META_INFO, true);
|
configuration.put(JSConfigurationKeys.META_INFO, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
configuration.put(JSConfigurationKeys.TYPED_ARRAYS_ENABLED, arguments.getTypedArrays());
|
|
||||||
|
|
||||||
configuration.put(JSConfigurationKeys.FRIEND_PATHS_DISABLED, arguments.getFriendModulesDisabled());
|
configuration.put(JSConfigurationKeys.FRIEND_PATHS_DISABLED, arguments.getFriendModulesDisabled());
|
||||||
|
|
||||||
if (!arguments.getFriendModulesDisabled() && arguments.getFriendModules() != null) {
|
if (!arguments.getFriendModulesDisabled() && arguments.getFriendModules() != null) {
|
||||||
|
|||||||
-1
@@ -2,7 +2,6 @@ Usage: kotlinc-js <options> <source files>
|
|||||||
where advanced options include:
|
where advanced options include:
|
||||||
-Xfriend-modules=<path> Paths to friend modules
|
-Xfriend-modules=<path> Paths to friend modules
|
||||||
-Xfriend-modules-disabled Disable internal declaration export
|
-Xfriend-modules-disabled Disable internal declaration export
|
||||||
-Xtyped-arrays Translate primitive arrays to JS typed arrays
|
|
||||||
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
|
-Xallow-kotlin-package Allow compiling code in package 'kotlin' and allow not requiring kotlin.stdlib in module-info
|
||||||
-Xcoroutines={enable|warn|error}
|
-Xcoroutines={enable|warn|error}
|
||||||
Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
Enable coroutines or report warnings or errors on declarations and use sites of 'suspend' modifier
|
||||||
|
|||||||
@@ -78,9 +78,5 @@ fun main(args: Array<String>) {
|
|||||||
testClass<AbstractInlineDefaultValuesTests> {
|
testClass<AbstractInlineDefaultValuesTests> {
|
||||||
model("codegen/boxInline/defaultValues/", targetBackend = TargetBackend.JS)
|
model("codegen/boxInline/defaultValues/", targetBackend = TargetBackend.JS)
|
||||||
}
|
}
|
||||||
|
|
||||||
testClass<AbstractJsLegacyPrimitiveArraysBoxTest> {
|
|
||||||
model("codegen/box/arrays", targetBackend = TargetBackend.JS)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -81,7 +81,6 @@ abstract class BasicBoxTest(
|
|||||||
protected val pathToTestDir: String,
|
protected val pathToTestDir: String,
|
||||||
testGroupOutputDirPrefix: String,
|
testGroupOutputDirPrefix: String,
|
||||||
pathToRootOutputDir: String = BasicBoxTest.TEST_DATA_DIR_PATH,
|
pathToRootOutputDir: String = BasicBoxTest.TEST_DATA_DIR_PATH,
|
||||||
private val typedArraysEnabled: Boolean = true,
|
|
||||||
private val generateSourceMap: Boolean = false,
|
private val generateSourceMap: Boolean = false,
|
||||||
private val generateNodeJsRunner: Boolean = true
|
private val generateNodeJsRunner: Boolean = true
|
||||||
) : KotlinTestWithEnvironment() {
|
) : KotlinTestWithEnvironment() {
|
||||||
@@ -560,8 +559,6 @@ abstract class BasicBoxTest(
|
|||||||
configuration.put(JSConfigurationKeys.SOURCE_MAP_SOURCE_ROOTS, sourceDirs)
|
configuration.put(JSConfigurationKeys.SOURCE_MAP_SOURCE_ROOTS, sourceDirs)
|
||||||
configuration.put(JSConfigurationKeys.SOURCE_MAP_EMBED_SOURCES, module.sourceMapSourceEmbedding)
|
configuration.put(JSConfigurationKeys.SOURCE_MAP_EMBED_SOURCES, module.sourceMapSourceEmbedding)
|
||||||
|
|
||||||
configuration.put(JSConfigurationKeys.TYPED_ARRAYS_ENABLED, typedArraysEnabled)
|
|
||||||
|
|
||||||
return JsConfig(project, configuration, METADATA_CACHE, (JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST).toSet())
|
return JsConfig(project, configuration, METADATA_CACHE, (JsConfig.JS_STDLIB + JsConfig.JS_KOTLIN_TEST).toSet())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsLegacyPrimitiveArraysBoxTestGenerated.java
Generated
-552
@@ -1,552 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
|
||||||
* that can be found in the license/LICENSE.txt file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.js.test.semantics;
|
|
||||||
|
|
||||||
import com.intellij.testFramework.TestDataPath;
|
|
||||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
|
||||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
|
||||||
import org.jetbrains.kotlin.test.TargetBackend;
|
|
||||||
import org.jetbrains.kotlin.test.TestMetadata;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
|
||||||
@SuppressWarnings("all")
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public class JsLegacyPrimitiveArraysBoxTestGenerated extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInArrays() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayConstructorsSimple.kt")
|
|
||||||
public void testArrayConstructorsSimple() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayGetAssignMultiIndex.kt")
|
|
||||||
public void testArrayGetAssignMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayGetMultiIndex.kt")
|
|
||||||
public void testArrayGetMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayInstanceOf.kt")
|
|
||||||
public void testArrayInstanceOf() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayPlusAssign.kt")
|
|
||||||
public void testArrayPlusAssign() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arraysAreCloneable.kt")
|
|
||||||
public void testArraysAreCloneable() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("cloneArray.kt")
|
|
||||||
public void testCloneArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("clonePrimitiveArrays.kt")
|
|
||||||
public void testClonePrimitiveArrays() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("collectionAssignGetMultiIndex.kt")
|
|
||||||
public void testCollectionAssignGetMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("collectionGetMultiIndex.kt")
|
|
||||||
public void testCollectionGetMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachBooleanArray.kt")
|
|
||||||
public void testForEachBooleanArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachByteArray.kt")
|
|
||||||
public void testForEachByteArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachByteArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachCharArray.kt")
|
|
||||||
public void testForEachCharArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachCharArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachDoubleArray.kt")
|
|
||||||
public void testForEachDoubleArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachFloatArray.kt")
|
|
||||||
public void testForEachFloatArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachFloatArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachIntArray.kt")
|
|
||||||
public void testForEachIntArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachIntArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachLongArray.kt")
|
|
||||||
public void testForEachLongArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachLongArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachShortArray.kt")
|
|
||||||
public void testForEachShortArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachShortArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericArrayInObjectLiteralConstructor.kt")
|
|
||||||
public void testGenericArrayInObjectLiteralConstructor() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("hashMap.kt")
|
|
||||||
public void testHashMap() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/hashMap.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inProjectionAsParameter.kt")
|
|
||||||
public void testInProjectionAsParameter() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inProjectionOfArray.kt")
|
|
||||||
public void testInProjectionOfArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inProjectionOfList.kt")
|
|
||||||
public void testInProjectionOfList() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfList.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("indices.kt")
|
|
||||||
public void testIndices() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indices.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("indicesChar.kt")
|
|
||||||
public void testIndicesChar() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indicesChar.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iterator.kt")
|
|
||||||
public void testIterator() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorBooleanArray.kt")
|
|
||||||
public void testIteratorBooleanArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorByteArray.kt")
|
|
||||||
public void testIteratorByteArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorByteArrayNextByte.kt")
|
|
||||||
public void testIteratorByteArrayNextByte() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorCharArray.kt")
|
|
||||||
public void testIteratorCharArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorCharArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorDoubleArray.kt")
|
|
||||||
public void testIteratorDoubleArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorFloatArray.kt")
|
|
||||||
public void testIteratorFloatArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorIntArray.kt")
|
|
||||||
public void testIteratorIntArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorIntArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorLongArray.kt")
|
|
||||||
public void testIteratorLongArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorLongArrayNextLong.kt")
|
|
||||||
public void testIteratorLongArrayNextLong() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorShortArray.kt")
|
|
||||||
public void testIteratorShortArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorShortArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt1291.kt")
|
|
||||||
public void testKt1291() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt1291.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt17134.kt")
|
|
||||||
public void testKt17134() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt238.kt")
|
|
||||||
public void testKt238() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt238.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt2997.kt")
|
|
||||||
public void testKt2997() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt2997.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt33.kt")
|
|
||||||
public void testKt33() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt33.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt3771.kt")
|
|
||||||
public void testKt3771() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt3771.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt4118.kt")
|
|
||||||
public void testKt4118() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4118.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt4348.kt")
|
|
||||||
public void testKt4348() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4348.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt4357.kt")
|
|
||||||
public void testKt4357() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4357.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt503.kt")
|
|
||||||
public void testKt503() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt594.kt")
|
|
||||||
public void testKt594() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt594.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt602.kt")
|
|
||||||
public void testKt602() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt7009.kt")
|
|
||||||
public void testKt7009() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7009.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt7288.kt")
|
|
||||||
public void testKt7288() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7288.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt7338.kt")
|
|
||||||
public void testKt7338() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt779.kt")
|
|
||||||
public void testKt779() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt779.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt945.kt")
|
|
||||||
public void testKt945() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt945.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt950.kt")
|
|
||||||
public void testKt950() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt950.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("longAsIndex.kt")
|
|
||||||
public void testLongAsIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("multiArrayConstructors.kt")
|
|
||||||
public void testMultiArrayConstructors() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nonLocalReturnArrayConstructor.kt")
|
|
||||||
public void testNonLocalReturnArrayConstructor() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nonNullArray.kt")
|
|
||||||
public void testNonNullArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("primitiveArrays.kt")
|
|
||||||
public void testPrimitiveArrays() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/primitiveArrays.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("stdlib.kt")
|
|
||||||
public void testStdlib() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/stdlib.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays/multiDecl")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class MultiDecl extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInMultiDecl() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt15560.kt")
|
|
||||||
public void testKt15560() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt15568.kt")
|
|
||||||
public void testKt15568() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt15575.kt")
|
|
||||||
public void testKt15575() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclFor.kt")
|
|
||||||
public void testMultiDeclFor() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForValCaptured.kt")
|
|
||||||
public void testMultiDeclForValCaptured() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Int extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInInt() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
|
||||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/long")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Long extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInLong() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
|
||||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Generated
-563
@@ -1,563 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright 2010-2017 JetBrains s.r.o.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package org.jetbrains.kotlin.js.test.semantics;
|
|
||||||
|
|
||||||
import com.intellij.testFramework.TestDataPath;
|
|
||||||
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
|
|
||||||
import org.jetbrains.kotlin.test.KotlinTestUtils;
|
|
||||||
import org.jetbrains.kotlin.test.TargetBackend;
|
|
||||||
import org.jetbrains.kotlin.test.TestMetadata;
|
|
||||||
import org.junit.runner.RunWith;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.regex.Pattern;
|
|
||||||
|
|
||||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
|
||||||
@SuppressWarnings("all")
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public class JsTypedArraysBoxTestGenerated extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInArrays() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayConstructorsSimple.kt")
|
|
||||||
public void testArrayConstructorsSimple() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayConstructorsSimple.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayGetAssignMultiIndex.kt")
|
|
||||||
public void testArrayGetAssignMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetAssignMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayGetMultiIndex.kt")
|
|
||||||
public void testArrayGetMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayGetMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayInstanceOf.kt")
|
|
||||||
public void testArrayInstanceOf() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayInstanceOf.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arrayPlusAssign.kt")
|
|
||||||
public void testArrayPlusAssign() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arrayPlusAssign.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("arraysAreCloneable.kt")
|
|
||||||
public void testArraysAreCloneable() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/arraysAreCloneable.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("cloneArray.kt")
|
|
||||||
public void testCloneArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/cloneArray.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("clonePrimitiveArrays.kt")
|
|
||||||
public void testClonePrimitiveArrays() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/clonePrimitiveArrays.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("collectionAssignGetMultiIndex.kt")
|
|
||||||
public void testCollectionAssignGetMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionAssignGetMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("collectionGetMultiIndex.kt")
|
|
||||||
public void testCollectionGetMultiIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/collectionGetMultiIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachBooleanArray.kt")
|
|
||||||
public void testForEachBooleanArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachBooleanArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachByteArray.kt")
|
|
||||||
public void testForEachByteArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachByteArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachCharArray.kt")
|
|
||||||
public void testForEachCharArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachCharArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachDoubleArray.kt")
|
|
||||||
public void testForEachDoubleArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachDoubleArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachFloatArray.kt")
|
|
||||||
public void testForEachFloatArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachFloatArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachIntArray.kt")
|
|
||||||
public void testForEachIntArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachIntArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachLongArray.kt")
|
|
||||||
public void testForEachLongArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachLongArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("forEachShortArray.kt")
|
|
||||||
public void testForEachShortArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/forEachShortArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("genericArrayInObjectLiteralConstructor.kt")
|
|
||||||
public void testGenericArrayInObjectLiteralConstructor() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/genericArrayInObjectLiteralConstructor.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("hashMap.kt")
|
|
||||||
public void testHashMap() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/hashMap.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inProjectionAsParameter.kt")
|
|
||||||
public void testInProjectionAsParameter() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionAsParameter.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inProjectionOfArray.kt")
|
|
||||||
public void testInProjectionOfArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("inProjectionOfList.kt")
|
|
||||||
public void testInProjectionOfList() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/inProjectionOfList.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("indices.kt")
|
|
||||||
public void testIndices() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indices.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("indicesChar.kt")
|
|
||||||
public void testIndicesChar() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/indicesChar.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iterator.kt")
|
|
||||||
public void testIterator() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iterator.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorBooleanArray.kt")
|
|
||||||
public void testIteratorBooleanArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorBooleanArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorByteArray.kt")
|
|
||||||
public void testIteratorByteArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorByteArrayNextByte.kt")
|
|
||||||
public void testIteratorByteArrayNextByte() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorByteArrayNextByte.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorCharArray.kt")
|
|
||||||
public void testIteratorCharArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorCharArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorDoubleArray.kt")
|
|
||||||
public void testIteratorDoubleArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorDoubleArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorFloatArray.kt")
|
|
||||||
public void testIteratorFloatArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorFloatArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorIntArray.kt")
|
|
||||||
public void testIteratorIntArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorIntArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorLongArray.kt")
|
|
||||||
public void testIteratorLongArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorLongArrayNextLong.kt")
|
|
||||||
public void testIteratorLongArrayNextLong() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorLongArrayNextLong.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("iteratorShortArray.kt")
|
|
||||||
public void testIteratorShortArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/iteratorShortArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt1291.kt")
|
|
||||||
public void testKt1291() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt1291.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt17134.kt")
|
|
||||||
public void testKt17134() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt17134.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt238.kt")
|
|
||||||
public void testKt238() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt238.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt2997.kt")
|
|
||||||
public void testKt2997() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt2997.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt33.kt")
|
|
||||||
public void testKt33() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt33.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt3771.kt")
|
|
||||||
public void testKt3771() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt3771.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt4118.kt")
|
|
||||||
public void testKt4118() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4118.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt4348.kt")
|
|
||||||
public void testKt4348() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4348.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt4357.kt")
|
|
||||||
public void testKt4357() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt4357.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt503.kt")
|
|
||||||
public void testKt503() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt503.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt594.kt")
|
|
||||||
public void testKt594() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt594.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt602.kt")
|
|
||||||
public void testKt602() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt602.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt7009.kt")
|
|
||||||
public void testKt7009() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7009.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt7288.kt")
|
|
||||||
public void testKt7288() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7288.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt7338.kt")
|
|
||||||
public void testKt7338() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt7338.kt");
|
|
||||||
try {
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
catch (Throwable ignore) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
throw new AssertionError("Looks like this test can be unmuted. Remove IGNORE_BACKEND directive for that.");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt779.kt")
|
|
||||||
public void testKt779() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt779.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt945.kt")
|
|
||||||
public void testKt945() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt945.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt950.kt")
|
|
||||||
public void testKt950() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/kt950.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("longAsIndex.kt")
|
|
||||||
public void testLongAsIndex() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/longAsIndex.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("multiArrayConstructors.kt")
|
|
||||||
public void testMultiArrayConstructors() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiArrayConstructors.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nonLocalReturnArrayConstructor.kt")
|
|
||||||
public void testNonLocalReturnArrayConstructor() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonLocalReturnArrayConstructor.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("nonNullArray.kt")
|
|
||||||
public void testNonNullArray() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/nonNullArray.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("primitiveArrays.kt")
|
|
||||||
public void testPrimitiveArrays() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/primitiveArrays.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("stdlib.kt")
|
|
||||||
public void testStdlib() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/stdlib.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays/multiDecl")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class MultiDecl extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInMultiDecl() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt15560.kt")
|
|
||||||
public void testKt15560() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15560.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt15568.kt")
|
|
||||||
public void testKt15568() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15568.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("kt15575.kt")
|
|
||||||
public void testKt15575() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/kt15575.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclFor.kt")
|
|
||||||
public void testMultiDeclFor() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclFor.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForValCaptured.kt")
|
|
||||||
public void testMultiDeclForValCaptured() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/MultiDeclForValCaptured.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/int")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Int extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInInt() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/int"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
|
||||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentExtensionsValCaptured.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/int/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/arrays/multiDecl/long")
|
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
|
||||||
public static class Long extends AbstractJsLegacyPrimitiveArraysBoxTest {
|
|
||||||
public void testAllFilesPresentInLong() throws Exception {
|
|
||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/arrays/multiDecl/long"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentExtensionsValCaptured.kt")
|
|
||||||
public void testMultiDeclForComponentExtensionsValCaptured() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentExtensionsValCaptured.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensions.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensions() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensions.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("MultiDeclForComponentMemberExtensionsInExtensionFunction.kt")
|
|
||||||
public void testMultiDeclForComponentMemberExtensionsInExtensionFunction() throws Exception {
|
|
||||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/arrays/multiDecl/long/MultiDeclForComponentMemberExtensionsInExtensionFunction.kt");
|
|
||||||
doTest(fileName);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
-6
@@ -51,12 +51,6 @@ abstract class AbstractJsCodegenBoxTest : BasicBoxTest(
|
|||||||
"codegen/box/"
|
"codegen/box/"
|
||||||
)
|
)
|
||||||
|
|
||||||
abstract class AbstractJsLegacyPrimitiveArraysBoxTest : BasicBoxTest(
|
|
||||||
"compiler/testData/codegen/box/arrays/",
|
|
||||||
"codegen/box/arrays-legacy-primitivearrays/",
|
|
||||||
typedArraysEnabled = false
|
|
||||||
)
|
|
||||||
|
|
||||||
abstract class AbstractSourceMapGenerationSmokeTest : BasicBoxTest(
|
abstract class AbstractSourceMapGenerationSmokeTest : BasicBoxTest(
|
||||||
BasicBoxTest.TEST_DATA_DIR_PATH + "sourcemap/",
|
BasicBoxTest.TEST_DATA_DIR_PATH + "sourcemap/",
|
||||||
"sourcemap/",
|
"sourcemap/",
|
||||||
|
|||||||
+5
-13
@@ -200,13 +200,7 @@ public final class PatternTranslator extends AbstractTranslator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isArray(type)) {
|
if (isArray(type)) {
|
||||||
if (ArrayFIF.typedArraysEnabled(context().getConfig())) {
|
return namer().isArray();
|
||||||
return namer().isArray();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return Namer.IS_ARRAY_FUN_REF;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TypePredicatesKt.getCHAR_SEQUENCE().test(type)) return namer().isCharSequence();
|
if (TypePredicatesKt.getCHAR_SEQUENCE().test(type)) return namer().isCharSequence();
|
||||||
@@ -244,12 +238,10 @@ public final class PatternTranslator extends AbstractTranslator {
|
|||||||
return namer().isTypeOf(new JsStringLiteral("number"));
|
return namer().isTypeOf(new JsStringLiteral("number"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ArrayFIF.typedArraysEnabled(context().getConfig())) {
|
if (KotlinBuiltIns.isPrimitiveArray(type)) {
|
||||||
if (KotlinBuiltIns.isPrimitiveArray(type)) {
|
PrimitiveType arrayType = KotlinBuiltIns.getPrimitiveArrayElementType(type);
|
||||||
PrimitiveType arrayType = KotlinBuiltIns.getPrimitiveArrayElementType(type);
|
assert arrayType != null;
|
||||||
assert arrayType != null;
|
return namer().isPrimitiveArray(arrayType);
|
||||||
return namer().isPrimitiveArray(arrayType);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+20
-58
@@ -61,16 +61,12 @@ object ArrayFIF : CompositeFIF() {
|
|||||||
@JvmField
|
@JvmField
|
||||||
val LENGTH_PROPERTY_INTRINSIC = BuiltInPropertyIntrinsic("length")
|
val LENGTH_PROPERTY_INTRINSIC = BuiltInPropertyIntrinsic("length")
|
||||||
|
|
||||||
@JvmStatic
|
|
||||||
fun typedArraysEnabled(config: JsConfig) = config.configuration.get(JSConfigurationKeys.TYPED_ARRAYS_ENABLED, true)
|
|
||||||
|
|
||||||
fun castOrCreatePrimitiveArray(ctx: TranslationContext, type: PrimitiveType?, arg: JsArrayLiteral): JsExpression {
|
fun castOrCreatePrimitiveArray(ctx: TranslationContext, type: PrimitiveType?, arg: JsArrayLiteral): JsExpression {
|
||||||
if (type == null || !typedArraysEnabled(ctx.config)) return arg
|
if (type == null) return arg
|
||||||
|
|
||||||
return if (type in TYPED_ARRAY_MAP) {
|
return if (type in TYPED_ARRAY_MAP) {
|
||||||
createTypedArray(type, arg)
|
createTypedArray(type, arg)
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
JsAstUtils.invokeKotlinFunction(type.lowerCaseName + "ArrayOf", *arg.expressions.toTypedArray())
|
JsAstUtils.invokeKotlinFunction(type.lowerCaseName + "ArrayOf", *arg.expressions.toTypedArray())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,21 +96,10 @@ object ArrayFIF : CompositeFIF() {
|
|||||||
if (functionParam.type.getValueParameterTypesFromFunctionType().size != 1) return null
|
if (functionParam.type.getValueParameterTypesFromFunctionType().size != 1) return null
|
||||||
|
|
||||||
val primitiveType = KotlinBuiltIns.getPrimitiveArrayElementType(constructedClass.defaultType)
|
val primitiveType = KotlinBuiltIns.getPrimitiveArrayElementType(constructedClass.defaultType)
|
||||||
return if (typedArraysEnabled(config) && primitiveType != null) {
|
return when {
|
||||||
if (primitiveType in TYPED_ARRAY_MAP) {
|
primitiveType in TYPED_ARRAY_MAP -> "kotlin.fillArray"
|
||||||
"kotlin.fillArray"
|
primitiveType != null -> "kotlin.${primitiveType.lowerCaseName}ArrayF"
|
||||||
}
|
else -> "kotlin.newArrayF"
|
||||||
else {
|
|
||||||
"kotlin.${primitiveType.lowerCaseName}ArrayF"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (primitiveType == CHAR) {
|
|
||||||
"kotlin.untypedCharArrayF"
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
"kotlin.newArrayF"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -133,23 +118,11 @@ object ArrayFIF : CompositeFIF() {
|
|||||||
add(pattern(NamePredicate(type.arrayTypeName), "<init>(Int)"), intrinsify { _, arguments, context ->
|
add(pattern(NamePredicate(type.arrayTypeName), "<init>(Int)"), intrinsify { _, arguments, context ->
|
||||||
assert(arguments.size == 1) { "Array <init>(Int) expression must have one argument." }
|
assert(arguments.size == 1) { "Array <init>(Int) expression must have one argument." }
|
||||||
val (size) = arguments
|
val (size) = arguments
|
||||||
|
if (type in TYPED_ARRAY_MAP) {
|
||||||
|
createTypedArray(type, size)
|
||||||
|
} else {
|
||||||
|
JsAstUtils.invokeKotlinFunction("${type.lowerCaseName}Array", size)
|
||||||
|
|
||||||
if (typedArraysEnabled(context.config)) {
|
|
||||||
if (type in TYPED_ARRAY_MAP) {
|
|
||||||
createTypedArray(type, size)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
JsAstUtils.invokeKotlinFunction("${type.lowerCaseName}Array", size)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
val initValue = when (type) {
|
|
||||||
BOOLEAN -> JsBooleanLiteral(false)
|
|
||||||
LONG -> JsNameRef(Namer.LONG_ZERO, Namer.kotlinLong())
|
|
||||||
else -> JsIntLiteral(0)
|
|
||||||
}
|
|
||||||
JsAstUtils.invokeKotlinFunction("newArray", size, initValue)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -157,12 +130,7 @@ object ArrayFIF : CompositeFIF() {
|
|||||||
|
|
||||||
add(pattern(NamePredicate(type.arrayTypeName), "iterator"), intrinsify { callInfo, _, context ->
|
add(pattern(NamePredicate(type.arrayTypeName), "iterator"), intrinsify { callInfo, _, context ->
|
||||||
val receiver = callInfo.dispatchReceiver
|
val receiver = callInfo.dispatchReceiver
|
||||||
if (typedArraysEnabled(context.config)) {
|
JsAstUtils.invokeKotlinFunction("${type.lowerCaseName}ArrayIterator", receiver!!)
|
||||||
JsAstUtils.invokeKotlinFunction("${type.lowerCaseName}ArrayIterator", receiver!!)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
JsAstUtils.invokeKotlinFunction("arrayIterator", receiver!!, JsStringLiteral(type.arrayTypeName.asString()))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -180,16 +148,10 @@ object ArrayFIF : CompositeFIF() {
|
|||||||
return intrinsify { callInfo, arguments, context ->
|
return intrinsify { callInfo, arguments, context ->
|
||||||
assert(arguments.size == 2) { "Array <init>(Int,Function1) expression must have two arguments." }
|
assert(arguments.size == 2) { "Array <init>(Int,Function1) expression must have two arguments." }
|
||||||
val (size, fn) = arguments
|
val (size, fn) = arguments
|
||||||
val invocation = if (typedArraysEnabled(context.config) && type != null) {
|
val invocation = when {
|
||||||
if (type in TYPED_ARRAY_MAP) {
|
type in TYPED_ARRAY_MAP -> JsAstUtils.invokeKotlinFunction("fillArray", createTypedArray(type!!, size), fn)
|
||||||
JsAstUtils.invokeKotlinFunction("fillArray", createTypedArray(type, size), fn)
|
type != null -> JsAstUtils.invokeKotlinFunction("${type.lowerCaseName}ArrayF", size, fn)
|
||||||
}
|
else -> JsAstUtils.invokeKotlinFunction("newArrayF", size, fn)
|
||||||
else {
|
|
||||||
JsAstUtils.invokeKotlinFunction("${type.lowerCaseName}ArrayF", size, fn)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
JsAstUtils.invokeKotlinFunction(if (type == CHAR) "untypedCharArrayF" else "newArrayF", size, fn)
|
|
||||||
}
|
}
|
||||||
invocation.inlineStrategy = InlineStrategy.IN_PLACE
|
invocation.inlineStrategy = InlineStrategy.IN_PLACE
|
||||||
val descriptor = callInfo.resolvedCall.resultingDescriptor.original
|
val descriptor = callInfo.resolvedCall.resultingDescriptor.original
|
||||||
@@ -203,10 +165,10 @@ object ArrayFIF : CompositeFIF() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun intrinsify(f: (callInfo: CallInfo, arguments: List<JsExpression>, context: TranslationContext) -> JsExpression)
|
private fun intrinsify(f: (callInfo: CallInfo, arguments: List<JsExpression>, context: TranslationContext) -> JsExpression) =
|
||||||
= object : FunctionIntrinsic() {
|
object : FunctionIntrinsic() {
|
||||||
override fun apply(callInfo: CallInfo, arguments: List<JsExpression>, context: TranslationContext): JsExpression {
|
override fun apply(callInfo: CallInfo, arguments: List<JsExpression>, context: TranslationContext): JsExpression {
|
||||||
return f(callInfo, arguments, context)
|
return f(callInfo, arguments, context)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
-6
@@ -67,10 +67,4 @@ interface KotlinJsOptions : org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
|||||||
* Default value: "v5"
|
* Default value: "v5"
|
||||||
*/
|
*/
|
||||||
var target: kotlin.String
|
var target: kotlin.String
|
||||||
|
|
||||||
/**
|
|
||||||
* Translate primitive arrays to JS typed arrays
|
|
||||||
* Default value: true
|
|
||||||
*/
|
|
||||||
var typedArrays: kotlin.Boolean
|
|
||||||
}
|
}
|
||||||
|
|||||||
-7
@@ -79,11 +79,6 @@ internal abstract class KotlinJsOptionsBase : org.jetbrains.kotlin.gradle.dsl.Ko
|
|||||||
get() = targetField ?: "v5"
|
get() = targetField ?: "v5"
|
||||||
set(value) { targetField = value }
|
set(value) { targetField = value }
|
||||||
|
|
||||||
private var typedArraysField: kotlin.Boolean? = null
|
|
||||||
override var typedArrays: kotlin.Boolean
|
|
||||||
get() = typedArraysField ?: true
|
|
||||||
set(value) { typedArraysField = value }
|
|
||||||
|
|
||||||
internal open fun updateArguments(args: org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments) {
|
internal open fun updateArguments(args: org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments) {
|
||||||
allWarningsAsErrorsField?.let { args.allWarningsAsErrors = it }
|
allWarningsAsErrorsField?.let { args.allWarningsAsErrors = it }
|
||||||
suppressWarningsField?.let { args.suppressWarnings = it }
|
suppressWarningsField?.let { args.suppressWarnings = it }
|
||||||
@@ -100,7 +95,6 @@ internal abstract class KotlinJsOptionsBase : org.jetbrains.kotlin.gradle.dsl.Ko
|
|||||||
sourceMapEmbedSourcesField?.let { args.sourceMapEmbedSources = it }
|
sourceMapEmbedSourcesField?.let { args.sourceMapEmbedSources = it }
|
||||||
sourceMapPrefixField?.let { args.sourceMapPrefix = it }
|
sourceMapPrefixField?.let { args.sourceMapPrefix = it }
|
||||||
targetField?.let { args.target = it }
|
targetField?.let { args.target = it }
|
||||||
typedArraysField?.let { args.typedArrays = it }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,5 +114,4 @@ internal fun org.jetbrains.kotlin.cli.common.arguments.K2JSCompilerArguments.fil
|
|||||||
sourceMapEmbedSources = null
|
sourceMapEmbedSources = null
|
||||||
sourceMapPrefix = null
|
sourceMapPrefix = null
|
||||||
target = "v5"
|
target = "v5"
|
||||||
typedArrays = true
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user