Move scripting codegen code from tests-common to compiler tests

getting rid of dependencies on scripting in the tests-common
This commit is contained in:
Ilya Chernikov
2018-05-25 09:41:32 +02:00
parent c54967b1b4
commit 4d65f0478b
5 changed files with 6 additions and 13 deletions
+3
View File
@@ -74,6 +74,9 @@ dependencies {
testCompile(projectTests(":generators:test-generator"))
testCompile(project(":compiler:ir.ir2cfg"))
testCompile(project(":compiler:ir.tree")) // used for deepCopyWithSymbols call that is removed by proguard from the compiler TODO: make it more straightforward
testCompile(project(":kotlin-scripting-compiler"))
testCompile(project(":kotlin-scripting-misc"))
testCompile(project(":kotlin-script-util"))
testCompileOnly(projectRuntimeJar(":kotlin-daemon-client"))
testCompileOnly(project(":kotlin-reflect-api"))
otherCompilerModules.forEach {
-3
View File
@@ -28,9 +28,6 @@ dependencies {
testCompile(projectTests(":compiler:tests-common-jvm6"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-scripting-compiler"))
testCompile(project(":kotlin-scripting-misc"))
testCompile(project(":kotlin-script-util"))
testCompile(androidDxJar()) { isTransitive = false }
testCompile(intellijCoreDep()) { includeJars("intellij-core"); isTransitive = false }
testCompile(intellijDep()) {
@@ -28,9 +28,6 @@ dependencies {
testCompile(projectTests(":compiler:tests-common-jvm6"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-scripting-compiler"))
testCompile(project(":kotlin-scripting-misc"))
testCompile(project(":kotlin-script-util"))
testCompile(androidDxJar()) { isTransitive = false }
testCompile(intellijCoreDep()) { includeJars("intellij-core"); isTransitive = false }
testCompile(intellijDep()) {
@@ -28,9 +28,6 @@ dependencies {
testCompile(projectTests(":compiler:tests-common-jvm6"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-scripting-compiler"))
testCompile(project(":kotlin-scripting-misc"))
testCompile(project(":kotlin-script-util"))
testCompile(androidDxJar()) { isTransitive = false }
testCompile(intellijCoreDep()) { includeJars("intellij-core"); isTransitive = false }
testCompile(intellijDep()) {
@@ -19,10 +19,9 @@ import kotlin.reflect.full.starProjectedType
import kotlin.script.experimental.annotations.KotlinScript
import kotlin.script.experimental.annotations.KotlinScriptDefaultCompilationConfiguration
import kotlin.script.experimental.api.ScriptCompileConfigurationProperties
import kotlin.script.experimental.misc.invoke
import kotlin.script.experimental.util.TypedKey
open class AbstractCustomScriptCodegenTest : CodegenTestCase() {
abstract class AbstractCustomScriptCodegenTest : CodegenTestCase() {
private lateinit var scriptDefinitions: List<String>
override fun setUp() {
@@ -117,7 +116,7 @@ open class AbstractCustomScriptCodegenTest : CodegenTestCase() {
object TestScriptWithReceiversConfiguration : ArrayList<Pair<TypedKey<*>, Any?>>(
listOf(
ScriptCompileConfigurationProperties.scriptImplicitReceivers(String::class.starProjectedType)
ScriptCompileConfigurationProperties.scriptImplicitReceivers to listOf(String::class.starProjectedType)
)
)
@@ -128,7 +127,7 @@ abstract class TestScriptWithReceivers
object TestScriptWithSimpleEnvVarsConfiguration : ArrayList<Pair<TypedKey<*>, Any?>>(
listOf(
ScriptCompileConfigurationProperties.contextVariables("stringVar1" to String::class.starProjectedType)
ScriptCompileConfigurationProperties.contextVariables to mapOf("stringVar1" to String::class.starProjectedType)
)
)