File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
src/test/kotlin/com/compiler/server Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,7 @@ dependencies {
102102 kotlinDependency(" org.jetbrains.kotlin:kotlin-test:$kotlinVersion " )
103103 kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3" )
104104 kotlinDependency(" org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.4" )
105+ kotlinDependency(" org.jetbrains.kotlinx:kotlinx-datetime:0.6.0-RC.2" )
105106 kotlinJsDependency(" org.jetbrains.kotlin:kotlin-stdlib-js:$kotlinVersion " )
106107 kotlinJsDependency(" org.jetbrains.kotlin:kotlin-dom-api-compat:$kotlinVersion " )
107108 kotlinWasmDependency(" org.jetbrains.kotlin:kotlin-stdlib-wasm-js:$kotlinVersion " )
Original file line number Diff line number Diff line change 1+ package com.compiler.server
2+
3+ import com.compiler.server.base.BaseExecutorTest
4+ import org.junit.jupiter.api.Test
5+
6+ class DatetimeRunnerTest : BaseExecutorTest () {
7+ @Test
8+ fun `kotlinx datetime basic test` () {
9+ run (
10+ code = """
11+ import kotlinx.datetime.*
12+
13+ fun main() {
14+ val zone = TimeZone.of("Europe/Berlin")
15+ val today = Clock.System.todayIn(zone)
16+ println(today.year in 2000..3000)
17+ }
18+ """ .trimIndent(),
19+ contains = " true"
20+ )
21+ }
22+
23+ }
You can’t perform that action at this time.
0 commit comments