@@ -2,14 +2,11 @@ package org.utbot.examples.collections
2
2
3
3
import org.utbot.tests.infrastructure.UtValueTestCaseChecker
4
4
import org.utbot.tests.infrastructure.AtLeast
5
- import org.utbot.tests.infrastructure.DoNotCalculate
6
- import org.utbot.tests.infrastructure.between
7
5
import org.utbot.tests.infrastructure.ignoreExecutionsNumber
8
6
import org.utbot.framework.plugin.api.CodegenLanguage
9
7
import org.junit.jupiter.api.Disabled
10
8
import org.junit.jupiter.api.Test
11
9
import org.utbot.testcheckers.eq
12
- import org.utbot.testcheckers.ge
13
10
import org.utbot.testcheckers.withPushingStateFromPathSelectorForConcrete
14
11
import org.utbot.testcheckers.withoutMinimization
15
12
import org.utbot.tests.infrastructure.CodeGeneration
@@ -30,7 +27,7 @@ internal class SetsTest : UtValueTestCaseChecker(
30
27
eq(3 ),
31
28
{ a, _ -> a == null },
32
29
{ a, r -> a != null && a.isEmpty() && r!! .isEmpty() },
33
- { a, r -> a != null && a.isNotEmpty() && r != null && r.isNotEmpty () && r.containsAll(a.toList()) },
30
+ { a, r -> a != null && a.isNotEmpty() && ! r.isNullOrEmpty () && r.containsAll(a.toList()) },
34
31
)
35
32
}
36
33
@@ -92,7 +89,7 @@ internal class SetsTest : UtValueTestCaseChecker(
92
89
val resultFun = { set: Set <Char > -> listOf (' ' , ' \t ' , ' \r ' , ' \n ' ).intersect(set).size }
93
90
check(
94
91
Sets ::removeSpace,
95
- ge( 3 ) ,
92
+ ignoreExecutionsNumber ,
96
93
{ set, _ -> set == null },
97
94
{ set, res -> ' ' in set && resultFun(set) == res },
98
95
{ set, res -> ' \t ' in set && resultFun(set) == res },
@@ -109,7 +106,7 @@ internal class SetsTest : UtValueTestCaseChecker(
109
106
fun addElementsTest () {
110
107
check(
111
108
Sets ::addElements,
112
- ge( 5 ) ,
109
+ ignoreExecutionsNumber ,
113
110
{ set, _, _ -> set == null },
114
111
{ set, a, _ -> set != null && set.isNotEmpty() && a == null },
115
112
{ set, _, r -> set.isEmpty() && r == set },
@@ -124,7 +121,7 @@ internal class SetsTest : UtValueTestCaseChecker(
124
121
fun removeElementsTest () {
125
122
check(
126
123
Sets ::removeElements,
127
- between( 6 .. 8 ) ,
124
+ ignoreExecutionsNumber ,
128
125
{ set, _, _, _ -> set == null },
129
126
{ set, i, j, res -> set != null && i !in set && j !in set && res == - 1 },
130
127
{ set, i, j, res -> set != null && set.size >= 1 && i !in set && j in set && res == 4 },
@@ -150,7 +147,7 @@ internal class SetsTest : UtValueTestCaseChecker(
150
147
withoutMinimization { // TODO: JIRA:1506
151
148
check(
152
149
Sets ::removeCustomObject,
153
- ge( 4 ) ,
150
+ ignoreExecutionsNumber ,
154
151
{ set, _, _ -> set == null },
155
152
{ set, _, result -> set.isEmpty() && result == 0 },
156
153
{ set, i, result -> set.isNotEmpty() && CustomClass (i) !in set && result == 0 },
@@ -188,7 +185,6 @@ internal class SetsTest : UtValueTestCaseChecker(
188
185
// TODO: JIRA:1666 -- Engine ignores branches in Wrappers sometimes
189
186
// TODO: cannot find branch with result == 2
190
187
// { set, other, result -> !set.containsAll(other) && other.any { it in set } && result == 2 },
191
- coverage = DoNotCalculate
192
188
)
193
189
}
194
190
}
@@ -197,7 +193,7 @@ internal class SetsTest : UtValueTestCaseChecker(
197
193
fun testRetainAllElements () {
198
194
check(
199
195
Sets ::retainAllElements,
200
- ge( 4 ) ,
196
+ ignoreExecutionsNumber ,
201
197
{ set, _, _ -> set == null },
202
198
{ set, other, _ -> set != null && other == null },
203
199
{ set, other, result -> other.containsAll(set) && result == 1 },
@@ -209,7 +205,7 @@ internal class SetsTest : UtValueTestCaseChecker(
209
205
fun testContainsAllElements () {
210
206
check(
211
207
Sets ::containsAllElements,
212
- ge( 5 ) ,
208
+ ignoreExecutionsNumber ,
213
209
{ set, _, _ -> set == null },
214
210
{ set, other, _ -> set != null && other == null },
215
211
{ set, other, result -> set.isEmpty() || other.isEmpty() && result == - 1 },
@@ -223,7 +219,7 @@ internal class SetsTest : UtValueTestCaseChecker(
223
219
fun testClearElements () {
224
220
check(
225
221
Sets ::clearElements,
226
- eq( 3 ) ,
222
+ ignoreExecutionsNumber ,
227
223
{ set, _ -> set == null },
228
224
{ set, result -> set.isEmpty() && result == 0 },
229
225
{ set, result -> set.isNotEmpty() && result == 1 },
@@ -236,7 +232,7 @@ internal class SetsTest : UtValueTestCaseChecker(
236
232
fun testContainsElement () {
237
233
check(
238
234
Sets ::containsElement,
239
- between( 3 .. 5 ) ,
235
+ ignoreExecutionsNumber ,
240
236
{ set, _, _ -> set == null },
241
237
{ set, i, result -> i !in set && result == 0 },
242
238
{ set, i, result -> i in set && result == 1 },
0 commit comments