Replace assert with lazy assert, times with repeat.

Original commit: 3106458cc4
This commit is contained in:
Ilya Gorbunov
2015-10-01 20:13:34 +03:00
parent c651a58e69
commit 3f0f62fccd
2 changed files with 3 additions and 3 deletions
@@ -158,7 +158,7 @@ public class KotlinBuilder : ModuleLevelBuilder(BuilderCategory.SOURCE_PROCESSOR
val lookupTracker = val lookupTracker =
project.container.getChild(LOOKUP_TRACKER)?.let { project.container.getChild(LOOKUP_TRACKER)?.let {
assert("true".equals(System.getProperty("kotlin.jps.tests"), ignoreCase = true), "LOOKUP_TRACKER allowed only for jps tests") assert("true".equals(System.getProperty("kotlin.jps.tests"), ignoreCase = true)) { "LOOKUP_TRACKER allowed only for jps tests" }
it.data it.data
} ?: LookupTracker.DO_NOTHING } ?: LookupTracker.DO_NOTHING
@@ -549,7 +549,7 @@ public class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
val result = HashSet<String>() val result = HashSet<String>()
for (file in files) { for (file in files) {
val relativePath = FileUtil.getRelativePath(baseDir, file) val relativePath = FileUtil.getRelativePath(baseDir, file)
assert(relativePath != null, "relativePath should not be null") assert(relativePath != null) { "relativePath should not be null" }
result.add(toSystemIndependentName(relativePath!!)) result.add(toSystemIndependentName(relativePath!!))
} }
return result return result
@@ -581,7 +581,7 @@ public class KotlinJpsBuildTest : AbstractKotlinJpsBuildTestCase() {
assertCanceled(buildResult) assertCanceled(buildResult)
buildResult.assertSuccessful() buildResult.assertSuccessful()
assert(interval < 8000, "expected time for canceled compilation < 8000 ms, but $interval") assert(interval < 8000) { "expected time for canceled compilation < 8000 ms, but $interval" }
val module = myProject.getModules().get(0) val module = myProject.getModules().get(0)
assertFilesNotExistInOutput(module, "foo/Foo.class") assertFilesNotExistInOutput(module, "foo/Foo.class")