Skip to content

Commit 92e3cf8

Browse files
committed
Compilation fix
1 parent 0c3a506 commit 92e3cf8

File tree

4 files changed

+2
-53
lines changed

4 files changed

+2
-53
lines changed

utbot-framework/src/main/kotlin/org/utbot/engine/Traverser.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ import org.utbot.framework.plugin.api.FieldId
8989
import org.utbot.framework.plugin.api.MethodId
9090
import org.utbot.framework.plugin.api.UtMethod
9191
import org.utbot.framework.plugin.api.classId
92-
import org.utbot.framework.plugin.api.graph
9392
import org.utbot.framework.plugin.api.id
9493
import org.utbot.framework.plugin.api.util.id
9594
import org.utbot.framework.plugin.api.util.jClass
9695
import org.utbot.framework.plugin.api.util.signature
9796
import org.utbot.framework.plugin.api.util.utContext
9897
import org.utbot.framework.util.executableId
98+
import org.utbot.framework.util.graph
9999
import java.lang.reflect.ParameterizedType
100100
import kotlin.collections.plus
101101
import kotlin.collections.plusAssign

utbot-framework/src/main/kotlin/org/utbot/engine/UtBotSymbolicEngine.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,13 @@ import org.utbot.framework.plugin.api.UtMethod
7272
import org.utbot.framework.plugin.api.UtNullModel
7373
import org.utbot.framework.plugin.api.UtOverflowFailure
7474
import org.utbot.framework.plugin.api.UtResult
75-
import org.utbot.framework.plugin.api.classId
7675
import org.utbot.framework.util.graph
77-
import org.utbot.framework.plugin.api.id
7876
import org.utbot.framework.plugin.api.onSuccess
7977
import org.utbot.framework.plugin.api.util.executableId
8078
import org.utbot.framework.plugin.api.util.id
8179
import org.utbot.framework.plugin.api.util.utContext
8280
import org.utbot.framework.plugin.api.util.description
81+
import org.utbot.framework.util.jimpleBody
8382
import org.utbot.fuzzer.FallbackModelProvider
8483
import org.utbot.fuzzer.FuzzedMethodDescription
8584
import org.utbot.fuzzer.ModelProvider

utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api/UtBotTestCaseGenerator.kt

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,12 @@
11
package org.utbot.framework.plugin.api
22

3-
import kotlinx.coroutines.CoroutineScope
4-
import kotlinx.coroutines.GlobalScope
5-
import kotlinx.coroutines.cancel
6-
import kotlinx.coroutines.flow.Flow
7-
import kotlinx.coroutines.flow.collect
8-
import kotlinx.coroutines.flow.flattenConcat
9-
import kotlinx.coroutines.flow.flowOf
10-
import kotlinx.coroutines.isActive
11-
import kotlinx.coroutines.launch
12-
import kotlinx.coroutines.runBlocking
13-
import kotlinx.coroutines.yield
14-
import mu.KotlinLogging
153
import org.utbot.common.FileUtil
164
import org.utbot.common.bracket
175
import org.utbot.common.runBlockingWithCancellationPredicate
186
import org.utbot.common.runIgnoringCancellationException
197
import org.utbot.common.trace
208
import org.utbot.engine.EngineController
219
import org.utbot.engine.Mocker
22-
import org.utbot.engine.canRetrieveBody
23-
import org.utbot.engine.jimpleBody
24-
import org.utbot.engine.pureJavaSignature
2510
import org.utbot.framework.TestSelectionStrategyType
2611
import org.utbot.framework.UtSettings
2712
import org.utbot.framework.UtSettings.checkSolverTimeoutMillis
@@ -36,17 +21,13 @@ import org.utbot.framework.minimization.minimizeTestCase
3621
import org.utbot.framework.plugin.api.util.UtContext
3722
import org.utbot.framework.plugin.api.util.id
3823
import org.utbot.framework.plugin.api.util.intArrayClassId
39-
import org.utbot.framework.plugin.api.util.signature
4024
import org.utbot.framework.plugin.api.util.utContext
4125
import org.utbot.framework.plugin.api.util.withUtContext
42-
import org.utbot.framework.util.graph
4326
import org.utbot.framework.util.jimpleBody
4427
import org.utbot.framework.util.runSoot
4528
import org.utbot.framework.util.toModel
4629
import org.utbot.instrumentation.ConcreteExecutor
4730
import org.utbot.instrumentation.warmup.Warmup
48-
import soot.Scene
49-
import soot.toolkits.graph.ExceptionalUnitGraph
5031
import java.io.File
5132
import java.nio.file.Path
5233
import java.util.*
@@ -66,9 +47,6 @@ import kotlinx.coroutines.runBlocking
6647
import kotlinx.coroutines.yield
6748
import mu.KotlinLogging
6849
import org.utbot.engine.UtBotSymbolicEngine
69-
import soot.Scene
70-
import soot.jimple.JimpleBody
71-
import soot.toolkits.graph.ExceptionalUnitGraph
7250

7351
object UtBotTestCaseGenerator {
7452

@@ -382,31 +360,6 @@ object UtBotTestCaseGenerator {
382360
} else {
383361
minimizeTestCase(executions) { it.result::class.java }
384362
}
385-
386-
387-
fun apiToModel(mockStrategyApi: MockStrategyApi): MockStrategy =
388-
when (mockStrategyApi) {
389-
MockStrategyApi.NO_MOCKS -> MockStrategy.NO_MOCKS
390-
MockStrategyApi.OTHER_PACKAGES -> MockStrategy.OTHER_PACKAGES
391-
MockStrategyApi.OTHER_CLASSES -> MockStrategy.OTHER_CLASSES
392-
else -> error("Cannot map API Mock Strategy model to Engine model: $mockStrategyApi")
393-
}
394-
395-
}
396-
397-
fun graph(method: UtMethod<*>): ExceptionalUnitGraph {
398-
val methodBody = jimpleBody(method)
399-
return methodBody.graph()
400363
}
401364

402-
fun jimpleBody(method: UtMethod<*>): JimpleBody {
403-
val className = method.clazz.java.name
404-
val clazz = Scene.v().classes.singleOrNull { it.name == className }
405-
?: error("No such $className found in the Scene")
406-
val signature = method.callable.signature
407-
val sootMethod = clazz.methods.singleOrNull { it.pureJavaSignature == signature }
408-
?: error("No such $signature found")
409-
410-
return sootMethod.jimpleBody()
411-
}
412365

utbot-framework/src/test/kotlin/org/utbot/examples/UtTestCaseChecker.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ import kotlin.reflect.KFunction2
6969
import kotlin.reflect.KFunction3
7070
import kotlin.reflect.KFunction4
7171
import kotlin.reflect.KFunction5
72-
import mu.KotlinLogging
73-
import org.junit.jupiter.api.Assertions.assertTrue
74-
import org.utbot.framework.PathSelectorType
7572

7673
val logger = KotlinLogging.logger {}
7774

0 commit comments

Comments
 (0)