Skip to content

Commit 1ba23f0

Browse files
committed
Avoid remembering and restoring enum constants
1 parent 2c9d1a3 commit 1ba23f0

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/CgMethodConstructor.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1361,7 +1361,11 @@ open class CgMethodConstructor(val context: CgContext) : CgContextOwner by conte
13611361
// TODO: remove this line when SAT-1273 is completed
13621362
execution.displayName = execution.displayName?.let { "${executableId.name}: $it" }
13631363
testMethod(testMethodName, execution.displayName) {
1364-
val statics = currentExecution!!.stateBefore.statics
1364+
//Enum constants are static, but there is no need to store and recover value for them
1365+
val statics = currentExecution!!.stateBefore
1366+
.statics
1367+
.filterNot { it.value is UtEnumConstantModel }
1368+
13651369
rememberInitialStaticFields(statics)
13661370
val stateAnalyzer = ExecutionStateAnalyzer(execution)
13671371
val modificationInfo = stateAnalyzer.findModifiedFields()

0 commit comments

Comments
 (0)