Annotate explicitly stdlib tests, which must be excluded from JS stdlib tests with @JvmVersion, do not use file naming convention, use preprocessor instead.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2010-2016 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.
|
||||
*/
|
||||
|
||||
@file:JvmVersion
|
||||
package kotlin.jvm
|
||||
|
||||
@Target(AnnotationTarget.FILE, AnnotationTarget.CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION)
|
||||
@Retention(AnnotationRetention.SOURCE)
|
||||
internal annotation class JvmVersion(public val minimum: Int = 6, public val maximum: Int = 100)
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.exceptions
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.collections
|
||||
|
||||
import java.io.ByteArrayInputStream
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.collections
|
||||
|
||||
import java.util.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.collections
|
||||
|
||||
import org.junit.Test as test
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.collections
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.collections
|
||||
|
||||
import org.junit.Test as test
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.concurrent
|
||||
|
||||
import java.io.ObjectOutputStream
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.concurrent
|
||||
|
||||
import kotlin.concurrent.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.concurrent
|
||||
|
||||
import kotlin.concurrent.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.io
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.io
|
||||
|
||||
import java.io.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.io
|
||||
|
||||
import org.junit.Test as test
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.io
|
||||
|
||||
import org.junit.Test as test
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion // TODO: Can't run in JS: spaces in function name KT-4160
|
||||
package test.language
|
||||
|
||||
import org.junit.Test as test
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.numbers
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.numbers
|
||||
|
||||
import java.math.BigInteger
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.numbers
|
||||
|
||||
import java.math.BigDecimal
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.ranges
|
||||
|
||||
import java.lang.Integer.MAX_VALUE as MaxI
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.ranges
|
||||
|
||||
import kotlin.ranges.LongProgression.Companion
|
||||
import java.lang.Double as jDouble
|
||||
import java.lang.Float as jFloat
|
||||
import org.junit.Test as test
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.reflection
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.text
|
||||
|
||||
import kotlin.test.*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.text
|
||||
|
||||
import kotlin.*
|
||||
import kotlin.test.*
|
||||
import org.junit.Test as test
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.text
|
||||
|
||||
import test.collections.assertArrayNotSameButEquals
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.utils
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
@file:kotlin.jvm.JvmVersion
|
||||
package test.utils
|
||||
|
||||
import org.junit.Test as test
|
||||
|
||||
@@ -23,6 +23,11 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<kotlin-home>${kotlin-dist}/kotlinc</kotlin-home>
|
||||
<pp-profile>JS</pp-profile>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -37,24 +42,21 @@
|
||||
<target>
|
||||
<delete dir="${basedir}/target/tests" failonerror="false"/>
|
||||
<mkdir dir="${basedir}/target/tests"/>
|
||||
<java classname="org.jetbrains.kotlin.preloading.Preloader" failonerror="true" fork="true">
|
||||
<classpath>
|
||||
<pathelement location="${kotlin-home}/lib/kotlin-preloader.jar"/>
|
||||
</classpath>
|
||||
<assertions>
|
||||
<enable/>
|
||||
</assertions>
|
||||
<arg value="-cp"/>
|
||||
<arg value="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
||||
<arg value="org.jetbrains.kotlin.preprocessor.PreprocessorCLI"/>
|
||||
<arg value="${basedir}/../../stdlib/test"/>
|
||||
<arg value="${basedir}/target/tests"/>
|
||||
<arg value="${pp-profile}"/>
|
||||
</java>
|
||||
<copy todir="${basedir}/target/tests">
|
||||
<fileset dir="${basedir}/../../stdlib/test">
|
||||
<include name="**/*.kt"/>
|
||||
|
||||
|
||||
<!-- exclude JVM tests-->
|
||||
<exclude name="**/*JVM.kt"/>
|
||||
<exclude name="**/*JVMTest.kt"/>
|
||||
<exclude name="**/*JVMTests.kt"/>
|
||||
|
||||
<exclude name="concurrent/**"/>
|
||||
<exclude name="io/**"/>
|
||||
<exclude name="reflection/**"/>
|
||||
|
||||
<!-- Can't run: spaces in function name KT-4160 -->
|
||||
<exclude name="language/EscapedTestNamesTest.kt"/>
|
||||
|
||||
</fileset>
|
||||
<fileset dir="${basedir}/../../../js/js.libraries/test">
|
||||
<include name="**/*.kt" />
|
||||
</fileset>
|
||||
|
||||
Reference in New Issue
Block a user