Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add some fixes
  • Loading branch information
amandelpie committed Aug 5, 2022
commit 81e07597293a53ebe34b3fea2eaf6a1a73001b6d
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ internal class CgMethodConstructor(val context: CgContext) : CgContextOwner by c
}
}

fun createTestMethod(executableId: ExecutableId, execution: UtSymbolicExecution): CgTestMethod =
fun createTestMethod(executableId: ExecutableId, execution: UtExecution): CgTestMethod =
withTestMethodScope(execution) {
val testMethodName = nameGenerator.testMethodNameFor(executableId, execution.testMethodName)
// TODO: remove this line when SAT-1273 is completed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ internal class CgTestClassConstructor(val context: CgContext) :
}

val (methodUnderTest, _, _, clustersInfo) = testSet
val symbolicExecutions = testSet.executions.filterIsInstance<UtSymbolicExecution>()
val regions = mutableListOf<CgRegion<CgMethod>>()
val requiredFields = mutableListOf<CgParameterDeclaration>()

Expand All @@ -96,7 +95,7 @@ internal class CgTestClassConstructor(val context: CgContext) :
emptyLineIfNeeded()
for (i in executionIndices) {
runCatching {
currentTestCaseTestMethods += methodConstructor.createTestMethod(methodUnderTest, symbolicExecutions[i])
currentTestCaseTestMethods += methodConstructor.createTestMethod(methodUnderTest, testSet.executions[i])
}.onFailure { e -> processFailure(testSet, e) }
}
val clusterHeader = clusterSummary?.header
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,11 @@ import org.utbot.common.WorkaroundReason
import org.utbot.common.doNotRun
import org.utbot.common.unreachableBranch
import org.utbot.common.workaround
import org.utbot.framework.plugin.api.ClassId
import org.utbot.framework.plugin.api.MissingState
import org.utbot.framework.plugin.api.UtArrayModel
import org.utbot.framework.plugin.api.UtAssembleModel
import org.utbot.framework.plugin.api.UtClassRefModel
import org.utbot.framework.plugin.api.UtCompositeModel
import org.utbot.framework.plugin.api.UtEnumConstantModel
import org.utbot.framework.plugin.api.UtSymbolicExecution
import org.utbot.framework.plugin.api.UtModel
import org.utbot.framework.plugin.api.UtNullModel
import org.utbot.framework.plugin.api.UtPrimitiveModel
import org.utbot.framework.plugin.api.UtReferenceModel
import org.utbot.framework.plugin.api.UtVoidModel
import org.utbot.framework.plugin.api.*
import org.utbot.framework.util.UtModelVisitor
import org.utbot.framework.util.hasThisInstance

class ExecutionStateAnalyzer(val execution: UtSymbolicExecution) {
class ExecutionStateAnalyzer(val execution: UtExecution) {
fun findModifiedFields(): StateModificationInfo {
return StateModificationInfo()
.analyzeThisInstance()
Expand Down