Checking for constants values in incremental compiler.
Original commit: e89b59a745
This commit is contained in:
@@ -16,13 +16,11 @@
|
||||
|
||||
package org.jetbrains.jet.jps.build
|
||||
|
||||
import org.jetbrains.ether.IncrementalTestCase
|
||||
import org.jetbrains.jps.builders.JpsBuildTestCase
|
||||
import kotlin.properties.Delegates
|
||||
import com.intellij.openapi.util.io.FileUtil
|
||||
import java.io.File
|
||||
import org.jetbrains.jps.builders.CompileScopeTestBuilder
|
||||
import org.jetbrains.jps.builders.BuildResult
|
||||
import org.jetbrains.jps.builders.impl.logging.ProjectBuilderLoggerBase
|
||||
import org.jetbrains.jps.builders.logging.BuildLoggingManager
|
||||
import org.jetbrains.jps.model.java.JpsJavaExtensionService
|
||||
@@ -120,6 +118,14 @@ public class IncrementalJpsTest : JpsBuildTestCase() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
fun testConstantValue() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
fun testConstantUnchanged() {
|
||||
doTest()
|
||||
}
|
||||
|
||||
private class MyLogger(val rootPath: String) : ProjectBuilderLoggerBase() {
|
||||
private val logBuf = StringBuilder()
|
||||
public val log: String
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-const-*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
val CONST = "foo"
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
val CONST = "foo"
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
deprecated(CONST + CONST)
|
||||
class Usage
|
||||
@@ -0,0 +1,13 @@
|
||||
Cleaning output files:
|
||||
out/production/module/test/TestPackage-const-*.class
|
||||
out/production/module/test/TestPackage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/const.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/test/Usage.class
|
||||
End of files
|
||||
Compiling files:
|
||||
src/usage.kt
|
||||
End of files
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
val CONST = "foo"
|
||||
@@ -0,0 +1,3 @@
|
||||
package test
|
||||
|
||||
val CONST = "bar"
|
||||
@@ -0,0 +1,4 @@
|
||||
package test
|
||||
|
||||
deprecated(CONST + CONST)
|
||||
class Usage
|
||||
Reference in New Issue
Block a user