[K/JS] Generate tests for K2 + ES-classes compilation

This commit is contained in:
Artem Kobzar
2023-08-01 09:16:20 +00:00
committed by Space Team
parent 19653df1c6
commit 08bd0d6ce1
43 changed files with 54150 additions and 72 deletions
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,131 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* 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.fir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxError")
@TestDataPath("$PROJECT_ROOT")
public class FirJsES6CodegenBoxErrorTestGenerated extends AbstractFirJsES6CodegenBoxErrorTest {
@Test
public void testAllFilesPresentInBoxError() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true, "compileKotlinAgainstKotlin");
}
@Nested
@TestMetadata("compiler/testData/codegen/boxError/semantic")
@TestDataPath("$PROJECT_ROOT")
public class Semantic {
@Test
public void testAllFilesPresentInSemantic() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError/semantic"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("castToErrorType.kt")
public void testCastToErrorType() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/castToErrorType.kt");
}
@Test
@TestMetadata("catchErrorType.kt")
public void testCatchErrorType() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/catchErrorType.kt");
}
@Test
@TestMetadata("evaluationOrder.kt")
public void testEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/evaluationOrder.kt");
}
@Test
@TestMetadata("mismatchTypeParameters.kt")
public void testMismatchTypeParameters() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/mismatchTypeParameters.kt");
}
@Test
@TestMetadata("missedBody.kt")
public void testMissedBody() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/missedBody.kt");
}
@Test
@TestMetadata("reifiedNonInline.kt")
public void testReifiedNonInline() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/reifiedNonInline.kt");
}
@Test
@TestMetadata("reifiedWithWrongArguments.kt")
public void testReifiedWithWrongArguments() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/reifiedWithWrongArguments.kt");
}
@Test
@TestMetadata("typeMismatch.kt")
public void testTypeMismatch() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/typeMismatch.kt");
}
@Test
@TestMetadata("unmatchedArguments.kt")
public void testUnmatchedArguments() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/unmatchedArguments.kt");
}
@Test
@TestMetadata("unresolvedFunctionReferece.kt")
public void testUnresolvedFunctionReferece() throws Exception {
runTest("compiler/testData/codegen/boxError/semantic/unresolvedFunctionReferece.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/boxError/syntax")
@TestDataPath("$PROJECT_ROOT")
public class Syntax {
@Test
public void testAllFilesPresentInSyntax() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxError/syntax"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("arrowReference.kt")
public void testArrowReference() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/arrowReference.kt");
}
@Test
@TestMetadata("evaluationOrder.kt")
public void testEvaluationOrder() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/evaluationOrder.kt");
}
@Test
@TestMetadata("incorectLexicalName.kt")
public void testIncorectLexicalName() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/incorectLexicalName.kt");
}
@Test
@TestMetadata("missedArgument.kt")
public void testMissedArgument() throws Exception {
runTest("compiler/testData/codegen/boxError/syntax/missedArgument.kt");
}
}
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,111 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* 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.fir;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.util.KtTestUtil;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.Test;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.GenerateJsTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/boxWasmJsInterop")
@TestDataPath("$PROJECT_ROOT")
public class FirJsES6CodegenWasmJsInteropTestGenerated extends AbstractFirJsES6CodegenWasmJsInteropTest {
@Test
public void testAllFilesPresentInBoxWasmJsInterop() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/boxWasmJsInterop"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("defaultValues.kt")
public void testDefaultValues() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/defaultValues.kt");
}
@Test
@TestMetadata("externalTypeOperators.kt")
public void testExternalTypeOperators() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/externalTypeOperators.kt");
}
@Test
@TestMetadata("externals.kt")
public void testExternals() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/externals.kt");
}
@Test
@TestMetadata("functionTypes.kt")
public void testFunctionTypes() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/functionTypes.kt");
}
@Test
@TestMetadata("jsCode.kt")
public void testJsCode() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/jsCode.kt");
}
@Test
@TestMetadata("jsModule.kt")
public void testJsModule() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/jsModule.kt");
}
@Test
@TestMetadata("jsModuleWithQualifier.kt")
public void testJsModuleWithQualifier() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/jsModuleWithQualifier.kt");
}
@Test
@TestMetadata("jsQualifier.kt")
public void testJsQualifier() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/jsQualifier.kt");
}
@Test
@TestMetadata("jsToKotlinAdapters.kt")
public void testJsToKotlinAdapters() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/jsToKotlinAdapters.kt");
}
@Test
@TestMetadata("kotlinToJsAdapters.kt")
public void testKotlinToJsAdapters() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/kotlinToJsAdapters.kt");
}
@Test
@TestMetadata("longStrings.kt")
public void testLongStrings() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/longStrings.kt");
}
@Test
@TestMetadata("nameClash.kt")
public void testNameClash() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/nameClash.kt");
}
@Test
@TestMetadata("types.kt")
public void testTypes() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/types.kt");
}
@Test
@TestMetadata("vararg.kt")
public void testVararg() throws Exception {
runTest("compiler/testData/codegen/boxWasmJsInterop/vararg.kt");
}
}