Refactor debugger tests
1. Move tests to their own module 2. Avoid sharing the 'tinyApp' project between tests 3. Clean up option directive handling
This commit is contained in:
+7
-1
@@ -91,6 +91,9 @@ class KotlinDebuggerCaches(project: Project) {
|
||||
companion object {
|
||||
private val LOG = Logger.getLogger(KotlinDebuggerCaches::class.java)!!
|
||||
|
||||
@get:TestOnly
|
||||
var LOG_COMPILATIONS: Boolean = false
|
||||
|
||||
fun getInstance(project: Project) = ServiceManager.getService(project, KotlinDebuggerCaches::class.java)!!
|
||||
|
||||
fun compileCodeFragmentCacheAware(
|
||||
@@ -123,7 +126,10 @@ class KotlinDebuggerCaches(project: Project) {
|
||||
}
|
||||
|
||||
val newCompiledData = compileCode()
|
||||
LOG.debug("Compile bytecode for ${codeFragment.text}")
|
||||
|
||||
if (LOG_COMPILATIONS) {
|
||||
LOG.debug("Compile bytecode for ${codeFragment.text}")
|
||||
}
|
||||
|
||||
synchronized(evaluateExpressionCache.cachedCompiledData) {
|
||||
evaluateExpressionCache.cachedCompiledData.value.putValue(text, newCompiledData)
|
||||
|
||||
Reference in New Issue
Block a user