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
48
48
import kotlinx.coroutines.runBlocking
49
49
import kotlinx.coroutines.yield
50
50
import mu.KotlinLogging
51
+ import org.utbot.engine.*
51
52
import soot.Scene
52
53
import soot.jimple.JimpleBody
53
54
import soot.toolkits.graph.ExceptionalUnitGraph
@@ -403,7 +404,9 @@ object UtBotTestCaseGenerator : TestCaseGenerator {
403
404
val signature = method.callable.signature
404
405
val sootMethod = clazz.methods.singleOrNull { it.pureJavaSignature == signature }
405
406
? : error(" No such $signature found" )
406
-
407
+ if (! sootMethod.canRetrieveBody()) {
408
+ error(" No method body for $sootMethod found" )
409
+ }
407
410
val methodBody = sootMethod.jimpleBody()
408
411
val graph = methodBody.graph()
409
412
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ class GenerateTestsAction : AnAction() {
58
58
e.getData(CommonDataKeys .VIRTUAL_FILE_ARRAY )?.let {
59
59
srcClasses + = getAllClasses(project, it)
60
60
}
61
+ srcClasses.removeIf { it.isInterface }
61
62
var commonSourceRoot = null as VirtualFile ?
62
63
for (srcClass in srcClasses) {
63
64
if (commonSourceRoot == null ) {
You can’t perform that action at this time.
0 commit comments