[IC] Introduce ICContext to simplify configuration propagation to caches
#KT-49785 In Progress
This commit is contained in:
committed by
Space Team
parent
7171c2531c
commit
581bc89849
+6
-3
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.incremental.snapshots
|
||||
|
||||
import org.jetbrains.kotlin.TestWithWorkingDir
|
||||
import org.jetbrains.kotlin.incremental.IncrementalCompilationContext
|
||||
import org.jetbrains.kotlin.incremental.storage.FileToPathConverter
|
||||
import org.jetbrains.kotlin.incremental.storage.IncrementalFileToPathConverter
|
||||
import org.junit.After
|
||||
@@ -17,15 +18,17 @@ import kotlin.properties.Delegates
|
||||
|
||||
class FileSnapshotMapTest : TestWithWorkingDir() {
|
||||
private var snapshotMap: FileSnapshotMap by Delegates.notNull()
|
||||
private var pathConverter: FileToPathConverter by Delegates.notNull()
|
||||
|
||||
@Before
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
val caches = File(workingDir, "caches").apply { mkdirs() }
|
||||
val snapshotMapFile = File(caches, "snapshots.tab")
|
||||
pathConverter = IncrementalFileToPathConverter((workingDir.canonicalFile))
|
||||
snapshotMap = FileSnapshotMap(snapshotMapFile, pathConverter)
|
||||
val pathConverter = IncrementalFileToPathConverter((workingDir.canonicalFile))
|
||||
val icContext = IncrementalCompilationContext(
|
||||
pathConverter = pathConverter
|
||||
)
|
||||
snapshotMap = FileSnapshotMap(snapshotMapFile, icContext)
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
+5
-1
@@ -6,6 +6,7 @@
|
||||
package org.jetbrains.kotlin.incremental.storage
|
||||
|
||||
import org.jetbrains.kotlin.TestWithWorkingDir
|
||||
import org.jetbrains.kotlin.incremental.IncrementalCompilationContext
|
||||
import org.junit.After
|
||||
import org.junit.Assert.assertArrayEquals
|
||||
import org.junit.Before
|
||||
@@ -23,7 +24,10 @@ class SourceToOutputFilesMapTest : TestWithWorkingDir() {
|
||||
val caches = File(workingDir, "caches").apply { mkdirs() }
|
||||
val stofMapFile = File(caches, "stof.tab")
|
||||
pathConverter = IncrementalFileToPathConverter((workingDir.canonicalFile))
|
||||
stofMap = SourceToOutputFilesMap(stofMapFile, pathConverter)
|
||||
val icContext = IncrementalCompilationContext(
|
||||
pathConverter = pathConverter
|
||||
)
|
||||
stofMap = SourceToOutputFilesMap(stofMapFile, icContext)
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user