/*
 * 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.test.runners.codegen;

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.test.generators.GenerateCompilerTestsKt}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("compiler/testData/codegen/script")
@TestDataPath("$PROJECT_ROOT")
public class FirScriptCodegenTestGenerated extends AbstractFirScriptCodegenTest {
    @Test
    @TestMetadata("adder.kts")
    public void testAdder() throws Exception {
        runTest("compiler/testData/codegen/script/adder.kts");
    }

    @Test
    public void testAllFilesPresentInScript() throws Exception {
        KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/script"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
    }

    @Test
    @TestMetadata("classLiteralInsideFunction.kts")
    public void testClassLiteralInsideFunction() throws Exception {
        runTest("compiler/testData/codegen/script/classLiteralInsideFunction.kts");
    }

    @Test
    @TestMetadata("destructuringDeclaration.kts")
    public void testDestructuringDeclaration() throws Exception {
        runTest("compiler/testData/codegen/script/destructuringDeclaration.kts");
    }

    @Test
    @TestMetadata("destructuringDeclarationUnderscore.kts")
    public void testDestructuringDeclarationUnderscore() throws Exception {
        runTest("compiler/testData/codegen/script/destructuringDeclarationUnderscore.kts");
    }

    @Test
    @TestMetadata("empty.kts")
    public void testEmpty() throws Exception {
        runTest("compiler/testData/codegen/script/empty.kts");
    }

    @Test
    @TestMetadata("helloWorld.kts")
    public void testHelloWorld() throws Exception {
        runTest("compiler/testData/codegen/script/helloWorld.kts");
    }

    @Test
    @TestMetadata("inline.kts")
    public void testInline() throws Exception {
        runTest("compiler/testData/codegen/script/inline.kts");
    }

    @Test
    @TestMetadata("innerClass.kts")
    public void testInnerClass() throws Exception {
        runTest("compiler/testData/codegen/script/innerClass.kts");
    }

    @Test
    @TestMetadata("kt20707.kts")
    public void testKt20707() throws Exception {
        runTest("compiler/testData/codegen/script/kt20707.kts");
    }

    @Test
    @TestMetadata("kt22029.kts")
    public void testKt22029() throws Exception {
        runTest("compiler/testData/codegen/script/kt22029.kts");
    }

    @Test
    @TestMetadata("kt48025.kts")
    public void testKt48025() throws Exception {
        runTest("compiler/testData/codegen/script/kt48025.kts");
    }

    @Test
    @TestMetadata("localDelegatedProperty.kts")
    public void testLocalDelegatedProperty() throws Exception {
        runTest("compiler/testData/codegen/script/localDelegatedProperty.kts");
    }

    @Test
    @TestMetadata("localDelegatedPropertyInLambda.kts")
    public void testLocalDelegatedPropertyInLambda() throws Exception {
        runTest("compiler/testData/codegen/script/localDelegatedPropertyInLambda.kts");
    }

    @Test
    @TestMetadata("localDelegatedPropertyNoExplicitType.kts")
    public void testLocalDelegatedPropertyNoExplicitType() throws Exception {
        runTest("compiler/testData/codegen/script/localDelegatedPropertyNoExplicitType.kts");
    }

    @Test
    @TestMetadata("localFunction.kts")
    public void testLocalFunction() throws Exception {
        runTest("compiler/testData/codegen/script/localFunction.kts");
    }

    @Test
    @TestMetadata("outerCapture.kts")
    public void testOuterCapture() throws Exception {
        runTest("compiler/testData/codegen/script/outerCapture.kts");
    }

    @Test
    @TestMetadata("parameter.kts")
    public void testParameter() throws Exception {
        runTest("compiler/testData/codegen/script/parameter.kts");
    }

    @Test
    @TestMetadata("parameterArray.kts")
    public void testParameterArray() throws Exception {
        runTest("compiler/testData/codegen/script/parameterArray.kts");
    }

    @Test
    @TestMetadata("parameterClosure.kts")
    public void testParameterClosure() throws Exception {
        runTest("compiler/testData/codegen/script/parameterClosure.kts");
    }

    @Test
    @TestMetadata("parameterLong.kts")
    public void testParameterLong() throws Exception {
        runTest("compiler/testData/codegen/script/parameterLong.kts");
    }

    @Test
    @TestMetadata("secondLevelFunction.kts")
    public void testSecondLevelFunction() throws Exception {
        runTest("compiler/testData/codegen/script/secondLevelFunction.kts");
    }

    @Test
    @TestMetadata("secondLevelFunctionClosure.kts")
    public void testSecondLevelFunctionClosure() throws Exception {
        runTest("compiler/testData/codegen/script/secondLevelFunctionClosure.kts");
    }

    @Test
    @TestMetadata("secondLevelVal.kts")
    public void testSecondLevelVal() throws Exception {
        runTest("compiler/testData/codegen/script/secondLevelVal.kts");
    }

    @Test
    @TestMetadata("simpleClass.kts")
    public void testSimpleClass() throws Exception {
        runTest("compiler/testData/codegen/script/simpleClass.kts");
    }

    @Test
    @TestMetadata("string.kts")
    public void testString() throws Exception {
        runTest("compiler/testData/codegen/script/string.kts");
    }

    @Test
    @TestMetadata("topLevelFunction.kts")
    public void testTopLevelFunction() throws Exception {
        runTest("compiler/testData/codegen/script/topLevelFunction.kts");
    }

    @Test
    @TestMetadata("topLevelFunctionClosure.kts")
    public void testTopLevelFunctionClosure() throws Exception {
        runTest("compiler/testData/codegen/script/topLevelFunctionClosure.kts");
    }

    @Test
    @TestMetadata("topLevelLocalDelegatedProperty.kts")
    public void testTopLevelLocalDelegatedProperty() throws Exception {
        runTest("compiler/testData/codegen/script/topLevelLocalDelegatedProperty.kts");
    }

    @Test
    @TestMetadata("topLevelPropertiesWithGetSet.kts")
    public void testTopLevelPropertiesWithGetSet() throws Exception {
        runTest("compiler/testData/codegen/script/topLevelPropertiesWithGetSet.kts");
    }

    @Test
    @TestMetadata("topLevelProperty.kts")
    public void testTopLevelProperty() throws Exception {
        runTest("compiler/testData/codegen/script/topLevelProperty.kts");
    }

    @Test
    @TestMetadata("topLevelPropertyWithProvideDelegate.kts")
    public void testTopLevelPropertyWithProvideDelegate() throws Exception {
        runTest("compiler/testData/codegen/script/topLevelPropertyWithProvideDelegate.kts");
    }

    @Test
    @TestMetadata("topLevelTypealias.kts")
    public void testTopLevelTypealias() throws Exception {
        runTest("compiler/testData/codegen/script/topLevelTypealias.kts");
    }

    @Test
    @TestMetadata("twoDestructuringDeclarations.kts")
    public void testTwoDestructuringDeclarations() throws Exception {
        runTest("compiler/testData/codegen/script/twoDestructuringDeclarations.kts");
    }

    @Nested
    @TestMetadata("compiler/testData/codegen/script/scriptInstanceCapturing")
    @TestDataPath("$PROJECT_ROOT")
    public class ScriptInstanceCapturing {
        @Test
        public void testAllFilesPresentInScriptInstanceCapturing() throws Exception {
            KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/script/scriptInstanceCapturing"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), TargetBackend.JVM_IR, true);
        }

        @Test
        @TestMetadata("anonymousObjectCapturesProperty.kts")
        public void testAnonymousObjectCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/anonymousObjectCapturesProperty.kts");
        }

        @Test
        @TestMetadata("classCapturesExtensionIndirect.kts")
        public void testClassCapturesExtensionIndirect() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesExtensionIndirect.kts");
        }

        @Test
        @TestMetadata("classCapturesExtensionIndirect2x.kts")
        public void testClassCapturesExtensionIndirect2x() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesExtensionIndirect2x.kts");
        }

        @Test
        @TestMetadata("classCapturesFunction.kts")
        public void testClassCapturesFunction() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesFunction.kts");
        }

        @Test
        @TestMetadata("classCapturesProperty.kts")
        public void testClassCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesProperty.kts");
        }

        @Test
        @TestMetadata("classCapturesPropertyInStringTemplate.kts")
        public void testClassCapturesPropertyInStringTemplate() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesPropertyInStringTemplate.kts");
        }

        @Test
        @TestMetadata("classCapturesPropertyIndirect.kts")
        public void testClassCapturesPropertyIndirect() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesPropertyIndirect.kts");
        }

        @Test
        @TestMetadata("classCapturesPropertyIndirect2x.kts")
        public void testClassCapturesPropertyIndirect2x() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/classCapturesPropertyIndirect2x.kts");
        }

        @Test
        @TestMetadata("companionCapturesProperty.kts")
        public void testCompanionCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/companionCapturesProperty.kts");
        }

        @Test
        @TestMetadata("enumCapturesProperty.kts")
        public void testEnumCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/enumCapturesProperty.kts");
        }

        @Test
        @TestMetadata("enumEntryCapturesProperty.kts")
        public void testEnumEntryCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/enumEntryCapturesProperty.kts");
        }

        @Test
        @TestMetadata("innerClassesHierarchyCaptureProperty.kts")
        public void testInnerClassesHierarchyCaptureProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/innerClassesHierarchyCaptureProperty.kts");
        }

        @Test
        @TestMetadata("interfaceCapturesProperty.kts")
        public void testInterfaceCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/interfaceCapturesProperty.kts");
        }

        @Test
        @TestMetadata("nestedAndOuterClassesCaptureProperty.kts")
        public void testNestedAndOuterClassesCaptureProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/nestedAndOuterClassesCaptureProperty.kts");
        }

        @Test
        @TestMetadata("nestedClassCapturesProperty.kts")
        public void testNestedClassCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/nestedClassCapturesProperty.kts");
        }

        @Test
        @TestMetadata("nestedInnerClassCapturesProperty.kts")
        public void testNestedInnerClassCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/nestedInnerClassCapturesProperty.kts");
        }

        @Test
        @TestMetadata("nestedToObjectClassCapturesProperty.kts")
        public void testNestedToObjectClassCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/nestedToObjectClassCapturesProperty.kts");
        }

        @Test
        @TestMetadata("objectCapturesProperty.kts")
        public void testObjectCapturesProperty() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/objectCapturesProperty.kts");
        }

        @Test
        @TestMetadata("objectCapturesPropertyIndirect.kts")
        public void testObjectCapturesPropertyIndirect() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/objectCapturesPropertyIndirect.kts");
        }

        @Test
        @TestMetadata("objectCapturesPropertyViaExtension.kts")
        public void testObjectCapturesPropertyViaExtension() throws Exception {
            runTest("compiler/testData/codegen/script/scriptInstanceCapturing/objectCapturesPropertyViaExtension.kts");
        }
    }
}
