Skip to content

Commit 08f9d52

Browse files
committed
Re-enabled some disabled tests
1 parent 8f4aa40 commit 08f9d52

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

utbot-framework/src/test/kotlin/org/utbot/examples/algorithms/GraphTest.kt

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.utbot.examples.algorithms
22

3-
import org.junit.jupiter.api.Disabled
43
import org.utbot.examples.UtValueTestCaseChecker
54
import org.utbot.examples.eq
65
import org.utbot.examples.ignoreExecutionsNumber
@@ -12,14 +11,20 @@ internal class GraphTest : UtValueTestCaseChecker(testClass = GraphExample::clas
1211
@Test
1312
@Tag("slow")
1413
fun testRunFindCycle() {
15-
check(
14+
checkWithException(
1615
GraphExample::runFindCycle,
17-
eq(1),
16+
ignoreExecutionsNumber,
17+
{ e, r -> e == null && r.isException<NullPointerException>() },
18+
{ e, r -> e != null && e.contains(null) && r.isException<NullPointerException>() },
19+
{ e, r -> e != null && e.any { it.first < 0 || it.first >= 10 } && r.isException<ArrayIndexOutOfBoundsException>() },
20+
{ e, r -> e != null && e.any { it.second < 0 || it.second >= 10 } && r.isException<ArrayIndexOutOfBoundsException>() },
21+
{ e, r -> e != null && e.all { it != null } && r.isSuccess }
1822
)
1923
}
2024

2125
@Test
2226
fun testDijkstra() {
27+
// The graph is fixed, there should be exactly one execution path, so no matchers are necessary
2328
check(
2429
GraphExample::runDijkstra,
2530
eq(1)

utbot-framework/src/test/kotlin/org/utbot/examples/casts/ArrayCastExampleTest.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.utbot.examples.casts
22

3+
import org.junit.jupiter.api.Disabled
34
import org.utbot.examples.UtValueTestCaseChecker
45
import org.utbot.examples.DoNotCalculate
56
import org.utbot.examples.eq
@@ -160,6 +161,7 @@ internal class ArrayCastExampleTest : UtValueTestCaseChecker(
160161
}
161162

162163
@Test
164+
@Disabled("Fix Traverser.findInvocationTargets to exclude non-exported classes / provide good classes")
163165
fun testCastFromIterableToCollection() {
164166
check(
165167
ArrayCastExample::castFromIterableToCollection,

utbot-framework/src/test/kotlin/org/utbot/examples/casts/CastExampleTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.utbot.examples.casts
22

3-
import org.junit.jupiter.api.Disabled
43
import org.utbot.examples.UtValueTestCaseChecker
54
import org.utbot.examples.DoNotCalculate
65
import org.utbot.examples.eq
@@ -10,7 +9,6 @@ import org.utbot.framework.plugin.api.CodegenLanguage
109
import org.junit.jupiter.api.Test
1110

1211
// TODO failed Kotlin compilation SAT-1332
13-
@Disabled
1412
internal class CastExampleTest : UtValueTestCaseChecker(
1513
testClass = CastExample::class,
1614
testCodeGeneration = true,

utbot-framework/src/test/kotlin/org/utbot/examples/casts/GenericCastExampleTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.utbot.examples.casts
22

3-
import org.junit.jupiter.api.Disabled
43
import org.utbot.examples.UtValueTestCaseChecker
54
import org.utbot.examples.DoNotCalculate
65
import org.utbot.examples.between
@@ -10,7 +9,6 @@ import org.utbot.framework.plugin.api.CodegenLanguage
109
import org.junit.jupiter.api.Test
1110

1211
// TODO failed Kotlin compilation SAT-1332
13-
@Disabled
1412
internal class GenericCastExampleTest : UtValueTestCaseChecker(
1513
testClass = GenericCastExample::class,
1614
testCodeGeneration = true,

utbot-framework/src/test/kotlin/org/utbot/examples/casts/InstanceOfExampleTest.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import org.junit.jupiter.api.Disabled
1111
import org.junit.jupiter.api.Test
1212

1313
// TODO failed Kotlin compilation SAT-1332
14-
@Disabled
1514
internal class InstanceOfExampleTest : UtValueTestCaseChecker(
1615
testClass = InstanceOfExample::class,
1716
testCodeGeneration = true,

0 commit comments

Comments
 (0)