File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
utbot-framework-test/src/test/kotlin/org/utbot/examples/enums
utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 11package org.utbot.examples.enums
22
3+ import org.junit.jupiter.api.Disabled
34import org.junit.jupiter.api.Test
45import org.utbot.examples.enums.ComplexEnumExamples.Color
56import org.utbot.examples.enums.ComplexEnumExamples.Color.BLUE
@@ -74,6 +75,7 @@ class ComplexEnumExamplesTest : UtValueTestCaseChecker(
7475 }
7576
7677 @Test
78+ @Disabled(" TODO: nested anonymous classes are not supported: https://github.com/UnitTestBot/UTBotJava/issues/617" )
7779 fun testFindState () {
7880 check(
7981 ComplexEnumExamples ::findState,
Original file line number Diff line number Diff line change @@ -1361,7 +1361,12 @@ 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+ .filterNot { it.value.classId.outerClass?.isEnum == true }
1369+
13651370 rememberInitialStaticFields(statics)
13661371 val stateAnalyzer = ExecutionStateAnalyzer (execution)
13671372 val modificationInfo = stateAnalyzer.findModifiedFields()
You can’t perform that action at this time.
0 commit comments