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
@@ -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
Expand Down Expand Up @@ -74,6 +75,7 @@ class ComplexEnumExamplesTest : UtValueTestCaseChecker(
}

@Test
@Disabled("TODO: nested anonymous classes are not supported: https://github.com/UnitTestBot/UTBotJava/issues/617")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that the reason for disabling here differs from issue mentioned in 617, so maybe create an another issue?

fun testFindState() {
check(
ComplexEnumExamples::findState,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down