File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/plugin/api
utbot-intellij/src/main/kotlin/org/utbot/intellij/plugin/ui/actions Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ import kotlinx.coroutines.launch
4848import kotlinx.coroutines.runBlocking
4949import kotlinx.coroutines.yield
5050import mu.KotlinLogging
51+ import org.utbot.engine.*
5152import soot.Scene
5253import soot.jimple.JimpleBody
5354import soot.toolkits.graph.ExceptionalUnitGraph
@@ -403,7 +404,9 @@ object UtBotTestCaseGenerator : TestCaseGenerator {
403404 val signature = method.callable.signature
404405 val sootMethod = clazz.methods.singleOrNull { it.pureJavaSignature == signature }
405406 ? : error(" No such $signature found" )
406-
407+ if (! sootMethod.canRetrieveBody()) {
408+ error(" No method body for $sootMethod found" )
409+ }
407410 val methodBody = sootMethod.jimpleBody()
408411 val graph = methodBody.graph()
409412
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ class GenerateTestsAction : AnAction() {
5858 e.getData(CommonDataKeys .VIRTUAL_FILE_ARRAY )?.let {
5959 srcClasses + = getAllClasses(project, it)
6060 }
61+ srcClasses.removeIf { it.isInterface }
6162 var commonSourceRoot = null as VirtualFile ?
6263 for (srcClass in srcClasses) {
6364 if (commonSourceRoot == null ) {
You can’t perform that action at this time.
0 commit comments