diff --git a/.idea/runConfigurations/Generate_Compiler_Tests.xml b/.idea/runConfigurations/Generate_Compiler_Tests.xml index 833139b5804..e800202d2b5 100644 --- a/.idea/runConfigurations/Generate_Compiler_Tests.xml +++ b/.idea/runConfigurations/Generate_Compiler_Tests.xml @@ -11,6 +11,7 @@ diff --git a/compiler/tests-java8/build.gradle.kts b/compiler/tests-java8/build.gradle.kts index f9751c0d0c3..b3960eefe7b 100644 --- a/compiler/tests-java8/build.gradle.kts +++ b/compiler/tests-java8/build.gradle.kts @@ -20,6 +20,7 @@ dependencies { testCompile(projectDist(":kotlin-reflect")) testCompile(projectTests(":compiler")) testCompile(projectTests(":compiler:tests-common")) + testCompile(projectTests(":generators:test-generator")) testRuntime(projectRuntimeJar(":kotlin-preloader")) testRuntime(preloadedDeps("dx", subdir = "android-5.0/lib")) testRuntime(ideaSdkCoreDeps("*.jar")) @@ -46,3 +47,4 @@ projectTest { systemProperty("kotlin.test.script.classpath", the().sourceSets.getByName("test").output.classesDirs.joinToString(File.pathSeparator)) } +val generateTests by generator("org.jetbrains.kotlin.generators.tests.GenerateJava8TestsKt") diff --git a/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt new file mode 100644 index 00000000000..fd6db333349 --- /dev/null +++ b/compiler/tests-java8/tests/org/jetbrains/kotlin/generators/tests/GenerateJava8Tests.kt @@ -0,0 +1,97 @@ +/* + * 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.generators.tests + +import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsNoAnnotationInClasspathTest +import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsNoAnnotationInClasspathWithFastClassReadingTest +import org.jetbrains.kotlin.checkers.AbstractForeignJava8AnnotationsTest +import org.jetbrains.kotlin.checkers.javac.AbstractJavacForeignJava8AnnotationsTest +import org.jetbrains.kotlin.codegen.AbstractBlackBoxCodegenTest +import org.jetbrains.kotlin.codegen.AbstractBytecodeTextTest +import org.jetbrains.kotlin.codegen.AbstractCompileKotlinAgainstKotlinTest +import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest +import org.jetbrains.kotlin.generators.tests.generator.testGroup +import org.jetbrains.kotlin.jvm.compiler.AbstractJava8WriteSignatureTest +import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8Test +import org.jetbrains.kotlin.jvm.compiler.AbstractLoadJava8WithFastClassReadingTest +import org.jetbrains.kotlin.jvm.compiler.javac.AbstractLoadJava8UsingJavacTest +import org.jetbrains.kotlin.jvm.runtime.AbstractJvm8RuntimeDescriptorLoaderTest +import org.jetbrains.kotlin.resolve.calls.AbstractEnhancedSignaturesResolvedCallsTest + +fun main(args: Array) { + System.setProperty("java.awt.headless", "true") + + testGroup("compiler/tests-java8/tests", "compiler/testData") { + testClass("BlackBoxWithJava8CodegenTestGenerated") { + model("codegen/java8/box") + } + + testClass { + model("foreignAnnotationsJava8/tests") + } + + testClass { + model("foreignAnnotationsJava8/tests") + } + + testClass { + model("foreignAnnotationsJava8/tests") + } + + testClass { + model("foreignAnnotationsJava8/tests") + } + + testClass { + model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") + model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava") + } + + testClass { + model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") + model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava") + } + + testClass { + model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") + } + + testClass { + model("resolvedCalls/enhancedSignatures") + } + + testClass { + model("loadJava8/compiledJava", extension = "java", excludeDirs = listOf("sam", "kotlinSignature/propagation")) + } + + testClass { + model("codegen/java8/compileKotlinAgainstKotlin") + } + + testClass { + model("codegen/java8/writeSignature") + } + + testClass { + model("codegen/java8/writeFlags") + } + + testClass("BytecodeTextJava8TestGenerated") { + model("codegen/java8/bytecodeText") + } + } +} diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt index 297849e58aa..735aa3bd7bb 100755 --- a/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt +++ b/generators/src/org/jetbrains/kotlin/generators/tests/GenerateTests.kt @@ -170,66 +170,6 @@ import org.jetbrains.kotlin.test.TargetBackend fun main(args: Array) { System.setProperty("java.awt.headless", "true") - testGroup("compiler/tests-java8/tests", "compiler/testData") { - testClass("BlackBoxWithJava8CodegenTestGenerated") { - model("codegen/java8/box") - } - - testClass { - model("foreignAnnotationsJava8/tests") - } - - testClass { - model("foreignAnnotationsJava8/tests") - } - - testClass { - model("foreignAnnotationsJava8/tests") - } - - testClass { - model("foreignAnnotationsJava8/tests") - } - - testClass { - model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") - model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava") - } - - testClass { - model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") - model("loadJava8/sourceJava", extension = "java", testMethod = "doTestSourceJava") - } - - testClass { - model("loadJava8/compiledJava", extension = "java", testMethod = "doTestCompiledJava") - } - - testClass { - model("resolvedCalls/enhancedSignatures") - } - - testClass { - model("loadJava8/compiledJava", extension = "java", excludeDirs = listOf("sam", "kotlinSignature/propagation")) - } - - testClass { - model("codegen/java8/compileKotlinAgainstKotlin") - } - - testClass { - model("codegen/java8/writeSignature") - } - - testClass { - model("codegen/java8/writeFlags") - } - - testClass("BytecodeTextJava8TestGenerated") { - model("codegen/java8/bytecodeText") - } - } - testGroup("idea/tests", "idea/testData") { testClass { model("resolve/additionalLazyResolve")