@@ -13,6 +13,7 @@ import org.utbot.framework.plugin.api.util.jField
13
13
import org.utbot.testcheckers.eq
14
14
import org.utbot.testcheckers.withPushingStateFromPathSelectorForConcrete
15
15
import org.utbot.testcheckers.withConcrete
16
+ import org.utbot.tests.infrastructure.ignoreExecutionsNumber
16
17
17
18
class ClassWithEnumTest : UtValueTestCaseChecker (testClass = ClassWithEnum : :class) {
18
19
@Test
@@ -36,7 +37,7 @@ class ClassWithEnumTest : UtValueTestCaseChecker(testClass = ClassWithEnum::clas
36
37
fun testDifficultIfBranch () {
37
38
check(
38
39
ClassWithEnum ::useEnumInDifficultIf,
39
- eq( 2 ) ,
40
+ ignoreExecutionsNumber ,
40
41
{ s, r -> s.equals(" TRYIF" , ignoreCase = true ) && r == 1 },
41
42
{ s, r -> ! s.equals(" TRYIF" , ignoreCase = true ) && r == 2 },
42
43
)
@@ -106,19 +107,21 @@ class ClassWithEnumTest : UtValueTestCaseChecker(testClass = ClassWithEnum::clas
106
107
107
108
@Test
108
109
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
+ }
122
125
}
123
126
124
127
@Test
@@ -168,7 +171,7 @@ class ClassWithEnumTest : UtValueTestCaseChecker(testClass = ClassWithEnum::clas
168
171
withPushingStateFromPathSelectorForConcrete {
169
172
check(
170
173
ClassWithEnum ::implementingInterfaceEnumInDifficultBranch,
171
- eq( 2 ) ,
174
+ ignoreExecutionsNumber ,
172
175
{ s, r -> s.equals(" SUCCESS" , ignoreCase = true ) && r == 0 },
173
176
{ s, r -> ! s.equals(" SUCCESS" , ignoreCase = true ) && r == 2 },
174
177
)
0 commit comments