Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
24d6853e
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
24d6853e
编写于
2月 09, 2021
作者:
D
Dmitriy Novozhilov
提交者:
TeamCityServer
2月 10, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Test] Cleanup JvmEnvironmentConfigurator
上级
a932f69b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
10 deletion
+5
-10
compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt
...test/services/configuration/JvmEnvironmentConfigurator.kt
+5
-10
未找到文件。
compiler/tests-common-new/tests/org/jetbrains/kotlin/test/services/configuration/JvmEnvironmentConfigurator.kt
浏览文件 @
24d6853e
...
@@ -25,9 +25,10 @@ import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirective
...
@@ -25,9 +25,10 @@ import org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirective
import
org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.SAM_CONVERSIONS
import
org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.SAM_CONVERSIONS
import
org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.STRING_CONCAT
import
org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.STRING_CONCAT
import
org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME
import
org.jetbrains.kotlin.test.directives.JvmEnvironmentConfigurationDirectives.USE_OLD_INLINE_CLASSES_MANGLING_SCHEME
import
org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives
import
org.jetbrains.kotlin.test.directives.LanguageSettingsDirectives
.ENABLE_JVM_PREVIEW
import
org.jetbrains.kotlin.test.directives.model.DirectivesContainer
import
org.jetbrains.kotlin.test.directives.model.DirectivesContainer
import
org.jetbrains.kotlin.test.directives.model.RegisteredDirectives
import
org.jetbrains.kotlin.test.directives.model.RegisteredDirectives
import
org.jetbrains.kotlin.test.directives.model.singleOrZeroValue
import
org.jetbrains.kotlin.test.model.DependencyDescription
import
org.jetbrains.kotlin.test.model.DependencyDescription
import
org.jetbrains.kotlin.test.model.DependencyKind
import
org.jetbrains.kotlin.test.model.DependencyKind
import
org.jetbrains.kotlin.test.model.TestModule
import
org.jetbrains.kotlin.test.model.TestModule
...
@@ -59,16 +60,14 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
...
@@ -59,16 +60,14 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
register
(
SAM_CONVERSIONS
,
JVMConfigurationKeys
.
SAM_CONVERSIONS
)
register
(
SAM_CONVERSIONS
,
JVMConfigurationKeys
.
SAM_CONVERSIONS
)
register
(
LAMBDAS
,
JVMConfigurationKeys
.
LAMBDAS
)
register
(
LAMBDAS
,
JVMConfigurationKeys
.
LAMBDAS
)
register
(
USE_OLD_INLINE_CLASSES_MANGLING_SCHEME
,
JVMConfigurationKeys
.
USE_OLD_INLINE_CLASSES_MANGLING_SCHEME
)
register
(
USE_OLD_INLINE_CLASSES_MANGLING_SCHEME
,
JVMConfigurationKeys
.
USE_OLD_INLINE_CLASSES_MANGLING_SCHEME
)
register
(
ENABLE_JVM_PREVIEW
,
JVMConfigurationKeys
.
ENABLE_JVM_PREVIEW
)
}
}
override
fun
configureCompilerConfiguration
(
configuration
:
CompilerConfiguration
,
module
:
TestModule
)
{
override
fun
configureCompilerConfiguration
(
configuration
:
CompilerConfiguration
,
module
:
TestModule
)
{
if
(
module
.
targetPlatform
!
in
JvmPlatforms
.
allJvmPlatforms
)
return
if
(
module
.
targetPlatform
!
in
JvmPlatforms
.
allJvmPlatforms
)
return
val
registeredDirectives
=
module
.
directives
val
registeredDirectives
=
module
.
directives
val
targets
=
registeredDirectives
[
JvmEnvironmentConfigurationDirectives
.
JVM_TARGET
]
registeredDirectives
.
singleOrZeroValue
(
JvmEnvironmentConfigurationDirectives
.
JVM_TARGET
)
?.
let
{
when
(
targets
.
size
)
{
configuration
.
put
(
JVMConfigurationKeys
.
JVM_TARGET
,
it
)
0
->
{}
1
->
configuration
.
put
(
JVMConfigurationKeys
.
JVM_TARGET
,
targets
.
single
())
else
->
error
(
"Too many jvm targets passed: ${targets.joinToArrayString()}"
)
}
}
configureDefaultJvmTarget
(
configuration
)
configureDefaultJvmTarget
(
configuration
)
...
@@ -127,10 +126,6 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
...
@@ -127,10 +126,6 @@ class JvmEnvironmentConfigurator(testServices: TestServices) : EnvironmentConfig
configuration
.
addJvmClasspathRoot
(
ForTestCompileRuntime
.
androidAnnotationsForTests
())
configuration
.
addJvmClasspathRoot
(
ForTestCompileRuntime
.
androidAnnotationsForTests
())
}
}
if
(
LanguageSettingsDirectives
.
ENABLE_JVM_PREVIEW
in
module
.
directives
)
{
configuration
.
put
(
JVMConfigurationKeys
.
ENABLE_JVM_PREVIEW
,
true
)
}
val
isIr
=
module
.
targetBackend
?.
isIR
==
true
val
isIr
=
module
.
targetBackend
?.
isIR
==
true
configuration
.
put
(
JVMConfigurationKeys
.
IR
,
isIr
)
configuration
.
put
(
JVMConfigurationKeys
.
IR
,
isIr
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录