Fix language version settings and exclude NewInference tests
This commit is contained in:
committed by
Pavel Punegov
parent
7c40c2b8ab
commit
660bd111c5
@@ -713,8 +713,8 @@ class RunExternalTestGroup extends RunStandaloneKonanTest {
|
|||||||
lines.forEach { line ->
|
lines.forEach { line ->
|
||||||
// FIXME: find only those who has vars inside
|
// FIXME: find only those who has vars inside
|
||||||
// Find object declarations and companion objects
|
// Find object declarations and companion objects
|
||||||
if (line.matches("(?m)^\\s*object [a-zA-Z_][a-zA-Z0-9_]*\\s*.*")
|
if (line.matches("\\s*(private|public|internal)?\\s*object [a-zA-Z_][a-zA-Z0-9_]*\\s*.*")
|
||||||
|| line.matches("(?m)^\\s*companion object.*")) {
|
|| line.matches("\\s*(private|public|internal)?\\s*companion object.*")) {
|
||||||
result += "@kotlin.native.ThreadLocal"
|
result += "@kotlin.native.ThreadLocal"
|
||||||
}
|
}
|
||||||
result += line
|
result += line
|
||||||
@@ -868,15 +868,18 @@ fun runTest() {
|
|||||||
boolean isEnabledForNativeBackend(String fileName) {
|
boolean isEnabledForNativeBackend(String fileName) {
|
||||||
def text = project.file(fileName).text
|
def text = project.file(fileName).text
|
||||||
|
|
||||||
def inproperIeee754Comparisons = findLinesWithPrefixesRemoved(text, '// !LANGUAGE: ')
|
def languageSettings = findLinesWithPrefixesRemoved(text, '// !LANGUAGE: ')
|
||||||
if (inproperIeee754Comparisons.contains('-ProperIeee754Comparisons')) {
|
if (languageSettings.contains('-ProperIeee754Comparisons')) {
|
||||||
// K/N supports only proper IEEE754 comparisons
|
// K/N supports only proper IEEE754 comparisons
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if (languageSettings.contains('+NewInference')) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
def version = findLinesWithPrefixesRemoved(text, '// LANGUAGE_VERSION: ')
|
def version = findLinesWithPrefixesRemoved(text, '// LANGUAGE_VERSION: ')
|
||||||
if (version.size() != 0 && version.contains("1.3")) {
|
if (version.size() != 0 && version.contains("1.2")) {
|
||||||
// 1.3 is not yet supported
|
// Support tests for 1.3 and exclude 1.2
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user