From 17955ce7d91b5aa0790da548523d674a4475f0dd Mon Sep 17 00:00:00 2001 From: strangepleasures Date: Wed, 24 Jan 2024 14:25:05 +0100 Subject: [PATCH] Revert "Remove flaky Kapt4ToolIntegrationTestGenerated test" This reverts commit 58fd558308a2b656aff2ea1bf705c27ad6a7b22d. --- .../kotlin/generators/tests/GenerateTests.kt | 3 + .../Kapt4ToolIntegrationTestGenerated.java | 98 +++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 plugins/kapt3/kapt3-cli/tests-gen/org/jetbrains/kotlin/kapt/cli/test/Kapt4ToolIntegrationTestGenerated.java diff --git a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 24d1aaa8917..56bad33bfc8 100644 --- a/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/tests/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -377,6 +377,9 @@ fun main(args: Array) { testClass { model("integration", recursive = false, extension = null) } + testClass { + model("integration-kapt4", recursive = false, extension = null) + } } testGroup("plugins/kapt3/kapt3-compiler/tests-gen", "plugins/kapt3/kapt3-compiler/testData") { diff --git a/plugins/kapt3/kapt3-cli/tests-gen/org/jetbrains/kotlin/kapt/cli/test/Kapt4ToolIntegrationTestGenerated.java b/plugins/kapt3/kapt3-cli/tests-gen/org/jetbrains/kotlin/kapt/cli/test/Kapt4ToolIntegrationTestGenerated.java new file mode 100644 index 00000000000..ce5d00263f0 --- /dev/null +++ b/plugins/kapt3/kapt3-cli/tests-gen/org/jetbrains/kotlin/kapt/cli/test/Kapt4ToolIntegrationTestGenerated.java @@ -0,0 +1,98 @@ +/* + * 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.kapt.cli.test; + +import com.intellij.testFramework.TestDataPath; +import org.jetbrains.kotlin.test.util.KtTestUtil; +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.GenerateTestsKt}. DO NOT MODIFY MANUALLY */ +@SuppressWarnings("all") +@TestMetadata("plugins/kapt3/kapt3-cli/testData/integration-kapt4") +@TestDataPath("$PROJECT_ROOT") +public class Kapt4ToolIntegrationTestGenerated extends AbstractKapt4ToolIntegrationTest { + @Test + public void testAllFilesPresentInIntegration_kapt4() throws Exception { + KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("plugins/kapt3/kapt3-cli/testData/integration-kapt4"), Pattern.compile("^([^\\.]+)$"), null, false); + } + + @Test + @TestMetadata("argfile") + public void testArgfile() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/argfile/"); + } + + @Test + @TestMetadata("compileModeUnsupported") + public void testCompileModeUnsupported() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/compileModeUnsupported/"); + } + + @Test + @TestMetadata("correctErrorTypesOn") + public void testCorrectErrorTypesOn() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/correctErrorTypesOn/"); + } + + @Test + @TestMetadata("defaultPackage") + public void testDefaultPackage() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/defaultPackage/"); + } + + @Test + @TestMetadata("kaptUseK2Flag") + public void testKaptUseK2Flag() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/kaptUseK2Flag/"); + } + + @Test + @TestMetadata("kotlinFileGeneration") + public void testKotlinFileGeneration() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/kotlinFileGeneration/"); + } + + @Test + @TestMetadata("kotlinFileGenerationDefaultOutput") + public void testKotlinFileGenerationDefaultOutput() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/kotlinFileGenerationDefaultOutput/"); + } + + @Test + @TestMetadata("kt33800") + public void testKt33800() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/kt33800/"); + } + + @Test + @TestMetadata("multipass") + public void testMultipass() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/multipass/"); + } + + @Test + @TestMetadata("separateStubAptCompilation") + public void testSeparateStubAptCompilation() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/separateStubAptCompilation/"); + } + + @Test + @TestMetadata("simple") + public void testSimple() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/simple/"); + } + + @Test + @TestMetadata("withoutService") + public void testWithoutService() throws Exception { + runTest("plugins/kapt3/kapt3-cli/testData/integration-kapt4/withoutService/"); + } +}