mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-01 15:15:45 +07:00
[textmate] move multiplatform tests back to core module
GitOrigin-RevId: dd2fd8956e19897d94b8a9257674cbb6e10bbce6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
36e03494d6
commit
f81036e020
@@ -20,6 +20,9 @@ jvm_library(
|
||||
"//plugins/textmate/core",
|
||||
"//platform/util/xmlDom",
|
||||
"//platform/util",
|
||||
"@lib//:kotlinx-coroutines-test",
|
||||
"@lib//:kotlinx-coroutines-core",
|
||||
"@lib//:kotlinx-collections-immutable",
|
||||
]
|
||||
)
|
||||
### auto-generated section `build intellij.textmate.core.tests` end
|
||||
|
||||
@@ -15,5 +15,8 @@
|
||||
<orderEntry type="module" module-name="intellij.textmate.core" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util.xmlDom" scope="TEST" />
|
||||
<orderEntry type="module" module-name="intellij.platform.util" scope="TEST" />
|
||||
<orderEntry type="library" scope="TEST" name="kotlinx-coroutines-test" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="kotlinx-coroutines-core" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="kotlinx-collections-immutable" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
+17
-4
@@ -4,11 +4,21 @@ import kotlinx.collections.immutable.PersistentList
|
||||
import kotlinx.collections.immutable.PersistentSet
|
||||
import kotlinx.collections.immutable.persistentListOf
|
||||
import kotlinx.collections.immutable.persistentSetOf
|
||||
import kotlinx.coroutines.*
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.async
|
||||
import kotlinx.coroutines.awaitAll
|
||||
import kotlinx.coroutines.awaitCancellation
|
||||
import kotlinx.coroutines.cancelAndJoin
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.joinAll
|
||||
import kotlinx.coroutines.launch
|
||||
import kotlinx.coroutines.test.TestScope
|
||||
import kotlinx.coroutines.test.advanceTimeBy
|
||||
import kotlinx.coroutines.test.runTest
|
||||
import kotlinx.coroutines.test.testTimeSource
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.jetbrains.plugins.textmate.TestUtilMultiplatform
|
||||
import org.jetbrains.plugins.textmate.update
|
||||
import org.junit.jupiter.api.Test
|
||||
@@ -16,8 +26,11 @@ import kotlin.concurrent.atomics.AtomicInt
|
||||
import kotlin.concurrent.atomics.AtomicReference
|
||||
import kotlin.concurrent.atomics.ExperimentalAtomicApi
|
||||
import kotlin.concurrent.atomics.incrementAndFetch
|
||||
import kotlin.random.Random
|
||||
import kotlin.test.*
|
||||
import kotlin.test.assertEquals
|
||||
import kotlin.test.assertFailsWith
|
||||
import kotlin.test.assertFalse
|
||||
import kotlin.test.assertNull
|
||||
import kotlin.test.assertTrue
|
||||
import kotlin.time.Duration
|
||||
import kotlin.time.Duration.Companion.hours
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
@@ -210,7 +223,7 @@ class SLRUTextMateCacheTest {
|
||||
capacity = 10,
|
||||
computeFn = { key ->
|
||||
TestUtilMultiplatform.threadSleep(10) // Simulate blocking computation time
|
||||
"computed-$key-${Random.nextInt()}"
|
||||
"computed-$key-${kotlin.random.Random.nextInt()}"
|
||||
},
|
||||
disposeFn = { }
|
||||
)
|
||||
Reference in New Issue
Block a user