diff --git a/utbot-framework-test/src/test/kotlin/org/utbot/examples/enums/ComplexEnumExamplesTest.kt b/utbot-framework-test/src/test/kotlin/org/utbot/examples/enums/ComplexEnumExamplesTest.kt index a3c02068b8..b4d969962e 100644 --- a/utbot-framework-test/src/test/kotlin/org/utbot/examples/enums/ComplexEnumExamplesTest.kt +++ b/utbot-framework-test/src/test/kotlin/org/utbot/examples/enums/ComplexEnumExamplesTest.kt @@ -1,5 +1,6 @@ package org.utbot.examples.enums +import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test import org.utbot.examples.enums.ComplexEnumExamples.Color import org.utbot.examples.enums.ComplexEnumExamples.Color.BLUE @@ -74,6 +75,7 @@ class ComplexEnumExamplesTest : UtValueTestCaseChecker( } @Test + @Disabled("TODO: nested anonymous classes are not supported: https://github.com/UnitTestBot/UTBotJava/issues/617") fun testFindState() { check( ComplexEnumExamples::findState, diff --git a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/CgMethodConstructor.kt b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/CgMethodConstructor.kt index 89f1e9a36b..8b8d5b8ebc 100644 --- a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/CgMethodConstructor.kt +++ b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/CgMethodConstructor.kt @@ -1361,7 +1361,12 @@ open class CgMethodConstructor(val context: CgContext) : CgContextOwner by conte // TODO: remove this line when SAT-1273 is completed execution.displayName = execution.displayName?.let { "${executableId.name}: $it" } testMethod(testMethodName, execution.displayName) { - val statics = currentExecution!!.stateBefore.statics + //Enum constants are static, but there is no need to store and recover value for them + val statics = currentExecution!!.stateBefore + .statics + .filterNot { it.value is UtEnumConstantModel } + .filterNot { it.value.classId.outerClass?.isEnum == true } + rememberInitialStaticFields(statics) val stateAnalyzer = ExecutionStateAnalyzer(execution) val modificationInfo = stateAnalyzer.findModifiedFields()