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:
Yan Zhulanow
2019-06-26 22:41:56 +09:00
parent d8d81c51d7
commit 472ec72eb9
288 changed files with 4861 additions and 3910 deletions
@@ -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)