[JS FIR Tests] Add source map smoke test for FIR

^KT-64450 Fixed
This commit is contained in:
Alexander Korepanov
2024-01-16 11:59:35 +01:00
committed by Space Team
parent 6884266328
commit b672e5c131
4 changed files with 72 additions and 1 deletions
@@ -0,0 +1,51 @@
/*
* Copyright 2010-2024 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("js/js.translator/testData/sourcemap")
@TestDataPath("$PROJECT_ROOT")
public class FirSourceMapGenerationSmokeTestGenerated extends AbstractFirSourceMapGenerationSmokeTest {
@Test
public void testAllFilesPresentInSourcemap() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("js/js.translator/testData/sourcemap"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("binaryOperation.kt")
public void testBinaryOperation() throws Exception {
runTest("js/js.translator/testData/sourcemap/binaryOperation.kt");
}
@Test
@TestMetadata("emptyIfInsideInlineLambda.kt")
public void testEmptyIfInsideInlineLambda() throws Exception {
runTest("js/js.translator/testData/sourcemap/emptyIfInsideInlineLambda.kt");
}
@Test
@TestMetadata("expressionBody.kt")
public void testExpressionBody() throws Exception {
runTest("js/js.translator/testData/sourcemap/expressionBody.kt");
}
@Test
@TestMetadata("methodCallInMethod.kt")
public void testMethodCallInMethod() throws Exception {
runTest("js/js.translator/testData/sourcemap/methodCallInMethod.kt");
}
}