Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.yield
import mu.KotlinLogging
import org.utbot.engine.*
import soot.Scene
import soot.jimple.JimpleBody
import soot.toolkits.graph.ExceptionalUnitGraph
Expand Down Expand Up @@ -403,7 +404,9 @@ object UtBotTestCaseGenerator : TestCaseGenerator {
val signature = method.callable.signature
val sootMethod = clazz.methods.singleOrNull { it.pureJavaSignature == signature }
?: error("No such $signature found")

if (!sootMethod.canRetrieveBody()) {
error("No method body for $sootMethod found")
}
val methodBody = sootMethod.jimpleBody()
val graph = methodBody.graph()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class GenerateTestsAction : AnAction() {
e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY)?.let {
srcClasses += getAllClasses(project, it)
}
srcClasses.removeIf { it.isInterface }
Comment thread
Vassiliy-Kudryashov marked this conversation as resolved.
var commonSourceRoot = null as VirtualFile?
for (srcClass in srcClasses) {
if (commonSourceRoot == null) {
Expand Down