@@ -13,6 +13,7 @@ import org.utbot.framework.plugin.api.util.jField
1313import org.utbot.testcheckers.eq
1414import org.utbot.testcheckers.withPushingStateFromPathSelectorForConcrete
1515import org.utbot.testcheckers.withConcrete
16+ import org.utbot.tests.infrastructure.ignoreExecutionsNumber
1617
1718class ClassWithEnumTest : UtValueTestCaseChecker (testClass = ClassWithEnum : :class) {
1819 @Test
@@ -36,7 +37,7 @@ class ClassWithEnumTest : UtValueTestCaseChecker(testClass = ClassWithEnum::clas
3637 fun testDifficultIfBranch () {
3738 check(
3839 ClassWithEnum ::useEnumInDifficultIf,
39- eq( 2 ) ,
40+ ignoreExecutionsNumber ,
4041 { s, r -> s.equals(" TRYIF" , ignoreCase = true ) && r == 1 },
4142 { s, r -> ! s.equals(" TRYIF" , ignoreCase = true ) && r == 2 },
4243 )
@@ -106,19 +107,21 @@ class ClassWithEnumTest : UtValueTestCaseChecker(testClass = ClassWithEnum::clas
106107
107108 @Test
108109 fun testChangingStaticWithEnumInit () {
109- checkThisAndStaticsAfter(
110- ClassWithEnum ::changingStaticWithEnumInit,
111- eq(1 ),
112- { t, staticsAfter, r ->
113- // for some reasons x is inaccessible
114- val x = FieldId (t.javaClass.id, " x" ).jField.get(t) as Int
115-
116- val y = staticsAfter[FieldId (ClassWithEnum .ClassWithStaticField ::class .id, " y" )]!! .value as Int
117-
118- val areStaticsCorrect = x == 1 && y == 11
119- areStaticsCorrect && r == true
120- }
121- )
110+ withConcrete(useConcreteExecution = true ) { // TODO https://github.com/UnitTestBot/UTBotJava/issues/1249
111+ checkThisAndStaticsAfter(
112+ ClassWithEnum ::changingStaticWithEnumInit,
113+ eq(1 ),
114+ { t, staticsAfter, r ->
115+ // for some reasons x is inaccessible
116+ val x = FieldId (t.javaClass.id, " x" ).jField.get(t) as Int
117+
118+ val y = staticsAfter[FieldId (ClassWithEnum .ClassWithStaticField ::class .id, " y" )]!! .value as Int
119+
120+ val areStaticsCorrect = x == 1 && y == 11
121+ areStaticsCorrect && r == true
122+ }
123+ )
124+ }
122125 }
123126
124127 @Test
@@ -168,7 +171,7 @@ class ClassWithEnumTest : UtValueTestCaseChecker(testClass = ClassWithEnum::clas
168171 withPushingStateFromPathSelectorForConcrete {
169172 check(
170173 ClassWithEnum ::implementingInterfaceEnumInDifficultBranch,
171- eq( 2 ) ,
174+ ignoreExecutionsNumber ,
172175 { s, r -> s.equals(" SUCCESS" , ignoreCase = true ) && r == 0 },
173176 { s, r -> ! s.equals(" SUCCESS" , ignoreCase = true ) && r == 2 },
174177 )
0 commit comments