File tree Expand file tree Collapse file tree 12 files changed +132
-47
lines changed
src/test/kotlin/kotlinreflect
src/test/kotlin/kotlinstdlib Expand file tree Collapse file tree 12 files changed +132
-47
lines changed Original file line number Diff line number Diff line change 109109 "directory" : " com.github.ben-manes.caffeine/caffeine" ,
110110 "module" : " com.github.ben-manes.caffeine:caffeine"
111111 },
112+ {
113+ "directory" : " org.jetbrains.kotlin/kotlin-stdlib" ,
114+ "module" : " org.jetbrains.kotlin:kotlin-stdlib"
115+ },
112116 {
113117 "directory" : " org.jetbrains.kotlin/kotlin-reflect" ,
114118 "module" : " org.jetbrains.kotlin:kotlin-reflect"
Original file line number Diff line number Diff line change 8989 },
9090 "name" : " kotlin.reflect.jvm.internal.impl.resolve.scopes.DescriptorKindFilter" ,
9191 "allPublicFields" : true
92- },
93- {
94- "condition" : {
95- "typeReachable" : " kotlin.internal.jdk8.JDK8PlatformImplementations"
96- },
97- "name" : " kotlin.internal.jdk8.JDK8PlatformImplementations" ,
98- "methods" : [
99- {
100- "name" : " <init>" ,
101- "parameterTypes" : []
102- }
103- ]
10492 }
10593]
Original file line number Diff line number Diff line change 1+ [
2+ " reflect-config.json"
3+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "condition" : {
4+ "typeReachable" : " kotlin.internal.jdk8.JDK8PlatformImplementations"
5+ },
6+ "name" : " kotlin.internal.jdk8.JDK8PlatformImplementations" ,
7+ "methods" : [
8+ {
9+ "name" : " <init>" ,
10+ "parameterTypes" : []
11+ }
12+ ]
13+ }
14+ ]
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "latest" : true ,
4+ "metadata-version" : " 1.7.10" ,
5+ "module" : " org.jetbrains.kotlin:kotlin-stdlib" ,
6+ "tested-versions" : [
7+ " 1.7.10"
8+ ]
9+ }
10+ ]
Original file line number Diff line number Diff line change 285285 }
286286 ]
287287 },
288+ {
289+ "test-project-path" : " org.jetbrains.kotlin/kotlin-stdlib/1.7.10" ,
290+ "libraries" : [
291+ {
292+ "name" : " org.jetbrains.kotlin:kotlin-stdlib" ,
293+ "versions" : [
294+ " 1.7.10"
295+ ]
296+ }
297+ ]
298+ },
288299 {
289300 "test-project-path" : " org.jetbrains.kotlin/kotlin-reflect/1.7.10" ,
290301 "libraries" : [
Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ String libraryVersion = tck.testedLibraryVersion.get()
1313
1414dependencies {
1515 implementation " org.jetbrains.kotlin:kotlin-reflect:$libraryVersion "
16- implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4"
17-
1816 testImplementation ' org.assertj:assertj-core:3.22.0'
1917}
2018
@@ -23,17 +21,9 @@ compileTestKotlin {
2321}
2422
2523graalvmNative {
26- agent {
27- defaultMode = " conditional"
28- modes {
29- conditional {
30- userCodeFilterPath = " user-code-filter.json"
31- }
32- }
33- metadataCopy {
34- mergeWithExisting = true
35- inputTaskNames. add(" test" )
36- outputDirectories. add(" src/test/resources/META-INF/native-image/org.jetbrains.kotlin/kotlin-reflect" )
24+ binaries {
25+ test {
26+ buildArgs. add(' --no-fallback' )
3727 }
3828 }
3929}
Original file line number Diff line number Diff line change 11package kotlinreflect
22
3- import kotlinx.coroutines.CoroutineScope
4- import kotlinx.coroutines.Dispatchers
5- import kotlinx.coroutines.delay
6- import kotlinx.coroutines.launch
73import org.assertj.core.api.Assertions.assertThat
84import org.junit.jupiter.api.Test
9- import java.util.concurrent.atomic.AtomicBoolean
10- import kotlin.random.Random
115import kotlin.reflect.KParameter
126import kotlin.reflect.full.createType
137import kotlin.reflect.full.memberProperties
@@ -46,22 +40,6 @@ class KotlinReflectTests {
4640 assertThat(annotatedProperty.annotations[0 ]).isInstanceOf(TestAnnotation ::class .java)
4741 assertThat((annotatedProperty.annotations[0 ] as TestAnnotation ).value).isEqualTo(" annotation-on-field" )
4842 }
49- @Test
50- fun testCoroutine () {
51- val updated = AtomicBoolean (false )
52- assertThat(updated.get()).isFalse
53- CoroutineScope (Dispatchers .Default ).launch {
54- delay(500 )
55- updated.set(true )
56- }
57- Thread .sleep(1000 )
58- assertThat(updated.get()).isTrue
59- }
60- @Test
61- fun testKotlinRandom () {
62- val randomValue = Random .nextInt(0 , 10 )
63- assertThat(randomValue).isBetween(0 , 10 )
64- }
6543}
6644
6745class Foo {
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright and related rights waived via CC0
3+ *
4+ * You should have received a copy of the CC0 legalcode along with this
5+ * work. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
6+ */
7+ plugins {
8+ id " org.graalvm.internal.tck"
9+ id " org.jetbrains.kotlin.jvm" version " 1.7.10"
10+ }
11+
12+ String libraryVersion = tck. testedLibraryVersion. get()
13+
14+ dependencies {
15+ implementation " org.jetbrains.kotlin:kotlin-stdlib:$libraryVersion "
16+ implementation " org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4"
17+
18+ implementation ' org.jetbrains.kotlin:kotlin-test-junit:1.7.10'
19+
20+ }
21+
22+ compileTestKotlin {
23+ kotlinOptions. jvmTarget = " 17"
24+ }
25+
26+ graalvmNative {
27+ binaries {
28+ test {
29+ buildArgs. add(' --no-fallback' )
30+ }
31+ }
32+ }
Original file line number Diff line number Diff line change 1+ library.version = 1.7.10
2+ metadata.dir = org.jetbrains.kotlin/kotlin-stdlib/1.7.10
You can’t perform that action at this time.
0 commit comments